// Numbas version: exam_results_page_options {"name": "Measures of central tendency from a list 2", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Measures of central tendency from a list 2", "tags": [], "metadata": {"description": "

Given two distributions, calculate the measures of average and spread and make some decisions based on the results.

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

There is subtle variation from one step to the next when you walk. When the neuromuscular control of walking deteriorates due to ageing or neurological disease, steps become less consistent. Two people were each asked to walk $10$ steps and the lengths of each of their steps have been recorded in the following 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
Sally (cm)$\\var{a[0]}$$\\var{a[1]}$$\\var{a[2]}$$\\var{a[3]}$$\\var{a[4]}$$\\var{a[5]}$$\\var{a[6]}$$\\var{a[7]}$$\\var{a[8]}$$\\var{a[9]}$
Kate (cm)$\\var{b[0]}$$\\var{b[1]}$$\\var{b[2]}$$\\var{b[3]}$$\\var{b[4]}$$\\var{b[5]}$$\\var{b[6]}$$\\var{b[7]}$$\\var{b[8]}$$\\var{b[9]}$
\n

", "advice": "

We denote Sally as $s$ and Kate as $k$.

\n

a)

\n

We are going to start with completing the column for Sally.

\n

First, we need to find the sum of the step lengths:

\n

\\[\\begin{align}  \\sum s &= \\var{a[0]} + \\var{a[1]} + \\var{a[2]} + \\var{a[3]} + \\var{a[4]} + \\var{a[5]} + \\var{a[6]} + \\var{a[7]} + \\var{a[8]} + \\var{a[9]}   \\\\&= \\var{suma} \\text{.}
\\end{align}\\]

\n

The total number of measurements $n$ is $10$.

\n

Therefore the mean is

\n

\\[ \\begin{align} \\overline{s} &= \\frac{\\sum s}{n} \\\\[3pt]&= \\frac{\\var{suma}}{10} \\\\&= \\var{meana} \\text{.} \\end{align}\\]

\n

 

\n

The median is the middle value. We need to sort the list in order:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Sally (cm)$\\var{asort[0]}$$\\var{asort[1]}$$\\var{asort[2]}$$\\var{asort[3]}$$\\var{asort[4]}$$\\var{asort[5]}$$\\var{asort[6]}$$\\var{asort[7]}$$\\var{asort[8]}$$\\var{asort[9]}$
\n

To find the middle position within a data set, we take the sample size, add $1$, then divide by $2$. For our data set, the middle position is

\n

$\\displaystyle\\frac{n+1}{2}=\\frac{10+1}{2}=5.5.$

\n

As there is not actually a $5.5$th position, we need to find the mean of the $5$th and $6$th values:

\n

\\[ \\displaystyle \\begin{align} \\frac{\\var{asort[4]} + \\var{asort[5]}}{2} &=  \\frac{\\var{asort[4] + asort[5]}}{2} \\\\&= \\var{mediana} \\text{.} \\end{align}\\]

\n

 

\n

The mode is the value that occurs the most often in the data.

\n

To find a mode, we can look at our sorted list:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Sally (cm)$\\var{asort[0]}$$\\var{asort[1]}$$\\var{asort[2]}$$\\var{asort[3]}$$\\var{asort[4]}$$\\var{asort[5]}$$\\var{asort[6]}$$\\var{asort[7]}$$\\var{asort[8]}$$\\var{asort[9]}$
\n

We notice that $\\var{modea}$ occurs the most times and so $\\var{modea}$ is the mode.

\n

 

\n

The range is the difference between the highest and the lowest value in the data.

\n

To find this, we subtract the lowest value from the highest value:

\n

\\[ \\var{max(a)} - \\var{min(a)} = \\var{rangea} \\text{.}\\]

\n

 

\n

So the first column is

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Sally (cm)
Mean length$\\var{meana}$
Median length$\\var{mediana}$
Modal length$\\var{modea}$
Range$\\var{rangea}$
\n

 

\n

Similarly for Kate,

\n

\\[\\begin{align}  \\sum k &= \\var{b[0]} + \\var{b[1]} + \\var{b[2]} + \\var{b[3]} + \\var{b[4]} + \\var{b[5]} + \\var{b[6]} + \\var{b[7]} + \\var{b[8]} + \\var{b[9]}   \\\\&= \\var{sumb} \\text{.}
\\end{align}\\]

\n

The total number of measurements $n$ is $10$ again.

\n

Therefore the mean is

\n

\\[ \\begin{align} \\overline{k} &= \\frac{\\sum k}{n} \\\\[3pt]&= \\frac{\\var{sumb}}{10} \\\\&= \\var{meanb} \\text{.} \\end{align}\\]

\n

 

\n

For median, we sort the list in order:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Kate (cm)$\\var{bsort[0]}$$\\var{bsort[1]}$$\\var{bsort[2]}$$\\var{bsort[3]}$$\\var{bsort[4]}$$\\var{bsort[5]}$$\\var{bsort[6]}$$\\var{bsort[7]}$$\\var{bsort[8]}$$\\var{bsort[9]}$
\n

Agin, we need to find the mean of the $5$th and $6$th values:

\n

\\[ \\displaystyle \\begin{align} \\frac{\\var{bsort[4]} + \\var{bsort[5]}}{2} &=  \\frac{\\var{bsort[4] + bsort[5]}}{2} \\\\&= \\var{medianb} \\text{.} \\end{align}\\]

\n

 

\n

For mode, we look at our sorted list:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Kate (cm)$\\var{bsort[0]}$$\\var{bsort[1]}$$\\var{bsort[2]}$$\\var{bsort[3]}$$\\var{bsort[4]}$$\\var{bsort[5]}$$\\var{bsort[6]}$$\\var{bsort[7]}$$\\var{bsort[8]}$$\\var{bsort[9]}$
\n

We notice that $\\var{modeb}$ occurs the most times and so $\\var{modeb}$ is the mode.

\n

 

\n

To find the range, we subtract the lowest value from the highest value:

\n

\\[ \\var{max(b)} - \\var{min(b)} = \\var{rangeb} \\text{.}\\]

\n

 

\n

So the complete table is\u200b

\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
Sally (cm)Kate (cm)
Mean length$\\var{meana}$$\\var{meanb}$
Median length$\\var{mediana}$$\\var{medianb}$
Modal length$\\var{modea}$$\\var{modeb}$
Range$\\var{rangea}$$\\var{rangeb}$
\n

\n

b)

\n

Kate is the correct answer, because she has a larger range of values, therefore her step length is less consistent.

", "rulesets": {}, "extensions": ["stats"], "variables": {"b7": {"name": "b7", "group": "B", "definition": "meanab - 3", "description": "", "templateType": "anything"}, "a2": {"name": "a2", "group": "A", "definition": "meanab - 1 - random2", "description": "", "templateType": "anything"}, "random": {"name": "random", "group": "B", "definition": "random(2..10 #2)", "description": "", "templateType": "anything"}, "a8": {"name": "a8", "group": "A", "definition": "meanab + 1", "description": "", "templateType": "anything"}, "a10": {"name": "a10", "group": "A", "definition": "meanab + 2 + random2", "description": "", "templateType": "anything"}, "b1": {"name": "b1", "group": "B", "definition": "meanab - random-3", "description": "", "templateType": "anything"}, "b9": {"name": "b9", "group": "B", "definition": "meanab + round(random/2.0)", "description": "", "templateType": "anything"}, "modeb": {"name": "modeb", "group": "Ungrouped variables", "definition": "mode(b)[0]", "description": "", "templateType": "anything"}, "random2": {"name": "random2", "group": "A", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "medianb": {"name": "medianb", "group": "Ungrouped variables", "definition": "median(b)", "description": "", "templateType": "anything"}, "rangeb": {"name": "rangeb", "group": "Ungrouped variables", "definition": "max(b) - min(b)", "description": "", "templateType": "anything"}, "modea": {"name": "modea", "group": "Ungrouped variables", "definition": "mode(a)[0]", "description": "", "templateType": "anything"}, "b3": {"name": "b3", "group": "B", "definition": "meanab - 2", "description": "", "templateType": "anything"}, "mediana": {"name": "mediana", "group": "Ungrouped variables", "definition": "median(a)", "description": "", "templateType": "anything"}, "bsort": {"name": "bsort", "group": "B", "definition": "sort(b)", "description": "", "templateType": "anything"}, "alist": {"name": "alist", "group": "A", "definition": "[a1,a2,a3,a4,a5,a6,a7,a8,a9,a10]", "description": "", "templateType": "anything"}, "a3": {"name": "a3", "group": "A", "definition": "meanab - 2", "description": "", "templateType": "anything"}, "meanab": {"name": "meanab", "group": "Ungrouped variables", "definition": "random(57..64)", "description": "", "templateType": "anything"}, "b6": {"name": "b6", "group": "B", "definition": "meanab - 6", "description": "", "templateType": "anything"}, "rangea": {"name": "rangea", "group": "Ungrouped variables", "definition": "max(a) - min(a)", "description": "", "templateType": "anything"}, "a7": {"name": "a7", "group": "A", "definition": "meanab + 1", "description": "", "templateType": "anything"}, "asort": {"name": "asort", "group": "A", "definition": "sort(a)", "description": "", "templateType": "anything"}, "meana": {"name": "meana", "group": "Ungrouped variables", "definition": "(a1 + a2 + a3 + a4 + a5+ a6 + a7 + a8 + a9 + a10)/10", "description": "", "templateType": "anything"}, "b8": {"name": "b8", "group": "B", "definition": "meanab +6", "description": "", "templateType": "anything"}, "a6": {"name": "a6", "group": "A", "definition": "meanab", "description": "", "templateType": "anything"}, "blist": {"name": "blist", "group": "B", "definition": "[b1,b2,b3,b4,b5,b6,b7,b8,b9,b10]", "description": "", "templateType": "anything"}, "a4": {"name": "a4", "group": "A", "definition": "meanab", "description": "", "templateType": "anything"}, "b5": {"name": "b5", "group": "B", "definition": "meanab - 8 ", "description": "", "templateType": "anything"}, "a9": {"name": "a9", "group": "A", "definition": "meanab + 1 + random2", "description": "", "templateType": "anything"}, "b4": {"name": "b4", "group": "B", "definition": "meanab - 10", "description": "", "templateType": "anything"}, "sumb": {"name": "sumb", "group": "Ungrouped variables", "definition": "sum(b)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "A", "definition": "shuffle(alist)", "description": "", "templateType": "anything"}, "b10": {"name": "b10", "group": "B", "definition": "meanab + round(random/2.0)", "description": "", "templateType": "anything"}, "b2": {"name": "b2", "group": "B", "definition": "meanab ", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "B", "definition": "shuffle(blist)", "description": "", "templateType": "anything"}, "suma": {"name": "suma", "group": "Ungrouped variables", "definition": "sum(a)", "description": "", "templateType": "anything"}, "meanb": {"name": "meanb", "group": "Ungrouped variables", "definition": "(b1+b2+b3+b4+b5+b6+b7+b8+b9+b10)/10", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "A", "definition": "meanab - 2 - random2", "description": "", "templateType": "anything"}, "a5": {"name": "a5", "group": "A", "definition": "meanab", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "\n", "maxRuns": 100}, "ungrouped_variables": ["meanab", "meana", "modea", "mediana", "meanb", "modeb", "medianb", "rangea", "rangeb", "suma", "sumb"], "variable_groups": [{"name": "A", "variables": ["random2", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "alist", "a", "asort"]}, {"name": "B", "variables": ["random", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "b10", "blist", "b", "bsort"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "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": "

Using the data above, fill in the following table, entering numbers with decimal places if required.

\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
Sally (cm)Kate (cm)
Mean length[[0]][[1]]
Median length[[2]][[3]]
Modal length[[4]][[5]]
Range[[6]][[7]]
\n

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "meana", "maxValue": "meana", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "meanb", "maxValue": "meanb", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "mediana", "maxValue": "mediana", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "medianb", "maxValue": "medianb", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "modea", "maxValue": "modea", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "modeb", "maxValue": "modeb", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "rangea", "maxValue": "rangea", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "rangeb", "maxValue": "rangeb", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Vicky Hall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/659/"}, {"name": "George Stagg", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/930/"}, {"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}, {"name": "Lauren Frances Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2490/"}]}]}], "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Vicky Hall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/659/"}, {"name": "George Stagg", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/930/"}, {"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}, {"name": "Lauren Frances Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2490/"}]}