// Numbas version: exam_results_page_options {"name": "5 number summary for sports science", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "5 number summary for sports science", "tags": [], "metadata": {"description": "
Given 32 datapoints in a table find their minimum, lower quartile, median, upper quartile, and maximum.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Below are the lengths (rounded to the nearest metre) thrown by $32$ javelin throwers in a competition.
\n$\\var{r0[0]}$ | \n$\\var{r0[1]}$ | \n$\\var{r0[2]}$ | \n$\\var{r0[3]}$ | \n$\\var{r0[4]}$ | \n$\\var{r0[5]}$ | \n$\\var{r0[6]}$ | \n$\\var{r0[7]}$ | \n$\\var{r0[8]}$ | \n$\\var{r0[9]}$ | \n$\\var{r0[10]}$ | \n$\\var{r0[11]}$ | \n$\\var{r0[12]}$ | \n$\\var{r0[13]}$ | \n$\\var{r0[14]}$ | \n$\\var{r0[15]}$ | \n
$\\var{r0[16]}$ | \n$\\var{r0[17]}$ | \n$\\var{r0[18]}$ | \n$\\var{r0[19]}$ | \n$\\var{r0[20]}$ | \n$\\var{r0[21]}$ | \n$\\var{r0[22]}$ | \n$\\var{r0[23]}$ | \n$\\var{r0[24]}$ | \n$\\var{r0[25]}$ | \n$\\var{r0[26]}$ | \n$\\var{r0[27]}$ | \n$\\var{r0[28]}$ | \n$\\var{r0[29]}$ | \n$\\var{r0[30]}$ | \n$\\var{r0[31]}$ | \n
If we sort the data in increasing order we get the following table:
\n$\\var{r1[0]}$ | \n$\\var{r1[1]}$ | \n$\\var{r1[2]}$ | \n$\\var{r1[3]}$ | \n$\\var{r1[4]}$ | \n$\\var{r1[5]}$ | \n$\\var{r1[6]}$ | \n$\\var{r1[7]}$ | \n$\\var{r1[8]}$ | \n$\\var{r1[9]}$ | \n$\\var{r1[10]}$ | \n$\\var{r1[11]}$ | \n$\\var{r1[12]}$ | \n$\\var{r1[13]}$ | \n$\\var{r1[14]}$ | \n$\\var{r1[15]}$ | \n
$\\var{r1[16]}$ | \n$\\var{r1[17]}$ | \n$\\var{r1[18]}$ | \n$\\var{r1[19]}$ | \n$\\var{r1[20]}$ | \n$\\var{r1[21]}$ | \n$\\var{r1[22]}$ | \n$\\var{r1[23]}$ | \n$\\var{r1[24]}$ | \n$\\var{r1[25]}$ | \n$\\var{r1[26]}$ | \n$\\var{r1[27]}$ | \n$\\var{r1[28]}$ | \n$\\var{r1[29]}$ | \n$\\var{r1[30]}$ | \n$\\var{r1[31]}$ | \n
Denote the ordered data by $x_j$, thus $x_{10}=\\var{r1[9]}$ for example.
\nMinimum value: The minimum value is $x_1=\\var{r1[0]}$.
\nLower Quartile: As there is an even number of values, the Lower Quartile will lie between two values. Its position is calculated by finding
\n\\[\\frac{n+1}{4}=\\frac{\\var{n+1}}{4}=8\\frac{1}{4}.\\]
\nHence the lower quartile lies a quarter of the way between the $8$th and $9$th entries in the ordered table. We need to find the difference between the entries in $8$th and $9$th place, quarter it, and add this back onto the $8$th entry.
\n\\[x_9 - x_8 = \\var{r1[8]}-\\var{r1[7]}=\\var{r1[8]-r1[7]}.\\]
\n\\[0.25\\times\\var{r1[8]-r1[7]}=\\var{lquartile-r1[7]}.\\]
\n\\[\\var{lquartile-r1[7]}+x_8 = \\var{lquartile-r1[7]}+\\var{r1[7]} = \\var{lquartile}.\\]
\nMedian: The position of the median in the table is given by
\n\\[ \\frac{2(n+1)}{4} = \\frac{\\var{2*(n+1)}}{4} = 16 \\frac{1}{2}.\\]
\nThe median lies halfway between the $16$th and $17$th entries in the ordered table and is given by:
\n\\[0.5\\times x_{16}+0.5\\times x_{17} = 0.5\\times\\var{r1[15]}+0.5\\times \\var{r1[16]}=\\var{median}.\\]
\nUpper Quartile: As there is an even number of values, the Upper Quartile will lie between two values. Its position is calculated by finding
\n\\[\\frac{3(n+1)}{4}=\\frac{\\var{3*(n+1)}}{4}=24\\frac{3}{4}.\\]
\nHence the upper quartile lies three quarters of the way between the $24$th and $25$th entries in the ordered table. We need to find the difference between the entries in $24$th and $25$th place, find three quarters of this value, and add this back onto the $24$th entry.
\n\\[x_{25} - x_{24} = \\var{r1[24]}-\\var{r1[23]}=\\var{r1[24]-r1[23]}.\\]
\n\\[0.75\\times\\var{r1[24]-r1[23]}=\\var{uquartile-r1[23]}.\\]
\n\\[\\var{uquartile-r1[23]}+x_{24} = \\var{uquartile-r1[23]}+\\var{r1[23]} = \\var{uquartile}.\\]
\nMaximum value: The maximum value is $x_{32}=\\var{r1[31]}$.
\nThe interquartile range is defined to be
\n\\[ \\text{upper quartile} – \\text{lower quartile} \\]
\nand so in this case we have:
\n\\[ \\text{interquartile range} = \\var{uquartile}-\\var{lquartile}=\\var{uquartile-lquartile}. \\]
\nThe range is defined to be
\n\\[ \\text{maximum} – \\text{minimum} \\]
\nand so in this case we have:
\n\\[ \\text{range} = \\var{r1[31]}-\\var{r1[0]}=\\var{range}. \\]
", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "extensions": ["stats"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"sig": {"name": "sig", "group": "Ungrouped variables", "definition": "random(3..9)", "description": "", "templateType": "anything", "can_override": false}, "var": {"name": "var", "group": "Ungrouped variables", "definition": "variance(r0,true)", "description": "", "templateType": "anything", "can_override": false}, "mean": {"name": "mean", "group": "Ungrouped variables", "definition": "mean(r0)", "description": "", "templateType": "anything", "can_override": false}, "guess4": {"name": "guess4", "group": "Ungrouped variables", "definition": "round(7*guess1/4)", "description": "", "templateType": "anything", "can_override": false}, "r0": {"name": "r0", "group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu,sig)),32)", "description": "", "templateType": "anything", "can_override": false}, "mu": {"name": "mu", "group": "Ungrouped variables", "definition": "random(65..71)", "description": "", "templateType": "anything", "can_override": false}, "sd": {"name": "sd", "group": "Ungrouped variables", "definition": "stdev(r0,true)", "description": "", "templateType": "anything", "can_override": false}, "stdev": {"name": "stdev", "group": "Ungrouped variables", "definition": "precround(stdev(r0,true),2)", "description": "", "templateType": "anything", "can_override": false}, "lquartile": {"name": "lquartile", "group": "Ungrouped variables", "definition": "0.75*r1[7]+0.25*r1[8]", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "32", "description": "", "templateType": "anything", "can_override": false}, "guess3": {"name": "guess3", "group": "Ungrouped variables", "definition": "round(guess1/2)", "description": "", "templateType": "anything", "can_override": false}, "r1": {"name": "r1", "group": "Ungrouped variables", "definition": "sort(r0)", "description": "", "templateType": "anything", "can_override": false}, "median": {"name": "median", "group": "Ungrouped variables", "definition": "0.5*(r1[15]+r1[16])", "description": "", "templateType": "anything", "can_override": false}, "range": {"name": "range", "group": "Ungrouped variables", "definition": "r1[31]-r1[0]", "description": "", "templateType": "anything", "can_override": false}, "uquartile": {"name": "uquartile", "group": "Ungrouped variables", "definition": "0.25*r1[23]+0.75*r1[24]", "description": "", "templateType": "anything", "can_override": false}, "guess2": {"name": "guess2", "group": "Ungrouped variables", "definition": "round(guess1/4)", "description": "", "templateType": "anything", "can_override": false}, "guess1": {"name": "guess1", "group": "Ungrouped variables", "definition": "round((r1[31]-r1[0])/4)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["guess3", "guess2", "guess1", "r0", "r1", "guess4", "mean", "median", "n", "mu", "lquartile", "sig", "stdev", "var", "uquartile", "sd", "range"], "variable_groups": [], "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": "Complete the following table using the data given.
\nMinimum | \nLower Quartile | \nMedian | \nUpper Quartile | \nMaximum | \n
---|---|---|---|---|
[[0]] | \n[[1]] | \n[[2]] | \n[[3]] | \n[[4]] | \n
Enter the interquartile range: [[0]]
", "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": "{uquartile-lquartile}", "maxValue": "{uquartile-lquartile}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"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": "Enter the range: [[0]]
", "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": "{range}", "maxValue": "{range}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "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": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Tom Lowe", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/9601/"}, {"name": "Pete Philipson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/13881/"}]}]}], "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": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Tom Lowe", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/9601/"}, {"name": "Pete Philipson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/13881/"}]}