// Numbas version: finer_feedback_settings {"name": "Mode, Median, Mean", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"js": "", "css": ""}, "tags": ["descriptive statistics", "mean", "median", "mode", "Rebel", "REBEL", "rebel", "rebelmaths", "statistics", "teame"], "ungrouped_variables": ["dat", "a", "mo", "me", "md"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "pickQuestions": 0, "name": ""}], "type": "question", "rulesets": {}, "variable_groups": [], "advice": "

The mean, median and mode are all averages. Each gives us some information about a typical member of a set of data.

\n

To calculate the mean, you need to find the total of all the test scores and divide it by the number of scores -- in this case 10.

\n

The median is the middle score, when the scores are arranged in order. In this case the number of scores is even, so we need to find the mean of the 5th and 6th scores.

\n

The mode is the most frequent score. 

\n

See http://www.skillsyouneed.com/num/averages.html  

\n

for more information on these three types of average.

", "parts": [{"scripts": {}, "variableReplacements": [], "prompt": "

{a[0]},  {a[1]},  {a[2]}, {a[3]}, {a[4]}, {a[5]}, {a[6]}, {a[7]}, {a[8]}, {a[9]}

\n

Mean: [[0]]

\n

Median: [[1]]

\n

Mode: [[2]]

\n

Give your answers to 1 decimal place where appropriate.

", "stepsPenalty": "1", "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "type": "numberentry", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "marks": 1, "showCorrectAnswer": true, "minValue": "me", "scripts": {}, "showPrecisionHint": false, "maxValue": "me"}, {"allowFractions": false, "variableReplacements": [], "type": "numberentry", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "marks": 1, "showCorrectAnswer": true, "minValue": "md", "scripts": {}, "showPrecisionHint": false, "maxValue": "md"}, {"allowFractions": false, "variableReplacements": [], "type": "numberentry", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "marks": 1, "showCorrectAnswer": true, "minValue": "mo", "scripts": {}, "showPrecisionHint": false, "maxValue": "mo"}], "showCorrectAnswer": true, "marks": 0, "type": "gapfill", "steps": [{"scripts": {}, "variableReplacements": [], "prompt": "

The median is the middle score, when the scores are arranged in order. In this case the number of scores is even, so we need to find the mean of the 5th and 6th scores.

", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "marks": 0, "type": "information"}]}], "showQuestionGroupNames": false, "statement": "

Find the mean, median and mode of the following 10 test scores.

", "variables": {"dat": {"description": "", "group": "Ungrouped variables", "name": "dat", "definition": "satisfy(\n [a],\n [\n //a is given as a list by generating 10 numbers between 4 and 18\n repeat(random(4..18),10)],\n [ //the conditions are given to force one mode and a reasonably large variance\n //to give some variation.\n length(mode(a))=1,\n variance(a)>8\n ],\n 250\n )", "templateType": "anything"}, "me": {"description": "", "group": "Ungrouped variables", "name": "me", "definition": "mean(a)", "templateType": "anything"}, "mo": {"description": "", "group": "Ungrouped variables", "name": "mo", "definition": "mode(a)[0]", "templateType": "anything"}, "a": {"description": "", "group": "Ungrouped variables", "name": "a", "definition": "dat[0]", "templateType": "anything"}, "md": {"description": "", "group": "Ungrouped variables", "name": "md", "definition": "median(a)", "templateType": "anything"}}, "metadata": {"description": "

Find the mean, median and mode of a list of 10 test scores.

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "functions": {"isnotalist": {"parameters": [["a", "list"]], "type": "boolean", "language": "javascript", "definition": "return !Array.isArray(a);"}}, "extensions": ["stats"], "name": "Mode, Median, Mean", "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}