// Numbas version: exam_results_page_options {"name": "Estimate the mean and find the modal class for grouped data", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "

Fill in a frequency table for grouped data, then estimate the mean and identify the modal class.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "preamble": {"css": "", "js": ""}, "advice": "

a)

\n

We calculate the midpoint by finding the mean of the lower and upper bounds. For example, the midpoint for $40 \\leq a \\lt 50$ is

\n

\\[\\begin{align} \\displaystyle \\frac{40 + 50}{2} &= \\frac{90}{2} \\\\&= 45 \\text{.} \\end{align}\\]

\n

To calculate the final column, we multiply the second and the third columns:

\n

\\[\\var{freq[4]} \\times 45 = \\var{45*freq[4]} \\text{.} \\]

\n

Finally, when we have completed all the other values, we can calculate the total for the last column.

\n

\\[\\begin{align} \\text{Total} &= 5\\times\\var{freq[0]} + 15\\times\\var{freq[1]} + 25\\times\\var{freq[2]} + 35\\times\\var{freq[3]} + 45\\times\\var{freq[4]} + 55\\times\\var{freq[5]} + 65\\times\\var{freq[6]} + 75\\times\\var{freq[7]} + 85\\times\\var{freq[8]} + 95\\times\\var{freq[9]} \\\\&= \\var{5*freq[0]} + \\var{15*freq[1]} + \\var{25*freq[2]} + \\var{35*freq[3]} + \\var{45*freq[4]} + \\var{55*freq[5]} + \\var{65*freq[6]} + \\var{75*freq[7]} + \\var{85*freq[8]} + \\var{95*freq[9]}  \\\\&= \\var{freq_midpoint} \\text{.} \\end{align}\\]

\n

The completed frequency table looks like this:

\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\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
Stage 1 grade $a$FrequencyMidpointFrequency $\\times$ Midpoint
$0 \\leq a \\lt 10$$\\var{freq[0]}$$5$$\\var{5*freq[0]}$
$10 \\leq a \\lt 20$$\\var{freq[1]}$$15$$\\var{15*freq[1]}$
$20 \\leq a \\lt 30$$\\var{freq[2]}$$25$$\\var{25*freq[2]}$
$30 \\leq a \\lt 40$$\\var{freq[3]}$$35$$\\var{35*freq[3]}$
$40 \\leq a \\lt 50$$\\var{freq[4]}$$45$$\\var{45*freq[4]}$
$50 \\leq a \\lt 60$$\\var{freq[5]}$$55$$\\var{55*freq[5]}$
$60 \\leq a \\lt 70$$\\var{freq[6]}$$65$$\\var{65*freq[6]}$
$70 \\leq a \\lt 80$$\\var{freq[7]}$$75$$\\var{75*freq[7]}$
$80 \\leq a \\lt 90$$\\var{freq[8]}$$85$$\\var{85*freq[8]}$
$90 \\leq a \\lt 100$$\\var{freq[9]}$$95$$\\var{95*freq[9]}$
Totals$\\var{sum(freq)}$$\\var{freq_midpoint}$
\n

 

\n

b)

\n

We don't know exactly how much each student got, so we have to assume all students got the midpoint of their group. To estimate the sum of all student grades in a particular interval, we can multiply the interval's midpoint by its frequency.

\n

The sum of all the grades in the class is the sum of the estimates for each interval. We've already calculated this in the table above.

\n

So the estimate for the mean, $\\bar{a}$, is as follows:

\n

\\begin{align}
\\bar{a} &\\approx \\frac{\\var{freq_midpoint}}{\\var{sum(freq)}} \\\\
&= \\var{freq_midpoint/sum(freq)} \\text{.}
\\end{align}

\n

Rounding the mean to 2 decimal places, we get $\\var{precround(freq_midpoint/sum(freq),2)}$.

\n

c)

\n

The modal class is the interval with the highest frequency. In this case, the interval $50 \\leq a \\lt 60$ is the modal class.

", "rulesets": {}, "extensions": ["stats"], "name": "Estimate the mean and find the modal class for grouped data", "ungrouped_variables": ["freq", "freq_midpoint", "sixty", "seventy"], "functions": {}, "tags": ["estimate the mean", "grouped data", "intervals", "modal class", "taxonomy"], "variablesTest": {"condition": "", "maxRuns": 100}, "variable_groups": [], "variables": {"freq_midpoint": {"name": "freq_midpoint", "definition": "5*freq[0] + 15*freq[1] + 25*freq[2] + 35*freq[3] + 45*freq[4] + 55*freq[5] + 65*freq[6] + 75*freq[7] + 85*freq[8] + 95*freq[9]", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "freq": {"name": "freq", "definition": "repeat(random(0..8), 2) + random(0..4) + random(6..18) + random(20..40) + sixty + seventy + random(10..40) + random(0..6) + random(0..1)", "group": "Ungrouped variables", "description": "\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$0 \\leq a \\lt 10$0..8
$10 \\leq a \\lt 20$0..7
$20 \\leq a \\lt 30$0..4
$30 \\leq a \\lt 40$6..18
$40 \\leq a \\lt 50$20..50
$50 \\leq a \\lt 60$30..60\n

\n

\n
60 70
$70 \\leq a \\lt 80$10..40
$80 \\leq a \\lt 90$0..6
$90 \\leq a \\lt 100$0..1
\n

", "templateType": "anything"}, "sixty": {"name": "sixty", "definition": " random(40..85)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "seventy": {"name": "seventy", "definition": "random(35..sixty except sixty)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}}, "statement": "

$\\var{sum(freq)}$ Mathematics and Statistics students have finished their first year at Newcastle University.

", "parts": [{"type": "gapfill", "scripts": {}, "marks": 0, "variableReplacementStrategy": "originalfirst", "stepsPenalty": 0, "prompt": "

Their stage 1 grades (denoted $a$) have been summarised and grouped into intervals in the frequency table below. Complete the table.

\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\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
Stage 1 grade $a$FrequencyMidpointFrequency $\\times$ Midpoint
$0 \\leq a \\lt 10$$\\var{freq[0]}$[[0]][[10]]
$10 \\leq a \\lt 20$$\\var{freq[1]}$[[1]][[11]]
$20 \\leq a \\lt 30$$\\var{freq[2]}$[[2]][[12]]
$30 \\leq a \\lt 40$$\\var{freq[3]}$[[3]][[13]]
$40 \\leq a \\lt 50$$\\var{freq[4]}$[[4]][[14]]
$50 \\leq a \\lt 60$$\\var{freq[5]}$[[5]][[15]]
$60 \\leq a \\lt 70$$\\var{freq[6]}$[[6]][[16]]
$70 \\leq a \\lt 80$$\\var{freq[7]}$[[7]][[17]]
$80 \\leq a \\lt 90$$\\var{freq[8]}$[[8]][[18]]
$90 \\leq a \\lt 100$$\\var{freq[9]}$[[9]][[19]]
Totals$\\var{sum(freq)}$$-$[[20]]
", "showCorrectAnswer": true, "gaps": [{"maxValue": "5", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": "0.5", "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "5", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "15", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": "0.5", "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "15", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "25", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": "0.5", "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "25", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "35", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": "0.5", "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "35", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "45", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": "0.5", "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "45", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "55", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": "0.5", "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "55", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "65", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": "0.5", "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "65", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "75", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": "0.5", "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "75", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "85", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": "0.5", "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "85", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "95", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": "0.5", "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "95", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "5*freq[0]", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": 1, "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "5*freq[0]", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "15*freq[1]", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": 1, "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "15*freq[1]", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "25*freq[2]", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": 1, "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "25*freq[2]", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "35*freq[3]", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": 1, "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "35*freq[3]", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "45*freq[4]", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": 1, "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "45*freq[4]", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "55*freq[5]", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": 1, "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "55*freq[5]", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "65*freq[6]", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": 1, "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "65*freq[6]", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "75*freq[7]", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": 1, "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "75*freq[7]", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "85*freq[8]", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": 1, "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "85*freq[8]", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "95*freq[9]", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": 1, "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "95*freq[9]", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}, {"maxValue": "freq_midpoint", "showCorrectAnswer": true, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": 1, "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "freq_midpoint", "mustBeReduced": false, "variableReplacements": [], "correctAnswerFraction": false}], "showFeedbackIcon": true, "variableReplacements": [], "steps": [{"type": "information", "scripts": {}, "variableReplacementStrategy": "originalfirst", "marks": 0, "prompt": "

The midpoint of an interval is the mean of the upper and lower bounds.

", "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": []}]}, {"precision": "2", "type": "numberentry", "mustBeReducedPC": 0, "maxValue": "freq_midpoint/sum(freq)", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "minValue": "freq_midpoint/sum(freq)", "showCorrectAnswer": true, "correctAnswerFraction": false, "showPrecisionHint": true, "strictPrecision": false, "marks": "2", "precisionPartialCredit": 0, "precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "variableReplacementStrategy": "originalfirst", "scripts": {}, "mustBeReduced": false, "prompt": "

Now use the table to estimate the mean grade, $\\bar{a}$.

", "variableReplacements": [], "allowFractions": false}, {"type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "marks": 0, "prompt": "

From the choices below, choose the correct modal class for this data.

", "displayColumns": "5", "minMarks": 0, "distractors": ["", "", "", "", ""], "shuffleChoices": false, "scripts": {}, "variableReplacements": [], "displayType": "radiogroup", "choices": ["

$30 \\leq a \\lt 40$

", "

$40 \\leq a \\lt 50$

", "

$50 \\leq a \\lt 60$

", "

$60 \\leq a \\lt 70$

", "

$70 \\leq a \\lt 80$

"], "showCorrectAnswer": true, "showFeedbackIcon": true, "matrix": [0, 0, "2", "0", 0]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}