// Numbas version: exam_results_page_options {"name": "Alex's copy of 20122013 CBA0_4", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

Suppose that the discrete random variable $X$  has the probability function:

\n

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
 $x$ $P(X=x)$ $\\var{v[0][0]}$ $\\var{v[1][0]}$ $\\var{v[2][0]}$ $\\var{p0}$ $\\var{p1}$ $\\var{p2}$
\n

If $Y$ is a discrete random variable which can take values $v_1,\\;v_2,\\ldots,v_n$ with corresponding probabilities $p_1,\\;p_2,\\ldots,p_n$ then the expected value is given by:

\n

\$\\operatorname{E}[Y]=\\sum_{i=1}^n p_iv_i\$

\n

a) $\\displaystyle Y=\\frac{1}{X} \\Rightarrow \\operatorname{E}[Y]=\\simplify[basic]{{p0}*(1/{v[0][0]})+{p1}*(1/{v[1][0]})+{p2}*(1/{v[2][0]})}=\\var{ex1}$ to 4 decimal places.

\n

b) $\\displaystyle Y=e^X \\Rightarrow \\operatorname{E}[Y]=\\simplify[basic]{{p0}*e^{v[0][0]}+{p1}*e^{v[1][0]}+{p2}*e^{v[2][0]}}=\\var{ex2}$ to 4 decimal places.

", "question_groups": [{"pickQuestions": 0, "pickingStrategy": "all-ordered", "questions": [], "name": ""}], "variables": {"v": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "[[random(-2,-1,3,4,7,8),p0],[random(-3,2,5,6),p1],[random(-4,9,10),p2]]", "name": "v"}, "tol": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "0.0001", "name": "tol"}, "ex2": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "precround(tex2,4)", "name": "ex2"}, "p0": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(0.1..0.3#0.05)", "name": "p0"}, "tex1": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "p0*1/v[0][0]+p1*1/v[1][0]+p2*1/v[2][0]", "name": "tex1"}, "tex2": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "p0*e^(v[0][0])+p1*e^(v[1][0])+p2*e^(v[2][0])", "name": "tex2"}, "ex1": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "precround(tex1,4)", "name": "ex1"}, "p2": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "precround(1-p0-p1,2)", "name": "p2"}, "p1": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(0.3..0.5#0.05)", "name": "p1"}}, "name": "Alex's copy of 20122013 CBA0_4", "rulesets": {}, "type": "question", "variable_groups": [], "parts": [{"marks": 0, "type": "gapfill", "showCorrectAnswer": true, "gaps": [{"marks": 1, "maxValue": "ex1+tol", "type": "numberentry", "showPrecisionHint": false, "showCorrectAnswer": true, "allowFractions": false, "minValue": "ex1-tol", "scripts": {}, "correctAnswerFraction": false}], "scripts": {}, "prompt": "

Find

\n

$\\displaystyle \\operatorname{E}\\left[\\frac{1}{X}\\right]=\\;$?[[0]]  (Input to 4 decimal places).

"}, {"marks": 0, "type": "gapfill", "showCorrectAnswer": true, "gaps": [{"marks": 1, "maxValue": "ex2+tol", "type": "numberentry", "showPrecisionHint": false, "showCorrectAnswer": true, "allowFractions": false, "minValue": "ex2-tol", "scripts": {}, "correctAnswerFraction": false}], "scripts": {}, "prompt": "

Let $Y=e^X$.

\n

Find $\\operatorname{E}[Y]=\\;$?[[0]]

"}], "tags": ["MAS2302", "checked2015", "discrete random variables", "expectation", "functions of a random variable", "statistics"], "preamble": {"js": "", "css": ""}, "ungrouped_variables": ["p2", "p0", "p1", "ex1", "tex1", "tex2", "ex2", "tol", "v"], "functions": {}, "showQuestionGroupNames": false, "metadata": {"description": "

Given a discrete random variable $X$ find the expectation of $1/X$ and $e^X$.

", "licence": "Creative Commons Attribution 4.0 International", "notes": "

25/01/2013:

\n

Finished first draft. Need to be tested.

"}, "contributors": [{"name": "Alex Van den Hof", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1273/"}]}]}], "contributors": [{"name": "Alex Van den Hof", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1273/"}]}