// Numbas version: exam_results_page_options {"name": "Nigel's copy of Find mean and standard deviation of differences between samples, , , , ", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"showCorrectAnswer": true, "gaps": [{"maxValue": "{meandiff}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false, "showPrecisionHint": false, "type": "numberentry", "minValue": "{meandiff}", "marks": 0.5, "scripts": {}}, {"maxValue": "{stdiff}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false, "showPrecisionHint": false, "type": "numberentry", "minValue": "{stdiff}", "marks": 0.5, "scripts": {}}], "type": "gapfill", "scripts": {}, "marks": 0, "prompt": "
Find the mean and standard deviation of the difference between first and second {attempt}s.
\nCalculate differences for second {attempt} – first {attempt}.
\nMean of difference = [[0]] (input as an exact decimal)
\nStandard deviation of difference = [[1]] (input to 3 decimal places)
"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "advice": "The table of differences is given by:
\n{capitalise(object)} | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|
First {attempt} | \n$\\var{r1[0]}$ | \n$\\var{r1[1]}$ | \n$\\var{r1[2]}$ | \n$\\var{r1[3]}$ | \n$\\var{r1[4]}$ | \n
Second {attempt} | \n$\\var{r2[0]}$ | \n$\\var{r2[1]}$ | \n$\\var{r2[2]}$ | \n$\\var{r2[3]}$ | \n$\\var{r2[4]}$ | \n
Differences | \n$\\var{d[0]}$ | \n$\\var{d[1]}$ | \n$\\var{d[2]}$ | \n$\\var{d[3]}$ | \n$\\var{d[4]}$ | \n
The mean of the differences is $\\var{meandiff}$.
\nThe variance $V$ of the differences is
\n\\begin{align}
V &= \\frac{1}{4}\\left(\\simplify[]{({d[0]}^2+{d[1]}^2+{d[2]}^2+{d[3]}^2+{d[4]}^2)}-5\\times \\var{meandiff}^2\\right) \\\\
&= \\var{variance(d,true)}
\\end{align}
Hence the standard deviation is $\\sqrt{V}=\\var{stdiff}$ to 3 decimal places.
", "variables": {"stdiff": {"group": "Ungrouped variables", "templateType": "anything", "name": "stdiff", "description": "", "definition": "precround(stdev(d,true),3)"}, "performing": {"group": "Ungrouped variables", "templateType": "anything", "name": "performing", "description": "", "definition": " 'working at $\\\\var{100}$ watts on an exercise machine' "}, "mu2": {"group": "Ungrouped variables", "templateType": "anything", "name": "mu2", "description": "", "definition": "mu1+random(1..3#0.1)"}, "thismany": {"group": "Ungrouped variables", "templateType": "anything", "name": "thismany", "description": "", "definition": "5"}, "r2": {"group": "Ungrouped variables", "templateType": "anything", "name": "r2", "description": "", "definition": "repeat(round(normalsample(mu2,sig2)),5)"}, "d": {"group": "Ungrouped variables", "templateType": "anything", "name": "d", "description": "", "definition": "list(vector(r2)-vector(r1))"}, "object": {"group": "Ungrouped variables", "templateType": "anything", "name": "object", "description": "", "definition": "'person'"}, "sig1": {"group": "Ungrouped variables", "templateType": "anything", "name": "sig1", "description": "", "definition": "random(1.5..2.5#0.5)"}, "meandiff": {"group": "Ungrouped variables", "templateType": "anything", "name": "meandiff", "description": "", "definition": "mean(d)"}, "r1": {"group": "Ungrouped variables", "templateType": "anything", "name": "r1", "description": "", "definition": "repeat(round(normalsample(mu1,sig1)),5)"}, "mu1": {"group": "Ungrouped variables", "templateType": "anything", "name": "mu1", "description": "", "definition": "random(16..20#0.5)"}, "objects": {"group": "Ungrouped variables", "templateType": "anything", "name": "objects", "description": "", "definition": "'people'"}, "sig2": {"group": "Ungrouped variables", "templateType": "anything", "name": "sig2", "description": "", "definition": "sig1+random(-0.5..-0.2#0.1)"}, "attempt": {"group": "Ungrouped variables", "templateType": "anything", "name": "attempt", "description": "", "definition": "'attempt'"}, "something": {"group": "Ungrouped variables", "templateType": "anything", "name": "something", "description": "", "definition": "'Oxygen uptake values (mL/kg.min)'"}}, "metadata": {"notes": "11/07/2012:
\n
Added tags.
Calculation not yet tested.
\n23/07/2012:
\nAdded description.
\nChecked calculation.
\nChanged display slightly in Advice.
\n3/08/2012:
\nAdded tags.
\nQuestion appears to be working correctly.
\n19/12/2012:
\nNew stats extension functions replaced old ones. For example normalsample instead of randomnormal for generating normal samples. Also used built in sample variance and stdev.
\nCalculations checked.
\nAdded escape slash for string variable with \\var included.
\nAdded test1 tag.
\n21/12/2012:
\nChecked rounding, OK. Added cr1 tag.
", "description": "An experiment is performed twice, each with $5$ outcomes
\n$x_i,\\;y_i,\\;i=1,\\dots 5$ . Find mean and s.d. of their differences $y_i-x_i,\\;i=1,\\dots 5$.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "{Something} for $\\var{thismany}$ {objects} {performing} were:
\n{capitalise(object)} | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|
First {attempt} | \n$\\var{r1[0]}$ | \n$\\var{r1[1]}$ | \n$\\var{r1[2]}$ | \n$\\var{r1[3]}$ | \n$\\var{r1[4]}$ | \n
Second {attempt} | \n$\\var{r2[0]}$ | \n$\\var{r2[1]}$ | \n$\\var{r2[2]}$ | \n$\\var{r2[3]}$ | \n$\\var{r2[4]}$ | \n