// Numbas version: exam_results_page_options {"name": "Simon's copy of Julie's copy of Mean from a frequency table - classes", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"c": {"name": "c", "definition": "random(4..6)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "stdev": {"name": "stdev", "definition": "sqrt((a*q^2 + b*p^2+c*s^2 +d*r^2 +f*t^2)/20- (Total/20)^2)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "f": {"name": "f", "definition": "20 -a-b-c-d", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "b": {"name": "b", "definition": "random(2..5)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "r": {"name": "r", "definition": "x+40", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "a": {"name": "a", "definition": "random(0..3)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "data": {"name": "data", "definition": "[ [p,a],[q,b],[r,c],[s,d],[t,f]]", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "t": {"name": "t", "definition": "x+50", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "p": {"name": "p", "definition": "x+20", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "s": {"name": "s", "definition": "x+30", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "Total": {"name": "Total", "definition": "a*q + b*p+c*s +d*r +f*t\n", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "d": {"name": "d", "definition": "random(4..6)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "x": {"name": "x", "definition": "random(10..90#10)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "Answer": {"name": "Answer", "definition": "Total/20", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "q": {"name": "q", "definition": "x+10", "description": "", "templateType": "anything", "group": "Ungrouped variables"}}, "statement": "

In CITech Ltd there was a special fundraising drive among staff for ebola affected regions of Africa. A sister of one of the staff is an aid worker in Africa. The frequency table below describes the amount in euro donated by individual staff. Calculate the mean for the data.

", "parts": [{"scripts": {}, "sortAnswers": false, "unitTests": [], "variableReplacements": [], "customMarkingAlgorithm": "", "marks": 0, "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "gaps": [{"scripts": {}, "unitTests": [], "customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "showCorrectAnswer": true, "precisionPartialCredit": 0, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "minValue": "{Total}/20", "showPrecisionHint": false, "precisionType": "dp", "variableReplacements": [], "marks": "4", "mustBeReduced": false, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "precisionMessage": "You have not given your answer to the correct precision.", "mustBeReducedPC": 0, "strictPrecision": false, "showFeedbackIcon": true, "allowFractions": false, "maxValue": "{Total}/20", "precision": "2"}], "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "prompt": "

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Class ( in euro)frequency
{q-5} but less than {q+5}{a}
{p-5} but less than {p+5}{b}
{s-5} but less than {s+5}{c}
{r-5} but less than {r+5}{d}
{t-5} but less than {t+5}{f}
\n

\n

Mean: [[0]]euro (correct to 2 decimal places)

\n

"}], "metadata": {"description": "

Scores  in 20 games and frequency given -- calculate mean.

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "name": "Simon's copy of Julie's copy of Mean from a frequency table - classes", "tags": [], "ungrouped_variables": ["a", "c", "b", "d", "f", "q", "p", "s", "r", "t", "stdev", "Answer", "x", "Total", "data"], "functions": {}, "preamble": {"js": "", "css": ""}, "advice": "

To find the mean use the formula $\\frac{\\Sigma fx}{\\Sigma f}$

\n

In this question, we have intervals rather than exact values for $x$   (e.g. the first interval is \"$\\var{q-5}$ but less than $\\var{q+5}$\")

\n

So when calculating ${\\Sigma fx}$ we are going to use the midpoint of each interval as our values of $x$    (e.g. the first interval we will use $\\frac{\\var{q-5}+\\var{q+5}}{2} = \\var{q}$)

\n

\n

Hence:

\n

\n

$\\Sigma fx= (\\var{a}  \\times \\var{q}) + (\\var{b} \\times \\var{p}) +( \\var{c}  \\times \\var{s}) + (\\var{d} \\times \\var{r}) + (\\var{f} \\times \\var {t}) = \\var{Total} $

\n

mean $=\\frac{\\Sigma fx}{\\Sigma f}= \\var{Total} \\div 20 =\\var{Answer} $

", "extensions": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "rulesets": {}, "variable_groups": [], "type": "question", "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}