// Numbas version: finer_feedback_settings {"name": "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": [{"variable_groups": [], "variables": {"tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.0002", "description": "", "name": "tol"}, "ans2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tans2,4)", "description": "", "name": "ans2"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(6..10#0.5)", "description": "", "name": "b"}, "la": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0.5..5#0.5)", "description": "", "name": "la"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "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)))", "description": "", "name": "a"}, "tans2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "exp(-a*la)-exp(-b*la)", "description": "", "name": "tans2"}}, "ungrouped_variables": ["a", "b", "la", "ans2", "tol", "tans2"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Find CDF of given exponential distribution, and expectation and variance, ", "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"answer": "(1 + ( - (e ^ ({( - la)} * y))))", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "basic", "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "
Find the CDF of $Y$.
\n\n
$F_Y(y)=\\;$?[[0]], $y \\gt 0$.
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ans2+tol", "minValue": "ans2-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "Calculate:
\n$P(\\var{a} \\leq Y \\leq \\var{b})=\\;$?[[0]] (to 4 decimal places).
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"answer": "2/{2*la}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "all, fractionNumbers", "marks": 0.5, "vsetrangepoints": 5}, {"answer": "4/{4*la^2}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "all,fractionNumbers", "marks": 0.5, "vsetrangepoints": 5}], "type": "gapfill", "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).
", "showCorrectAnswer": true, "marks": 0}], "statement": "Suppose $Y \\sim \\operatorname{Exp}(\\var{la})$ with PDF $f_Y(y)=\\var{la}e^{-\\var{la}y},\\;\\;y \\gt 0$
", "tags": ["CDF", "cdf", "checked2015", "continuous distributions", "expectation", "exponential distribution", "MAS1604", "MAS2304", "PDF", "pdf", "Probability", "statistical distributions", "statistics", "variance"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "6/02/2013:
\n
Finished first draft.
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)$
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "a)
\nWe 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*}\\]
\nb)
\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.
\nc)
\nThe 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", "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/"}]}