// Numbas version: finer_feedback_settings {"name": "Find the expectation and variance of three estimators of the mean", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"s1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "round(sa/5)", "name": "s1", "description": ""}, "tol": {"group": "Ungrouped variables", "templateType": "anything", "definition": "0", "name": "tol", "description": ""}, "s5": {"group": "Ungrouped variables", "templateType": "anything", "definition": "round((t*(s4+1)+(100-t)*sa)/100)", "name": "s5", "description": ""}, "sc4": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(sc2=0,random(1,-1),random(1,0,-1))", "name": "sc4", "description": ""}, "c4": {"group": "Ungrouped variables", "templateType": "anything", "definition": "sc4*random(1..6)", "name": "c4", "description": ""}, "s4": {"group": "Ungrouped variables", "templateType": "anything", "definition": "round(4*sa/5)", "name": "s4", "description": ""}, "s2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "round(2*sa/5)", "name": "s2", "description": ""}, "vara": {"group": "Ungrouped variables", "templateType": "anything", "definition": "precround(sd^2/sa,2)", "name": "vara", "description": ""}, "c2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "sc2*random(1..6)", "name": "c2", "description": ""}, "sc5": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,-1)", "name": "sc5", "description": ""}, "c3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "sc3*random(1..6)", "name": "c3", "description": ""}, "m": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(50..70)", "name": "m", "description": ""}, "mm": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random('max','min')", "name": "mm", "description": ""}, "c5": {"group": "Ungrouped variables", "templateType": "anything", "definition": "-su4+sc5*random(1..6)", "name": "c5", "description": ""}, "exc": {"group": "Ungrouped variables", "templateType": "anything", "definition": "m*(su4+c5)", "name": "exc", "description": ""}, "varc": {"group": "Ungrouped variables", "templateType": "anything", "definition": "(c1^2+c2^2+c3^2+c4^2+c5^2)*sd^2", "name": "varc", "description": ""}, "sd": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(10..15)", "name": "sd", "description": ""}, "sc3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,-1)", "name": "sc3", "description": ""}, "su4": {"group": "Ungrouped variables", "templateType": "anything", "definition": "c1+c2+c3+c4", "name": "su4", "description": ""}, "c1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..5)", "name": "c1", "description": ""}, "birds": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random('hens','sparrows','robins','yellowhammers','reed warblers','bluetits','wrens','finches')", "name": "birds", "description": ""}, "s3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "round(3*sa/5)", "name": "s3", "description": ""}, "sc2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,0,-1)", "name": "sc2", "description": ""}, "sa": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(12..25)", "name": "sa", "description": ""}, "t": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(0..100)", "name": "t", "description": ""}}, "ungrouped_variables": ["sc5", "vara", "varc", "sc4", "birds", "s3", "s2", "s1", "s5", "s4", "sc3", "tol", "sc2", "c3", "c2", "c1", "c5", "c4", "exc", "mm", "m", "su4", "t", "sa", "sd"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Find the expectation and variance of three estimators of the mean", "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "{m}", "correctAnswerFraction": false, "marks": 1, "maxValue": "{m}"}, {"showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "{vara-tol}", "correctAnswerFraction": false, "marks": 1, "maxValue": "{vara+tol}"}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "\n
$A = \\overline{W}$
\n(where $\\overline{W}$ denotes the random variable given by taking sample means of size $\\var{sa}$)
\n$ \\operatorname{E}[A]=\\;\\;$[[0]]$\\;\\;\\;\\;\\operatorname{Var}(A)=\\;\\;\\;$[[1]]
\nInput $\\operatorname{Var}(A)$ to 2 decimal places.
\n ", "marks": 0}, {"scripts": {}, "gaps": [{"showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "{m}", "correctAnswerFraction": false, "marks": 1, "maxValue": "{m}"}, {"showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "{sd^2}", "correctAnswerFraction": false, "marks": 1, "maxValue": "{sd^2}"}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "\n$B = W_{\\var{s3}}$
\n$\\operatorname{E}[B]=\\;\\;$[[0]]$\\;\\;\\;\\;\\operatorname{Var}(B)=\\;\\;\\;$[[1]]
\n ", "marks": 0}, {"scripts": {}, "gaps": [{"showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "{exc}", "correctAnswerFraction": false, "marks": 1, "maxValue": "{exc}"}, {"showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "{varc}", "correctAnswerFraction": false, "marks": 1, "maxValue": "{varc}"}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "\n$\\simplify[std]{C = {c1} * W_{s1} + {c2} *W_{s2} + {c3} *W_{s3} + {c4} * W_{s4}+{c5} * W_{s5}}$
\n$ \\operatorname{E}[C]=\\;\\;$[[0]]$\\;\\;\\;\\;\\operatorname{Var}(C)=\\;\\;\\;$[[1]]
\nInput both as integers.
\n ", "marks": 0}, {"scripts": {}, "gaps": [{"displayType": "checkbox", "choices": ["$A$
", "$B$
", "$C$
"], "matrix": [1, 1, -1], "distractors": ["", "", ""], "minAnswers": 0, "maxAnswers": 0, "shuffleChoices": true, "warningType": "none", "scripts": {}, "maxMarks": 0, "type": "m_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 3, "marks": 0}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "\nWhich of the estimators $A,\\;B$ or $C$ above are unbiased for $\\mu$? Select the correct choices.
You will lose a mark for selecting a wrong choice.
[[0]]
\n ", "marks": 0}, {"scripts": {}, "gaps": [{"displayType": "radiogroup", "choices": ["$A$
", "$B$
", "$C$
"], "matrix": [1, 0, 0], "distractors": ["", "", ""], "shuffleChoices": true, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "displayColumns": 3, "marks": 0}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "\nWhich of the estimators $A,\\;B$ or $C$ above is the most efficient?
\n[[0]]
\n ", "marks": 0}], "variablesTest": {"condition": "exc<>m", "maxRuns": 100}, "statement": "\n \n \nFrom previous studies it is known that, $W$ the weight of eggs laid by {birds}, has mean $\\mu=\\var{m}$g and standard deviation $\\sigma=\\var{sd}$g.
\n \n \n \nA random sample of $\\var{sa}$ eggs was taken $\\{W_1,\\;W_2,\\ldots,\\;W_{\\var{sa}}\\}$ and their weights observed.
\n \n \n \nFind the expectation and variance of the following three estimators of $\\mu$
\n \n \n ", "tags": ["biased", "checked2015", "cr1", "distributions", "efficient estimators", "estimators", "estimators of mean", "expectation", "expectations", "MAS2302", "mean", "mean ", "means", "random samples", "random variables", "sample means", "sc", "statistics", "tested1", "unbiased", "variance"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "13/07/2012:
\nAdded tags.
\nImproved and made consistent the display in various content areas.
\nSet new tolerance variable tol=0 for 2 dps numeric input question.
\nChecked calculation.
\nAdded description.
\n1/08/2012:
\nAdded tags.
\nQuestion appears to be working correctly.
\n21/12/2012:
\nChecked calculations, OK. Added tested1 tag.
\nChecked rounding, OK. Added cr1 tag.
\nCould have scenarios. Added sc tag.
", "licence": "Creative Commons Attribution 4.0 International", "description": "Using a random sample from a population with given mean and variance, find the expectation and variance of three estimators of $\\mu$. Unbiased, efficient?
"}, "advice": "\nWe use the result throughout these solutions that for random variables $R$ and $S$ then
$\\operatorname{E}[aR+bS]=a\\operatorname{E}[R]+b\\operatorname{E}[S]$ and
$\\operatorname{Var}(aR+bS) = a^2\\operatorname{Var}(R)+b^2\\operatorname{Var}(S)$
\na)
\\[\\begin{eqnarray*} \\operatorname{E}[A] &=& \\operatorname{E}(\\overline{W})=\\mu=\\var{m}\\\\ \\\\ \\operatorname{Var}(A)&=&\\operatorname{Var}(\\overline{W})=\\frac{\\sigma^2}{n}=\\frac{\\var{sd^2}}{\\var{sa}}\\\\ =\\var{vara} \\end{eqnarray*} \\] to 2 decimal places.
b)
\\[\\begin{eqnarray*} \\operatorname{E}[B] &=& \\operatorname{E}(W_{\\var{s3}})=\\mu=\\var{m}\\\\ \\\\ \\operatorname{Var}(B)&=&\\operatorname{Var}(W_{\\var{s3}})=\\sigma^2=\\var{sd^2} \\end{eqnarray*} \\]
c)
\\[\\begin{eqnarray*} \\operatorname{E}[C] &=& \\operatorname{E}(\\simplify[std]{{c1} * W_{s1} + {c2} *W_{s2} + {c3} *W_{s3} + {c4} * W_{s4}+{c5} * W_{s5}})\\\\ &=&\\simplify[std]{ ({c1} + {c2} + {c3} + {c4} + {c5}) * {m} }\\\\ &=& \\var{exc}\\\\ \\\\ \\operatorname{Var}(C)&=&\\operatorname{Var}(\\simplify[std]{{c1} * W_{s1} + {c2} *W_{s2} + {c3} *W_{s3} + {c4} * W_{s4}+{c5} * W_{s5}})\\\\ &=& \\simplify[std]{({c1 ^ 2} + {c2 ^ 2} + {c3 ^ 2} + {c4 ^ 2} + {c5 ^ 2}) * {sd ^ 2} }\\\\ &=& \\var{varc} \\end{eqnarray*} \\]
d)
$A$ and $B$ are unbiased as their expectations are both $\\var{m}$.
e)
$A$ is the most efficient as it has the least variance.