// Numbas version: finer_feedback_settings {"name": "Calculate expectation and probabilities from Poisson distribution", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"thisnumber": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(thismany<8,thismany-1, random(3..7))", "description": "", "name": "thisnumber"}, "tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.001", "description": "", "name": "tol"}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(number1=2,0,1)", "description": "", "name": "v"}, "things": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"sales.\"", "description": "", "name": "things"}, "tprob2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(number1=2,e^(-thismany)*(1+thismany),e^(-thismany)*(1+thismany+thismany^2/2))", "description": "", "name": "tprob2"}, "thisaswell": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"a randomly selected employee receives a warning.\"", "description": "", "name": "thisaswell"}, "tprob1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(thismany^thisnumber)*e^(-thismany)/fact(thisnumber)", "description": "", "name": "tprob1"}, "descx": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"the number of sales per day\"", "description": "", "name": "descx"}, "sd": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(sqrt(thismany),3)", "description": "", "name": "sd"}, "thismany": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..10)", "description": "", "name": "thismany"}, "this": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"a randomly selected employee makes exactly \"", "description": "", "name": "this"}, "what": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"daily sales.\"", "description": "", "name": "what"}, "prob2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tprob2,3)", "description": "", "name": "prob2"}, "prob1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tprob1,3)", "description": "", "name": "prob1"}, "pre": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"The mean number of sales per day at a telecommunications centre is \"", "description": "", "name": "pre"}, "number1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(thismany<8,2, 3)", "description": "", "name": "number1"}, "else": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"per day.\"", "description": "", "name": "else"}, "something": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"Employees receive a warning if they make less than \"", "description": "", "name": "something"}}, "ungrouped_variables": ["pre", "what", "this", "things", "number1", "descx", "else", "thismany", "something", "tol", "v", "tprob1", "sd", "tprob2", "prob2", "thisnumber", "thisaswell", "prob1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Calculate expectation and probabilities from Poisson distribution", "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "thismany", "minValue": "thismany", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "thismany", "minValue": "thismany", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "sd+tol", "minValue": "sd-tol", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\n
Assuming a Poisson distribution for $X$, {descX}, write down the value of $\\lambda$.
\n$X \\sim \\operatorname{Poisson}(\\lambda)$
\n$\\lambda = $?[[0]]
\nFind $\\operatorname{E}[X]$ the expected {descX}.
\n$\\operatorname{E}[X]=$?[[1]]
\nFind the standard deviation for {what}.
\nStandard deviation = ? [[2]] (to 3 decimal places).
\n ", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "prob1+tol", "minValue": "prob1-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "prob2+tol", "minValue": "prob2-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\nFind the probability that {this} $\\var{thisnumber}$ {things}
\n$\\operatorname{P}(X=\\var{thisnumber})=$? [[0]] (to 3 decimal places).
\n\n
Find the probability that {thisaswell}
\nProbability = ? [[1]] (to 3 decimal places).
\n ", "showCorrectAnswer": true, "marks": 0}], "statement": "\n{pre} $\\var{thismany}$.
\n{something} $\\var{number1}$ {else}
\n\n ", "tags": ["checked2015", "expectation", "expected number", "MAS1403", "Poisson distribution", "poisson distribution", "probability", "Probability", "sc", "standard deviation", "statistical distributions", "statistics"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "
31/12/2012:
\nCan be configured to other applications using the string variables supplied. Hence added tag sc.
\nNot as yet properly tested.
\n26/11/14:
\nEdited the advice to better reflect the notation used on the module.
\n\n", "licence": "Creative Commons Attribution 4.0 International", "description": "\n \t\tApplication of the Poisson distribution given expected number of events per interval.
\n \t\tFinding probabilities using the Poisson distribution.
\n \t\t"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "a)
\n1. $X \\sim \\operatorname{Poisson}(\\var{thismany})$, so $\\lambda = \\var{thismany}$.
\n2. The expected number (or mean) is given by $\\operatorname{E}[X]=\\lambda=\\var{thismany}$
\n3. $\\operatorname{SD}(X)=\\sqrt{\\operatorname{Var}(X)}=\\sqrt{\\lambda}=\\sqrt{\\var{thismany}}=\\var{sd}$ to 3 decimal places.
\nb)
\n1. \\[ \\begin{eqnarray*}\\operatorname{P}(X = \\var{thisnumber}) &=& \\frac{\\var{thismany} ^ {\\var{thisnumber}}e ^ { -\\var{thismany}}} {\\var{thisnumber}!}\\\\& =& \\var{prob1} \\end{eqnarray*} \\] to 3 decimal places.
\n\n
2. If an employee receives a warning then he or she must have sold less than {number1}.
\nHence we need to find :
\n\\[ \\begin{eqnarray*}\\operatorname{P}(X < \\var{number1})& =& \\simplify[all,!collectNumbers]{P(X = 0) + P(X = 1) + {v}*P(X = 2)}\\\\& =& \\simplify[all,!collectNumbers]{e ^ { -thismany} + {thismany} * e ^ { -thismany} + {v} * (({thismany} ^ 2 * e ^ { -thismany}) / 2)} \\\\&=& \\var{prob2} \\end{eqnarray*} \\]
\nto 3 decimal places.
\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/"}]}