// Numbas version: finer_feedback_settings {"name": "Summary Statistics", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Summary Statistics", "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

In this question you will be asked to calculate a number of basic summary statistics for the following sample of $\\var{m}$ values. I.e., remember to use the correct formula for the variance.

\n

\\[ \\var{biglist}\\]

", "advice": "

Mean:

\n

The mean is calculated using the formula

\n

\\[ \\bar{x} = \\frac{1}{n}\\sum_{i=1}^n x_i .\\]

\n

This gives the value of $\\var{mean}$.

\n

Median:

\n

The list in ascending order is

\n

\\[ \\var{sorted}.\\]

\n

So the median is $\\var{median}$.

\n

Mode:

\n

The mode is the most frequently occuring value: $\\var{mode}$. The frequencies are displayed below.

\n

$\\var{frequencies}$

\n

(There is a possibility that this sample may multiple modes, so don't worry too much if it marks the answer wrong.)

\n

Variance:

\n

The formula for a sample variance is

\n

\\[s^2 = \\frac{1}{n-1}\\sum_{i=1}^n (\\bar{x} - x_i)^2.\\]

\n

This gives the value of $\\var{vardp}$.

\n

Standard Deviation:

\n

The sample standard deviation is the positive square root of the sample variance, which is calculated here as $s = \\sqrt{\\var{vardp}} = \\var{sddp}$.

\n

Range:

\n

The range is the difference between the maximum value ($\\var{max}$) and the minimum value ($\\var{min}$). So it is $\\var{max} - \\var{min} = \\var{range}$.

", "rulesets": {}, "extensions": ["stats"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"sample": {"name": "sample", "group": "Ungrouped variables", "definition": "random_integer_partition(1000,n)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(10..15)", "description": "", "templateType": "anything", "can_override": false}, "mean": {"name": "mean", "group": "Ungrouped variables", "definition": "mean(biglist)", "description": "", "templateType": "anything", "can_override": false}, "median": {"name": "median", "group": "Ungrouped variables", "definition": "median(biglist)", "description": "", "templateType": "anything", "can_override": false}, "max": {"name": "max", "group": "Ungrouped variables", "definition": "max(biglist)", "description": "", "templateType": "anything", "can_override": false}, "min": {"name": "min", "group": "Ungrouped variables", "definition": "min(biglist)", "description": "", "templateType": "anything", "can_override": false}, "sorted": {"name": "sorted", "group": "Ungrouped variables", "definition": "sort(biglist)", "description": "", "templateType": "anything", "can_override": false}, "frequencies": {"name": "frequencies", "group": "Ungrouped variables", "definition": "sort_by(1,frequencies(sorted))", "description": "", "templateType": "anything", "can_override": false}, "biglist": {"name": "biglist", "group": "Ungrouped variables", "definition": "shuffle(flatten([sample,[n-5,n-5,n-5,n-5,n-5,n-5,n-5,n-5]]))", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "len(biglist)", "description": "", "templateType": "anything", "can_override": false}, "mode": {"name": "mode", "group": "Ungrouped variables", "definition": "mode(biglist)[0]", "description": "", "templateType": "anything", "can_override": false}, "variance": {"name": "variance", "group": "Ungrouped variables", "definition": "variance(biglist)", "description": "", "templateType": "anything", "can_override": false}, "sd": {"name": "sd", "group": "Ungrouped variables", "definition": "sqrt(variance)", "description": "", "templateType": "anything", "can_override": false}, "range": {"name": "range", "group": "Ungrouped variables", "definition": "range(biglist)", "description": "", "templateType": "anything", "can_override": false}, "quartiles": {"name": "quartiles", "group": "Ungrouped variables", "definition": "quartiles(biglist)", "description": "", "templateType": "anything", "can_override": false}, "q1": {"name": "q1", "group": "Ungrouped variables", "definition": "quartiles[0]", "description": "", "templateType": "anything", "can_override": false}, "q3": {"name": "q3", "group": "Ungrouped variables", "definition": "quartiles[2]", "description": "", "templateType": "anything", "can_override": false}, "iqr": {"name": "iqr", "group": "Ungrouped variables", "definition": "q3 - q1", "description": "", "templateType": "anything", "can_override": false}, "vardp": {"name": "vardp", "group": "Ungrouped variables", "definition": "trunc(variance,2)", "description": "", "templateType": "anything", "can_override": false}, "sddp": {"name": "sddp", "group": "Ungrouped variables", "definition": "trunc(sd,2)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["n", "sample", "mean", "median", "max", "min", "sorted", "frequencies", "biglist", "m", "mode", "variance", "sd", "range", "quartiles", "q1", "q3", "iqr", "vardp", "sddp"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"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, "prompt": "

What is the mean of the sample?

", "minValue": "mean", "maxValue": "mean", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "1", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": 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, "prompt": "

What is the median of the sample?

", "minValue": "median", "maxValue": "median", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": 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, "prompt": "

What is the mode of the sample?

", "minValue": "mode", "maxValue": "mode", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "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, "prompt": "

What is the variance of the sample?

", "minValue": "variance", "maxValue": "variance", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": 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, "prompt": "

What is the standard deviation of the sample?

", "minValue": "sd", "maxValue": "sd", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": 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, "prompt": "

What is the range of the sample?

", "minValue": "range", "maxValue": "range", "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": "Alexander Corner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5328/"}], "resources": []}]}], "contributors": [{"name": "Alexander Corner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5328/"}]}