// Numbas version: finer_feedback_settings {"name": "SM05 Calculate the mean (Frequency table) - With a calculator", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "SM05 Calculate the mean (Frequency table) - With a calculator", "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Using a calculator, work out the mean for each of these frequency tables, give your answers to two decimal places.

", "advice": "

To calculate the mean shoe size we need to add a third column to our table where we multiply the grade by the number (frequency) of students who are that shoe size.

\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\n\n\n\n\n\n\n\n\n\n\n
Shoe SizeFrequencyShoe Size * Frequency
3{p1}3 * {p1} = {3*p1}
4{p2}4 * {p2} = {4*p2}
5{p3}5 * {p3} = {5*p3}
6{p4}6 * {p4} = {6*p4}
7{p5}7 * {p5} = {7*p5} 
8{p6}8 * {p6} = {8*p6}
\n

Now we find the total sum of that third column:

\n

$\\var{3*p1} + \\var{4*p2} + \\var{5*p3} + \\var{6*p4} + \\var{7*p5} + \\var{8*p6} = \\var{3*p1 + 4*p2 + 5*p3 + 6*p4 + 7*p5 + 8*p6}.$

\n

To find the mean shoe size we must divide this total by the total number of students:

\n

$\\frac{\\var{3*p1 + 4*p2 + 5*p3 + 6*p4 + 7*p5 + 8*p6}}{\\var{p1}+\\var{p2}+\\var{p3}+\\var{p4}+\\var{p5}+\\var{p6}} = \\frac{\\var{3*p1 + 4*p2 + 5*p3 + 6*p4 + 7*p5 + 8*p6}}{\\var{sum1}} = \\var{mean1a}.$ 

\n

The question asks us for our answer to two decimal places so the last thing we need to do is round. Hence, the mean is $\\var{mean1}$.

\n

You can use this same method to answer the other parts of this question!

\n

Use this link to find some resources which will help you revise this topic.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"mean1a": {"name": "mean1a", "group": "Part a", "definition": "((3*p1)+(4*p2)+(5*p3)+(6*p4)+(7*p5)+(8*p6))/sum1", "description": "

The mean - part a

", "templateType": "anything", "can_override": false}, "p1": {"name": "p1", "group": "Part a", "definition": "random(0 .. 50#1)", "description": "

Frequency 1 - part a

", "templateType": "randrange", "can_override": false}, "p2": {"name": "p2", "group": "Part a", "definition": "random(0 .. 50#1)", "description": "

Frequency 2 - part a

", "templateType": "randrange", "can_override": false}, "p3": {"name": "p3", "group": "Part a", "definition": "random(0 .. 50#1)", "description": "

Frequency 3 - part a

", "templateType": "randrange", "can_override": false}, "p4": {"name": "p4", "group": "Part a", "definition": "random(0 .. 50#1)", "description": "

Frequency 4 - part a

", "templateType": "randrange", "can_override": false}, "p5": {"name": "p5", "group": "Part a", "definition": "random(0 .. 50#1)", "description": "

Frequency 5 - part a

", "templateType": "randrange", "can_override": false}, "p6": {"name": "p6", "group": "Part a", "definition": "random(0 .. 50#1)", "description": "

Frequency 6 - part a

", "templateType": "randrange", "can_override": false}, "mean1": {"name": "mean1", "group": "Part a", "definition": "precround(mean1a,2)", "description": "

Mean rounded to two decimal places - part a

", "templateType": "anything", "can_override": false}, "sum1": {"name": "sum1", "group": "Part a", "definition": "p1+p2+p3+p4+p5+p6", "description": "

Sum of frequencies - part a

", "templateType": "anything", "can_override": false}, "sum2": {"name": "sum2", "group": "Part b", "definition": "p1b+p2b+p3b+p4b", "description": "

Sum of frequencies - part b

", "templateType": "anything", "can_override": false}, "p1b": {"name": "p1b", "group": "Part b", "definition": "random(1 .. 100#1)", "description": "

Frequency 1 - part b

", "templateType": "randrange", "can_override": false}, "p2b": {"name": "p2b", "group": "Part b", "definition": "random(1 .. 100#1)", "description": "

Frequency 2 - part b

", "templateType": "randrange", "can_override": false}, "p3b": {"name": "p3b", "group": "Part b", "definition": "random(1 .. 100#1)", "description": "

Frequency 3 - part b

", "templateType": "randrange", "can_override": false}, "p4b": {"name": "p4b", "group": "Part b", "definition": "random(1 .. 100#1)", "description": "

Frequency 4 - part b

", "templateType": "randrange", "can_override": false}, "mean2a": {"name": "mean2a", "group": "Part b", "definition": "((0*p1b)+(1*p2b)+(2*p3b)+(3*p4b))/sum2", "description": "

The mean - part b

", "templateType": "anything", "can_override": false}, "mean2": {"name": "mean2", "group": "Part b", "definition": "precround(mean2a,2)", "description": "

Mean rounded to two decimal places - part b

", "templateType": "anything", "can_override": false}, "p1c": {"name": "p1c", "group": "Part c", "definition": "random(1 .. 70#1)", "description": "

Frequency 1 - part c

", "templateType": "randrange", "can_override": false}, "p2c": {"name": "p2c", "group": "Part c", "definition": "random(1 .. 70#1)", "description": "

Frequency 2 - part c

", "templateType": "randrange", "can_override": false}, "p3c": {"name": "p3c", "group": "Part c", "definition": "random(1 .. 70#1)", "description": "

Frequency 3 - part c

", "templateType": "randrange", "can_override": false}, "p4c": {"name": "p4c", "group": "Part c", "definition": "random(1 .. 70#1)", "description": "

Frequency 4 - part c

", "templateType": "randrange", "can_override": false}, "p5c": {"name": "p5c", "group": "Part c", "definition": "random(1 .. 70#1)", "description": "

Frequency 5 - part c

", "templateType": "randrange", "can_override": false}, "p6c": {"name": "p6c", "group": "Part c", "definition": "random(1 .. 70#1)", "description": "

Frequency 6 - part c

", "templateType": "randrange", "can_override": false}, "mean3": {"name": "mean3", "group": "Part c", "definition": "precround(mean3a,2)", "description": "

Mean rounded to two decimal places - part c

", "templateType": "anything", "can_override": false}, "sum3": {"name": "sum3", "group": "Part c", "definition": "p1c+p2c+p3c+p4c+p5c+p6c", "description": "

Sum of frequencies - part c

", "templateType": "anything", "can_override": false}, "mean3a": {"name": "mean3a", "group": "Part c", "definition": "((0*p1c)+(1*p2c)+(2*p3c)+(3*p4c)+(4*p5c)+(5*p6c))/sum3", "description": "

The mean - part c

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Part a", "variables": ["mean1", "mean1a", "p1", "p2", "p3", "p4", "p5", "p6", "sum1"]}, {"name": "Part b", "variables": ["mean2", "mean2a", "p1b", "p2b", "p3b", "p4b", "sum2"]}, {"name": "Part c", "variables": ["mean3a", "mean3", "p1c", "p2c", "p3c", "p4c", "p5c", "p6c", "sum3"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "a)", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

The table below shows the distribution of shoe sizes amongst {sum1} students at a school in Sheffield. 

\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\n\n\n\n
Shoe sizeFrequency
3{p1}
4{p2}
5{p3}
6{p4}
7{p5}
8{p6}
\n

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

The table below shows the distribution of number of pets that {sum2} randomly asked people have.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Number of PetsFrequency
0{p1b}
1{p2b}
2{p3b}
3{p4b}
", "minValue": "mean2", "maxValue": "mean2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "c)", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

The table below shows the distribution of the number of drinks per order at a coffee shop in Manchester. 

\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\n\n\n\n
Number of DrinksFrequency
0{p1c}
1{p2c}
2{p3c}
3{p4c}
4{p5c}
5{p6c}
", "minValue": "mean3", "maxValue": "mean3", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/496/"}, {"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4679/"}, {"name": "Marta Emmett", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/11961/"}, {"name": "Will Morgan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21933/"}, {"name": "Megan Oliver", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/23526/"}], "resources": []}]}], "contributors": [{"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/496/"}, {"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4679/"}, {"name": "Marta Emmett", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/11961/"}, {"name": "Will Morgan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21933/"}, {"name": "Megan Oliver", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/23526/"}]}