// Numbas version: finer_feedback_settings {"name": "PRAC Averages (frequency table)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "PRAC Averages (frequency table)", "tags": [], "metadata": {"description": "

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Use the frequency table below to calculate mean, median and and mode.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Class012345
Frequency{f1}{f2}{f3}{f4}{f5}{f6}
", "advice": "

See \"show steps\" within this question for more help.

", "rulesets": {}, "extensions": [], "variables": {"f1": {"name": "f1", "group": "Frequencies", "definition": "random(5..20)", "description": "", "templateType": "anything"}, "f2": {"name": "f2", "group": "Frequencies", "definition": "f1+a", "description": "", "templateType": "anything"}, "f3": {"name": "f3", "group": "Frequencies", "definition": "f1-1", "description": "", "templateType": "anything"}, "f4": {"name": "f4", "group": "Frequencies", "definition": "f1-a", "description": "", "templateType": "anything"}, "f5": {"name": "f5", "group": "Frequencies", "definition": "f1-b", "description": "", "templateType": "anything"}, "f6": {"name": "f6", "group": "Frequencies", "definition": "a", "description": "", "templateType": "anything"}, "mp5": {"name": "mp5", "group": "Median calculations", "definition": "tot/2", "description": "", "templateType": "anything"}, "tot": {"name": "tot", "group": "Cumulative", "definition": "cf5+f6", "description": "", "templateType": "anything"}, "sfx": {"name": "sfx", "group": "Mean calculations", "definition": "0*f1+1*f2+2*f3+3*f4+4*f5+5*f6", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "Median calculations", "definition": "switch(f1mp5,0)", "description": "", "templateType": "anything"}, "a3": {"name": "a3", "group": "Median calculations", "definition": "switch(cf3mp5,0)", "description": "", "templateType": "anything"}, "a2": {"name": "a2", "group": "Median calculations", "definition": "switch(cf2mp5,0)", "description": "", "templateType": "anything"}, "a5": {"name": "a5", "group": "Median calculations", "definition": "switch(cf5mp5,0)", "description": "", "templateType": "anything"}, "a4": {"name": "a4", "group": "Median calculations", "definition": "switch(cf4mp5,0)", "description": "", "templateType": "anything"}, "cf4": {"name": "cf4", "group": "Cumulative", "definition": "cf3+f4", "description": "", "templateType": "anything"}, "cf5": {"name": "cf5", "group": "Cumulative", "definition": "cf4+f5", "description": "", "templateType": "anything"}, "cf2": {"name": "cf2", "group": "Cumulative", "definition": "f1+f2", "description": "", "templateType": "anything"}, "cf3": {"name": "cf3", "group": "Cumulative", "definition": "cf2+f3", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..f1-1)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(a..f1)", "description": "", "templateType": "anything"}, "mn": {"name": "mn", "group": "Mean calculations", "definition": "sfx/tot", "description": "", "templateType": "anything"}, "median": {"name": "median", "group": "Median calculations", "definition": "a1+a2+a3+a4+a5", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b"], "variable_groups": [{"name": "Frequencies", "variables": ["f1", "f2", "f3", "f4", "f5", "f6"]}, {"name": "Cumulative", "variables": ["cf2", "cf3", "cf4", "cf5", "tot"]}, {"name": "Median calculations", "variables": ["a1", "a2", "a3", "a4", "a5", "mp5", "median"]}, {"name": "Mean calculations", "variables": ["sfx", "mn"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is the mean value (correct to 2 decimal places)?

", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

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

\n

In other words $\\frac{(0\\times\\var{f1})+(1\\times \\var{f2})+(2\\times\\var{f3})+(3\\times\\var{f4}) +(4\\times\\var{f5})+(5\\times\\var{f6})}{\\var{f1}+\\var{f2}+\\var{f3}+\\var{f4}+\\var{f5}+\\var{f6}}$

"}], "answer": "{mn}", "showPreview": false, "checkingType": "dp", "checkingAccuracy": "2", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": []}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is the median value?

", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

The median is the \"middle\" value. 

\n

In a frequency table, the observations are already arranged in an ascending order. We can obtain the median by looking for the value in the middle position.

\n

First add up the frequencies to find $n$.

\n

Case 1. When the sum of the frequencies is odd, then the median is the value at the $\\frac{n+1}{2}^{th}$ position.
Case 2. When the sum of the frequencies is even, then the median is the average of values at the positions $\\frac{n}{2}^{th}$ and $\\frac{n+1}{2}^{th}$.

\n


We need to add up the frequencies until we reach this value and then the class we land in is the median.

"}], "minValue": "{median}", "maxValue": "{median}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is the mode? (If there is no mode, enter \"0\".)

", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

The mode is the number which occurs most often. In other words the class with the  highest frequency.

"}], "minValue": "1", "maxValue": "1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Yvonne Wancke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3703/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Yvonne Wancke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3703/"}]}