// Numbas version: finer_feedback_settings {"name": "Simon's copy of Mean, Median, Mode for Auto", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "

(a)

\n

There are 7 datapoints so the mean is

\n

$\\frac{\\var{a2}+\\var{a7}+\\var{a1}+\\var{a5}+ \\var{a3}+ \\var{a6}+\\var{a4}}{7}=\\var{precround((a1+a2+a3+a4+a5+a6+a7)/7,2)}$

\n

\n

(b)

\n

To find the median, we first put our values in order:

\n

$\\var{a1},\\var{a2},\\var{a3},\\var{a4},\\var{a5},\\var{a6},\\var{a7}$

\n

Then the middle value is $\\var{a4}$

\n

\n

(c)

\n

The mode is $\\var{a2}$ as it is the only value which appears twice.

", "statement": "

The fuel emissions (in g/km of CO2) of a sample of 7 diesel cars of similar type have been recorded as follows:

\n

$\\var{a2}, \\var{a7}, \\var{a1}, \\var{a5}, \\var{a3}, \\var{a6}$ and $\\var{a4}$.

\n

Calculate the mean, median and mode of these emissions.

", "preamble": {"js": "", "css": ""}, "variables": {"a2": {"definition": "random(116..121)", "name": "a2", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "a5": {"definition": "random(126..128)", "name": "a5", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "a3": {"definition": "a2", "name": "a3", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "a7": {"definition": "random(131..140)", "name": "a7", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "a1": {"definition": "random(110..115)", "name": "a1", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "a6": {"definition": "random(129..130)", "name": "a6", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "a4": {"definition": "random(122..125)", "name": "a4", "templateType": "anything", "description": "", "group": "Ungrouped variables"}}, "variable_groups": [], "ungrouped_variables": ["a1", "a3", "a2", "a5", "a4", "a7", "a6"], "parts": [{"extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "unitTests": [], "prompt": "

$\\text{mean}=\\;\\;$[[0]] (correct to two decimal places)

", "variableReplacementStrategy": "originalfirst", "scripts": {}, "type": "gapfill", "sortAnswers": false, "marks": 0, "variableReplacements": [], "gaps": [{"vsetRange": [0, 1], "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "showCorrectAnswer": true, "failureRate": 1, "vsetRangePoints": 5, "unitTests": [], "variableReplacementStrategy": "originalfirst", "showPreview": true, "scripts": {}, "answerSimplification": "std", "type": "jme", "marks": 2, "checkingType": "absdiff", "variableReplacements": [], "checkVariableNames": false, "customMarkingAlgorithm": "", "answer": "{precround(1/7*(a1+a2+a3+a4+a5+a6+a7),2)}", "showFeedbackIcon": true, "checkingAccuracy": 0.01}], "customMarkingAlgorithm": "", "showFeedbackIcon": true}, {"extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "unitTests": [], "prompt": "

$\\text{median}=\\;\\;$[[0]]

", "variableReplacementStrategy": "originalfirst", "stepsPenalty": "1", "scripts": {}, "type": "gapfill", "sortAnswers": false, "marks": 0, "variableReplacements": [], "gaps": [{"extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "unitTests": [], "variableReplacementStrategy": "originalfirst", "maxValue": "{a4}", "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "mustBeReduced": false, "marks": 2, "correctAnswerStyle": "plain", "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "{a4}", "customMarkingAlgorithm": "", "showFeedbackIcon": true}], "customMarkingAlgorithm": "", "showFeedbackIcon": true, "steps": [{"variableReplacements": [], "prompt": "

To find the median:

\n

List the numbers in order of increasing size. 

\n

The median is then the middle number. If there are two middle numbers, we take the mean of these two.

", "extendBaseMarkingAlgorithm": true, "type": "information", "marks": 0, "showCorrectAnswer": true, "scripts": {}, "unitTests": [], "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true}]}, {"extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "unitTests": [], "prompt": "

$\\text{mode}=\\;\\;$[[0]]

", "variableReplacementStrategy": "originalfirst", "stepsPenalty": "1", "scripts": {}, "type": "gapfill", "sortAnswers": false, "marks": 0, "variableReplacements": [], "gaps": [{"extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "unitTests": [], "variableReplacementStrategy": "originalfirst", "maxValue": "{a2}", "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "mustBeReduced": false, "marks": 2, "correctAnswerStyle": "plain", "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "{a2}", "customMarkingAlgorithm": "", "showFeedbackIcon": true}], "customMarkingAlgorithm": "", "showFeedbackIcon": true, "steps": [{"variableReplacements": [], "prompt": "

The mode is the number that occurs most often.

", "extendBaseMarkingAlgorithm": true, "type": "information", "marks": 0, "showCorrectAnswer": true, "scripts": {}, "unitTests": [], "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true}]}], "extensions": ["stats"], "name": "Simon's copy of Mean, Median, Mode for Auto", "functions": {}, "rulesets": {"std": ["all", "!collectNumbers", "!noLeadingMinus"]}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "
\n

Topics covered are calculating the mean, median, mode and standard deviation.

\n

rebelmaths

\n
"}, "tags": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "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/"}]}