// Numbas version: exam_results_page_options {"name": "Alex's copy of Find CDF of given exponential distribution, and expectation and variance, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "rulesets": {}, "tags": ["CDF", "cdf", "checked2015", "continuous distributions", "expectation", "exponential distribution", "MAS1604", "MAS2304", "PDF", "pdf", "Probability", "statistical distributions", "statistics", "variance"], "statement": "

Suppose $Y \\sim \\operatorname{Exp}(\\var{la})$ with PDF $f_Y(y)=\\var{la}e^{-\\var{la}y},\\;\\;y \\gt 0$

", "name": "Alex's copy of Find CDF of given exponential distribution, and expectation and variance, ", "preamble": {"css": "", "js": ""}, "parts": [{"gaps": [{"showCorrectAnswer": true, "answer": "(1 + ( - (e ^ ({( - la)} * y))))", "showpreview": true, "checkingtype": "absdiff", "expectedvariablenames": [], "marks": 1, "scripts": {}, "vsetrange": [0, 1], "type": "jme", "checkvariablenames": false, "answersimplification": "basic", "vsetrangepoints": 5, "checkingaccuracy": 0.001}], "showCorrectAnswer": true, "type": "gapfill", "scripts": {}, "marks": 0, "prompt": "

Find the CDF of $Y$.

\n

 

\n

$F_Y(y)=\\;$?[[0]], $y \\gt 0$.

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

Calculate:

\n

$P(\\var{a} \\leq Y \\leq \\var{b})=\\;$?[[0]]  (to 4 decimal places).

"}, {"gaps": [{"showCorrectAnswer": true, "answer": "2/{2*la}", "showpreview": true, "checkingtype": "absdiff", "expectedvariablenames": [], "marks": 0.5, "scripts": {}, "vsetrange": [0, 1], "type": "jme", "checkvariablenames": false, "answersimplification": "all, fractionNumbers", "vsetrangepoints": 5, "checkingaccuracy": 0.001}, {"showCorrectAnswer": true, "answer": "4/{4*la^2}", "showpreview": true, "checkingtype": "absdiff", "expectedvariablenames": [], "marks": 0.5, "scripts": {}, "vsetrange": [0, 1], "type": "jme", "checkvariablenames": false, "answersimplification": "all,fractionNumbers", "vsetrangepoints": 5, "checkingaccuracy": 0.001}], "showCorrectAnswer": true, "type": "gapfill", "scripts": {}, "marks": 0, "prompt": "

Find $\\operatorname{E}[Y]$ and $\\operatorname{Var}(Y)$.

\n

$\\operatorname{E}[Y]=\\;$?[[0]] (Enter as a fraction or an integer, not as a decimal).

\n

$\\operatorname{Var}(Y)=\\;$?[[1]] (Enter as a fraction or an integer, not as a decimal).

"}], "variables": {"ans2": {"templateType": "anything", "description": "", "definition": "precround(tans2,4)", "group": "Ungrouped variables", "name": "ans2"}, "a": {"templateType": "anything", "description": "", "definition": "if(la>=4,random(0.5..1#0.5),if(la>2,random(0.5..3#0.5),random(0.5..5#0.5)))", "group": "Ungrouped variables", "name": "a"}, "tans2": {"templateType": "anything", "description": "", "definition": "exp(-a*la)-exp(-b*la)", "group": "Ungrouped variables", "name": "tans2"}, "b": {"templateType": "anything", "description": "", "definition": "random(6..10#0.5)", "group": "Ungrouped variables", "name": "b"}, "la": {"templateType": "anything", "description": "", "definition": "random(0.5..5#0.5)", "group": "Ungrouped variables", "name": "la"}, "tol": {"templateType": "anything", "description": "", "definition": "0.0002", "group": "Ungrouped variables", "name": "tol"}}, "metadata": {"notes": "

6/02/2013:

\n


Finished first draft.

", "description": "

Given the PDF for $Y \\sim \\operatorname{Exp}(\\lambda)$ find the CDF, $P(a \\le Y \\le b)$ and $\\operatorname{E}[Y],\\;\\operatorname{Var}(Y)$

", "licence": "Creative Commons Attribution 4.0 International"}, "advice": "

a)

\n

We have \\[\\begin{eqnarray*} F_Y(y)&=&P(Y\\le y)\\\\&=&\\int_0^y\\var{la}e^{-\\var{la}x}dx\\\\&=&\\left[-e^{-\\var{la}x}\\right]_0^y=1-e^{-\\var{la}y}\\end{eqnarray*}\\]

\n

b)

\n

\\[\\begin{eqnarray*}P(\\var{a} \\leq Y \\leq \\var{b})&=&F_Y(\\var{b})-F_Y(\\var{a})\\\\&=&1-e^{-\\var{la}\\times \\var{b}}-(1-e^{-\\var{la}\\times \\var{a}})\\\\&=&e^{-\\var{la}\\times \\var{a}}-e^{-\\var{la}\\times \\var{b}}\\\\&=&\\var{tans2}=\\var{ans2}\\end{eqnarray*}\\] to 4 decimal places.

\n

c)

\n

The properties of the exponential distribution give:

\n

$\\displaystyle \\operatorname{E}[Y]=\\simplify[all,fractionNumbers]{1/{la}=2/{2*la}}$

\n

$\\displaystyle \\operatorname{Var}(Y)=\\simplify[all,fractionNumbers]{1/{la}^2=4/{4*la^2}}$

\n

 

", "functions": {}, "ungrouped_variables": ["a", "b", "la", "ans2", "tol", "tans2"], "showQuestionGroupNames": false, "variable_groups": [], "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/"}]}