// Numbas version: finer_feedback_settings {"name": "PB3 - Expected Value and Standard Deviation for a Combination of Linear Random Variables", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "PB3 - Expected Value and Standard Deviation for a Combination of Linear Random Variables", "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "
Two independent random variables $U$ and $V$ are used to compute a new random variable $W$ where $W = \\var{scalar}U + V$.
", "advice": "In general if we have a linear combination of two independent random variables $X$ and $Y$, where $a$ and $b$ are constants, the formulas for expected value and variance are as follows:
\n\\begin{align}
E[aX + bY] &= aE[X] + bE[Y] \\\\
Var(aX+bY) &= a^2Var(X) + b^2Var(Y).
\\end{align}
a) We want to find the expected value of $W$, i.e., $E[W]$.
\nRecall that $W = \\var{scalar}U + V.$
\nHence,
\n\\begin{align}
E[W] &= \\var{scalar}E[U] + E[V] \\\\
&= \\var{scalar}*\\var{um} + \\var{vm} \\\\
&= \\var{scalar*um} + \\var{vm} \\\\
&= \\var{wm}.
\\end{align}
Hence the expected value of $W$ is $\\var{wm}$.
\nb) We want to find the standard deviation of $W$ ie., $\\sigma_W$. Let us first calculate the variance, i.e., $Var(W)$, since $\\sigma_W = \\sqrt{Var(W)}$.
\nSo,
\n\\begin{align}
Var(W) &= \\var{scalar}^2Var(U) + Var(V).
\\end{align}
Here we need that $Var(U) = \\sigma_U^2 = \\var{usd}^2 = \\var{uvar}$ and $Var(V) = \\sigma_V^2 = \\var{vsd}^2 = \\var{vvar}$.
\nSo,
\n\\begin{align}
&= \\var{scalar^2}\\cdot\\var{uvar} + \\var{vvar} \\\\
&= \\var{scalar^2*uvar} + \\var{vvar} \\\\
&= \\var{wvar}.
\\end{align}
We now need to calculate the standard deviation of $W$.
\nSo,
\n\\begin{align}
\\sigma_W &= \\sqrt{Var(W)} \\\\
&= \\sqrt{\\var{wvar}} \\\\
&= \\var{wsd}.
\\end{align}
Hence, the standard deviation of $W$ is $\\var{round_wsd}$ to two decimal places.
\n\n", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"um": {"name": "um", "group": "Ungrouped variables", "definition": "random(2,3,4,5,6,7,8,9,10)", "description": "mean of u
", "templateType": "anything", "can_override": false}, "vm": {"name": "vm", "group": "Ungrouped variables", "definition": "random(2,3,4,5,6,7,8,9,10)", "description": "mean of v
", "templateType": "anything", "can_override": false}, "scalar": {"name": "scalar", "group": "Ungrouped variables", "definition": "random(2,3,4,5)", "description": "scalar multiplier of u in linear combination of random variables
", "templateType": "anything", "can_override": false}, "wm": {"name": "wm", "group": "Ungrouped variables", "definition": "scalar*um + vm", "description": "mean of w
", "templateType": "anything", "can_override": false}, "usd": {"name": "usd", "group": "Ungrouped variables", "definition": "random(1,2,3,4,5)", "description": "standard deviation of u
", "templateType": "anything", "can_override": false}, "vsd": {"name": "vsd", "group": "Ungrouped variables", "definition": "random(1,2,3,4,5)", "description": "standard deviation of v
", "templateType": "anything", "can_override": false}, "wvar": {"name": "wvar", "group": "Ungrouped variables", "definition": "(scalar^2)*uvar + vvar", "description": "variance of w
", "templateType": "anything", "can_override": false}, "wsd": {"name": "wsd", "group": "Ungrouped variables", "definition": "sqrt(wvar)", "description": "standard deviation of w
", "templateType": "anything", "can_override": false}, "uvar": {"name": "uvar", "group": "Ungrouped variables", "definition": "usd^2", "description": "variance of u
", "templateType": "anything", "can_override": false}, "vvar": {"name": "vvar", "group": "Ungrouped variables", "definition": "vsd^2", "description": "variance of v
", "templateType": "anything", "can_override": false}, "round_wsd": {"name": "round_wsd", "group": "Ungrouped variables", "definition": "precround(wsd,2)", "description": "standard deviation of w rounded to 2 dp
", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["um", "vm", "scalar", "wm", "usd", "vsd", "wvar", "wsd", "uvar", "vvar", "round_wsd"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "a)", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "If the means of $U$ and $V$ are {um} and {vm}, respectively, what is the mean of $W$?
", "minValue": "wm", "maxValue": "wm", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "b)", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "If the standard deviations of $U$ and $W$ are {usd} and {vsd}, resepctively, what is the standard deviation of $W$?
\nIf necessary, round your answer to two decimal places.
", "minValue": "round_wsd", "maxValue": "round_wsd", "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": "Lauren Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21504/"}, {"name": "Megan Oliver", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/23526/"}], "resources": []}]}], "contributors": [{"name": "Lauren Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21504/"}, {"name": "Megan Oliver", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/23526/"}]}