// Numbas version: exam_results_page_options {"name": "Shortened Sample standard deviation", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Shortened Sample standard deviation", "tags": [], "metadata": {"description": "

Two ordered data sets, each with 10 numbers. Find the sample standard deviation for each and for their sum.

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

The following table gives the examination marks in {exam1} for a group of $n=\\var{n}$ students.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
{exam1}$\\var{r0[0]}$$\\var{r0[1]}$$\\var{r0[2]}$$\\var{r0[3]}$$\\var{r0[4]}$$\\var{r0[5]}$$\\var{r0[6]}$$\\var{r0[7]}$$\\var{r0[8]}$$\\var{r0[9]}$Mean = $\\var{mean1}$
\n

Find the standard deviation for the {exam1} examination marks.

", "advice": "

The solution to the first part is here – the other parts can be done in the same way.

\n

For {exam1} we have the mean is:

\n

\\[\\simplify[]{({r0[0]} + {r0[1]} + {r0[2]} + {r0[3]} + {r0[4]} + {r0[5]} + {r0[6]} + {r0[7]} + {r0[8]} + {r0[9]}) / {n} = {mean1}}\\]

\n

The variance is given by the formula:

\n

\\[\\textrm{Variance} = \\frac{1}{n}\\left(\\sum_{i=1}^{n}(x_i -\\mu)^2\\right)\\]

\n

where the $x_i$ are the exam scores for {exam1}, $n=\\var{n}$ the number of students and $\\mu=\\var{mean1}$ the sample mean.

\n

The Standard Deviation is then the square root of the Variance i.e.

\n

 Standard Deviation = $\\sqrt{\\var{var1}} = \\var{stdev1}$ to one decimal place.

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "extensions": ["stats"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"s": {"name": "s", "group": "Ungrouped variables", "definition": "2", "description": "", "templateType": "anything", "can_override": false}, "ssq1": {"name": "ssq1", "group": "Ungrouped variables", "definition": "sum(map(x^2,x,r0))", "description": "", "templateType": "anything", "can_override": false}, "overallmean": {"name": "overallmean", "group": "Ungrouped variables", "definition": "mean(sscores)", "description": "", "templateType": "anything", "can_override": false}, "mu": {"name": "mu", "group": "Ungrouped variables", "definition": "random(55..65)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "10", "description": "", "templateType": "anything", "can_override": false}, "ssq2": {"name": "ssq2", "group": "Ungrouped variables", "definition": "sum(map(x^2,x,r1))", "description": "", "templateType": "anything", "can_override": false}, "sig1": {"name": "sig1", "group": "Ungrouped variables", "definition": "random(9..15)", "description": "", "templateType": "anything", "can_override": false}, "sscores": {"name": "sscores", "group": "Ungrouped variables", "definition": "map(r0[x]+r1[x],x,0..n-1)", "description": "", "templateType": "anything", "can_override": false}, "sig0": {"name": "sig0", "group": "Ungrouped variables", "definition": "random(6..12)", "description": "", "templateType": "anything", "can_override": false}, "exam2": {"name": "exam2", "group": "Ungrouped variables", "definition": "'Cell Biology'", "description": "", "templateType": "anything", "can_override": false}, "mean1": {"name": "mean1", "group": "Ungrouped variables", "definition": "mean(r0)", "description": "", "templateType": "anything", "can_override": false}, "total": {"name": "total", "group": "Ungrouped variables", "definition": "'Total Score'", "description": "", "templateType": "anything", "can_override": false}, "r1": {"name": "r1", "group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu,sig1)),n)", "description": "", "templateType": "anything", "can_override": false}, "overallvar": {"name": "overallvar", "group": "Ungrouped variables", "definition": "variance(sscores,true)", "description": "", "templateType": "anything", "can_override": false}, "mean2": {"name": "mean2", "group": "Ungrouped variables", "definition": "mean(r1)", "description": "", "templateType": "anything", "can_override": false}, "tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0", "description": "", "templateType": "anything", "can_override": false}, "r0": {"name": "r0", "group": "Ungrouped variables", "definition": "repeat(round(normalSample(mu,sig0)),n)", "description": "", "templateType": "anything", "can_override": false}, "exam1": {"name": "exam1", "group": "Ungrouped variables", "definition": "'Anatomy'", "description": "", "templateType": "anything", "can_override": false}, "stdev1": {"name": "stdev1", "group": "Ungrouped variables", "definition": "precround(stdev(r0,false),1)", "description": "", "templateType": "anything", "can_override": false}, "stdevoverall": {"name": "stdevoverall", "group": "Ungrouped variables", "definition": "precround(stdev(sscores,true),1)", "description": "", "templateType": "anything", "can_override": false}, "var1": {"name": "var1", "group": "Ungrouped variables", "definition": "precround(variance(r0,false),3)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["overallmean", "mean1", "mean2", "overallvar", "ssq1", "ssq2", "total", "exam2", "tol", "exam1", "stdev1", "var1", "sig1", "sig0", "stdevoverall", "r0", "r1", "n", "mu", "s", "sscores"], "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": "

{exam1}

\n

Standard Deviation = [[0]] (to one decimal place)

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{stdev1-tol}", "maxValue": "{stdev1+tol}", "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": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}