// 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}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"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) Kate (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]}$ $\\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

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

", "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "unitTests": [], "variableReplacements": []}], "ungrouped_variables": ["meanab", "meana", "modea", "mediana", "meanb", "modeb", "medianb", "rangea", "rangeb", "suma", "sumb"], "functions": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

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

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

", "tags": [], "preamble": {"js": "", "css": ""}, "type": "question", "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": "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": "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/"}]}