// Numbas version: exam_results_page_options {"name": "20122013 CBA0_4", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "correctAnswerFraction": false, "minValue": "ex1-tol", "maxValue": "ex1+tol", "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Find

\n

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

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

Let $Y=e^X$.

\n

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

", "showCorrectAnswer": true, "marks": 0}], "variables": {"p2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(1-p0-p1,2)", "name": "p2", "description": ""}, "tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.0001", "name": "tol", "description": ""}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[[random(-2,-1,3,4,7,8),p0],[random(-3,2,5,6),p1],[random(-4,9,10),p2]]", "name": "v", "description": ""}, "p1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0.3..0.5#0.05)", "name": "p1", "description": ""}, "ex2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tex2,4)", "name": "ex2", "description": ""}, "tex2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "p0*e^(v[0][0])+p1*e^(v[1][0])+p2*e^(v[2][0])", "name": "tex2", "description": ""}, "p0": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0.1..0.3#0.05)", "name": "p0", "description": ""}, "tex1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "p0*1/v[0][0]+p1*1/v[1][0]+p2*1/v[2][0]", "name": "tex1", "description": ""}, "ex1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tex1,4)", "name": "ex1", "description": ""}}, "ungrouped_variables": ["p2", "p0", "p1", "ex1", "tex1", "tex2", "ex2", "tol", "v"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "20122013 CBA0_4", "showQuestionGroupNames": false, "variable_groups": [], "functions": {}, "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$$\\var{v[0][0]}$ $\\var{v[1][0]}$ $\\var{v[2][0]}$
$P(X=x)$$\\var{p0}$ $\\var{p1}$ $\\var{p2}$ 
\n

Answer the following questions:

", "tags": ["MAS2302", "checked2015", "discrete random variables", "expectation", "functions of a random variable", "statistics"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

25/01/2013:

\n

Finished first draft. Need to be tested.

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

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

"}, "advice": "

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.

", "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/"}]}