// Numbas version: finer_feedback_settings {"name": "Expectation and variance of combinations of estimators", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "'B'", "name": "b", "description": ""}, "e3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s3*m", "name": "e3", "description": ""}, "unb2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(unb1=0,1,random(0,1))", "name": "unb2", "description": ""}, "s7": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "name": "s7", "description": ""}, "sqsum1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "cw1^2+cx1^2+cy1^2+cz1^2", "name": "sqsum1", "description": ""}, "wrong": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(unb1*unb2>0,'C',if(unb1=1,'B','A'))", "name": "wrong", "description": ""}, "t3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(unb3=1,1,random(2..9))", "name": "t3", "description": ""}, "v1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sqsum1*sd^2", "name": "v1", "description": ""}, "su2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "cw2+cx2+cy2+cz2", "name": "su2", "description": ""}, "p": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random('W','X','Y','Z')", "name": "p", "description": ""}, "cy1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(cx1=0,random(1..9),random(-9..9))", "name": "cy1", "description": ""}, "sd": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..6)", "name": "sd", "description": ""}, "cw1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)", "name": "cw1", "description": ""}, "t1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(unb1=1,1,random(2..9))", "name": "t1", "description": ""}, "tw": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0,1)", "name": "tw", "description": ""}, "cy3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..9)", "name": "cy3", "description": ""}, "sqsum2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "cw2^2+cx2^2+cy2^2+cz2^2", "name": "sqsum2", "description": ""}, "v3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sqsum3*sd^2", "name": "v3", "description": ""}, "s1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "cw1+cx1+cy1+cz1", "name": "s1", "description": ""}, "tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.01", "name": "tol", "description": ""}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "'A'", "name": "a", "description": ""}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "'C'", "name": "c", "description": ""}, "sqsum3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "cw3^2+cx3^2+cy3^2+cz3^2", "name": "sqsum3", "description": ""}, "s2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(unb2=1,su2,su2+random(1..4))", "name": "s2", "description": ""}, "unb1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0,1)", "name": "unb1", "description": ""}, "cz3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "t3-cw3-cx3-cy3", "name": "cz3", "description": ""}, "cx2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)", "name": "cx2", "description": ""}, "cw3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "tw*random(10..40)", "name": "cw3", "description": ""}, "sx": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "name": "sx", "description": ""}, "correct2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(unb1=1,if(unb2=1,'B','C'),'C')", "name": "correct2", "description": ""}, "cw2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)", "name": "cw2", "description": ""}, "q": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(p='X',random('W','Y','Z'),p='W',random('X','Y','Z'),p='Y',random('W','X','Z'),random('W','X','Y'))", "name": "q", "description": ""}, "e2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(su2*m/S2,2)", "name": "e2", "description": ""}, "e1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s1*m", "name": "e1", "description": ""}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s7*random(1..10)", "name": "m", "description": ""}, "correct1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(unb1=1,'A','B')", "name": "correct1", "description": ""}, "cz2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)", "name": "cz2", "description": ""}, "unb3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(unb1*unb2>0,0,1)", "name": "unb3", "description": ""}, "cy2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)", "name": "cy2", "description": ""}, "cx1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9)", "name": "cx1", "description": ""}, "s3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "cw3+cx3+cy3+cz3", "name": "s3", "description": ""}, "v2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(sqsum2*sd^2/S2^2,2)", "name": "v2", "description": ""}, "cx3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "tx*sx*random(1..9)", "name": "cx3", "description": ""}, "cz1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "t1-cx1-cw1-cy1", "name": "cz1", "description": ""}, "tx": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(tw=0,1,0)", "name": "tx", "description": ""}}, "ungrouped_variables": ["cy3", "cy2", "cy1", "t3", "correct2", "correct1", "t1", "unb3", "unb2", "unb1", "s3", "tw", "s1", "s7", "tol", "cx1", "cx2", "cx3", "sqsum1", "sqsum3", "sqsum2", "cz2", "cz3", "cz1", "v1", "v2", "v3", "e1", "e3", "e2", "a", "c", "b", "tx", "cw1", "cw3", "cw2", "m", "wrong", "sx", "q", "p", "su2", "s2", "sd"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Expectation and variance of combinations of estimators", "showQuestionGroupNames": false, "functions": {}, "parts": [{"scripts": {}, "gaps": [{"showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "showCorrectAnswer": true, "minValue": "{e1}", "correctAnswerFraction": false, "marks": 1, "maxValue": "{e1}"}, {"showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "showCorrectAnswer": true, "minValue": "{v1}", "correctAnswerFraction": false, "marks": 1, "maxValue": "{v1}"}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "
$\\simplify[std]{A = {cw1} * W + {cx1} * X + {cy1} * Y + {cz1} * Z}$
\n$ \\operatorname{E}[A]=\\;\\;$[[0]]$\\;\\;\\;\\;\\operatorname{Var}(A)=\\;\\;\\;$[[1]]
\nInput both as integers.
", "marks": 0}, {"scripts": {}, "gaps": [{"showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "showCorrectAnswer": true, "minValue": "{e2-tol}", "correctAnswerFraction": false, "marks": 1, "maxValue": "{e2+tol}"}, {"showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "showCorrectAnswer": true, "minValue": "{v2-tol}", "correctAnswerFraction": false, "marks": 1, "maxValue": "{v2+tol}"}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "$\\simplify[std]{B = (1 / {S2}) * ({cw2} * W + {cx2} * X + {cy2} * Y + {cz2} * Z)}$
\n$\\operatorname{E}[B]=\\;\\;$[[0]]$\\;\\;\\;\\;\\operatorname{Var}(B)=\\;\\;\\;$[[1]]
\nInput both to 2 decimal places.
", "marks": 0}, {"scripts": {}, "gaps": [{"showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "showCorrectAnswer": true, "minValue": "{e3}", "correctAnswerFraction": false, "marks": 1, "maxValue": "{e3}"}, {"showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "showCorrectAnswer": true, "minValue": "{v3}", "correctAnswerFraction": false, "marks": 1, "maxValue": "{v3}"}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "$\\simplify[std]{C = {cw3} * W + {cx3} * X + {cy3} * Y + {cz3} * Z}$
\n$ \\operatorname{E}[C]=\\;\\;$[[0]]$\\;\\;\\;\\;\\operatorname{Var}(C)=\\;\\;\\;$[[1]]
\nInput both as integers.
", "marks": 0}, {"scripts": {}, "gaps": [{"displayType": "checkbox", "choices": ["$\\var{Correct1}$
", "$\\var{Correct2}$
", "$\\var{Wrong}$
"], "matrix": [1, 1, -1], "distractors": ["", "", ""], "minAnswers": 0, "maxAnswers": 0, "shuffleChoices": true, "scripts": {}, "maxMarks": 0, "type": "m_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 3, "marks": 0}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "\n \n \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 \n ", "marks": 0}, {"scripts": {}, "gaps": [{"displayType": "radiogroup", "choices": ["$\\var{B}$
", "$\\var{A}$
", "$\\var{C}$
"], "matrix": [1, 0, 0], "distractors": ["", "", ""], "shuffleChoices": true, "scripts": {}, "maxMarks": 0, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 3, "marks": 0}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "\n \n \nWhich of the estimators $A,\\;\\;B$ or $C$ above is the most efficient?
\n \n \n \n[[0]]
\n \n ", "marks": 0}, {"scripts": {}, "gaps": [{"showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "showCorrectAnswer": true, "minValue": "{m^2}", "correctAnswerFraction": false, "marks": 1, "maxValue": "{m^2}"}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "Find $\\operatorname{E}[\\var{p}\\var{q}]=\\;\\;$[[0]]
", "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "Suppose $W,\\;\\;X,\\;\\;Y,\\;\\;$ and $Z$ are i.i.d. variables with mean $\\mu=\\var{m}$, standard deviation $\\sigma=\\var{sd}$
\nFind the expectation and variance of each of the following estimators of $\\mu$.
", "tags": ["IID", "MAS1604", "biased", "checked2015", "cr1", "efficient estimators", "estimators", "expectation", "i.i.d", "identical independent distributions", "iid", "independent identical distributions", "mean ", "random variables", "standard deviation", "statistics", "tested1", "unbiased", "unbiased estimators", "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 questions.
\nAdded formula for $\\operatorname{Var}(aR+bS)$.
\nChecked calculation.
\nAdded description.
\n1/08/2012:
\nAdded tags.
\nQuestion appears to be working correctly.
\n21/12/2012:
\nChecked calculation, OK. Added tested1 tag.
\nChecked rounding, OK. Added tag cr1.
", "licence": "Creative Commons Attribution 4.0 International", "description": "Given three linear combinations of four i.i.d. variables, find the expectation and variance of these estimators of the mean $\\mu$. Which are unbiased and efficient?
"}, "advice": "We use the result throughout these solutions that for independent 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}[\\simplify[std]{{cw1} * W + {cx1} * X + {cy1} * Y + {cz1} * Z}]\\\\ &=& \\simplify[std]{{cw1} * {m} + {cx1} * {m} + {cy1} * {m} + {cz1} * {m}}\\\\ &=& \\var{e1}\\\\ \\\\ \\\\ \\operatorname{Var}(A) &=& \\operatorname{Var}[\\simplify[std]{{cw1} * W + {cx1} * X + {cy1} * Y + {cz1} * Z}]\\\\ &=& \\simplify[std]{ {cw1 ^ 2} * Var(W) + {cx1 ^ 2} * Var(X) + {cy1 ^ 2} * Var(Y) + {cz1 ^ 2} * Var(Z)}\\\\ &=& \\simplify[std]{{cw1 ^ 2} * {sd ^ 2} + {cx1 ^ 2} * {sd ^ 2} + {cy1 ^ 2} * {sd ^ 2} + {cz1 ^ 2} * {sd ^ 2} }\\\\ &=& \\var{v1} \\end{eqnarray*} \\]
b)
\\[\\begin{eqnarray*} \\operatorname{E}[B] &=& \\frac{1}{\\var{S2}}\\left(\\operatorname{E}[\\simplify[std]{{cw2} * W + {cx2} * X + {cy2} * Y + {cz2} * Z}]\\right)\\\\ &=& \\frac{1}{\\var{S2}}\\left(\\simplify[std]{{cw2} * {m} + {cx2} * {m} + {cy2} * {m} + {cz2} * {m}}\\right)\\\\ &=& \\var{e2}\\\\ \\\\ \\\\ \\operatorname{Var}(B) &=& \\frac{1}{\\var{S2^2}}\\left(\\operatorname{Var}[\\simplify[std]{{cw2} * W + {cx2} * X + {cy2} * Y + {cz2} * Z}]\\right)\\\\ &=& \\frac{1}{\\var{S2^2}}\\left(\\simplify[std]{ {cw2 ^ 2} * Var(W) + {cx2 ^ 2} * Var(X) + {cy2 ^ 2} * Var(Y) + {cz2 ^ 2} * Var(Z)}\\right)\\\\ &=& \\frac{1}{\\var{S2^2}}\\left(\\simplify[std]{{cw2 ^ 2} * {sd ^ 2} + {cx2 ^ 2} * {sd ^ 2} + {cy2 ^ 2} * {sd ^ 2} + {cz2 ^ 2} * {sd ^ 2} }\\right)\\\\ &=& \\var{v2} \\end{eqnarray*} \\]
c)
\\[\\begin{eqnarray*} \\operatorname{E}[C] &=& \\operatorname{E}[\\simplify[std,collectNumbers]{{cw3} * W + {cx3} * X + {cy3} * Y + {cz3} * Z}]\\\\ &=& \\simplify[std,collectNumbers]{{cw3} * {m} + {cx3} * {m} + {cy3} * {m} + {cz3} * {m}}\\\\ &=& \\var{e3}\\\\ \\\\ \\\\ \\operatorname{Var}(C) &=& \\operatorname{Var}[\\simplify[std]{{cw3} * W + {cx3} * X + {cy3} * Y + {cz3} * Z}]\\\\ &=& \\simplify[std]{ {cw3 ^ 2} * Var(W) + {cx3 ^ 2} * Var(X) + {cy3 ^ 2} * Var(Y) + {cz3 ^ 2} * Var(Z)}\\\\ &=& \\simplify[std]{{cw3 ^ 2} * {sd ^ 2} + {cx3 ^ 2} * {sd ^ 2} + {cy3 ^ 2} * {sd ^ 2} + {cz3 ^ 2} * {sd ^ 2} }\\\\ &=& \\var{v3} \\end{eqnarray*} \\]
d)
\nWe see that $\\var{Correct1},\\;\\;\\var{Correct2}\\;\\;$ are unbiased estimators for $\\mu=\\var{m}$ as their expectations are $\\var{m}$.
\ne)
\nThe most efficient estimator is $B$ as it has the smallest variance.
\nf)
Since $\\var{p}$ and $\\var{q}$ are independent we have:
$\\operatorname{E}[\\var{p}\\var{q}]=\\operatorname{E}[\\var{p}]\\operatorname{E}[\\var{q}] = \\var{m}\\times \\var{m} = \\var{m^2}$
", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}