// Numbas version: finer_feedback_settings {"name": "Simon's copy of Clodagh's copy of Poisson Distribution (printing errors)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"rulesets": {}, "tags": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "ungrouped_variables": ["l", "x", "n", "y", "answer1", "answer2", "l2", "pr0", "pr1", "pr2"], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "
rebelmaths
\nPrinting errors in the work produced by a particular film occur randomly at an average rate of p per page.
\n
i.What is the probability that a one page document will contain x1 printing error(s)?
ii.If a n page document is printed, calculate the probability of having more than x2 errors. Assume a Poisson distribution.
Please give your answer to 3 decimal places.
\nPrinting errors in the work produced by a particular film occur randomly at an average rate of $\\var{l}$ per page.
", "parts": [{"precisionPartialCredit": 0, "mustBeReducedPC": 0, "scripts": {}, "mustBeReduced": false, "precisionType": "dp", "marks": "3", "variableReplacements": [], "precision": "3", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "prompt": "What is the probability that a one page document will contain exactly $\\var{x}$ printing error(s)?
", "unitTests": [], "variableReplacementStrategy": "originalfirst", "maxValue": "answer1", "strictPrecision": false, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "correctAnswerStyle": "plain", "precisionMessage": "You have not given your answer to the correct precision.", "type": "numberentry", "showPrecisionHint": true, "minValue": "answer1", "customMarkingAlgorithm": "", "showCorrectAnswer": true}, {"precisionPartialCredit": 0, "mustBeReducedPC": 0, "scripts": {}, "mustBeReduced": false, "precisionType": "dp", "marks": "5", "variableReplacements": [], "precision": "3", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerFraction": false, "prompt": "If a $\\var{n}$ page document is printed, calculate the probability of having less than $\\var{y}$ errors.
", "unitTests": [], "variableReplacementStrategy": "originalfirst", "maxValue": "answer2", "strictPrecision": false, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "correctAnswerStyle": "plain", "precisionMessage": "You have not given your answer to the correct precision.", "type": "numberentry", "showPrecisionHint": true, "minValue": "answer2", "customMarkingAlgorithm": "", "showCorrectAnswer": true}], "preamble": {"css": "", "js": ""}, "functions": {}, "variables": {"answer2": {"name": "answer2", "templateType": "anything", "definition": "if(y=3, ((e^-l2)*(l2^0))/0!+((e^-l2)*(l2^(1)))/(1)!+((e^-l2)*(l2^2))/2!,((e^-l2)*(l2^0))/0!+((e^-l2)*(l2^(1)))/(1)!)", "description": "", "group": "Ungrouped variables"}, "answer1": {"name": "answer1", "templateType": "anything", "definition": "((e^-l)*(l^x))/x!", "description": "", "group": "Ungrouped variables"}, "pr2": {"name": "pr2", "templateType": "anything", "definition": "((e^-l2)*(l2^2))/2!", "description": "", "group": "Ungrouped variables"}, "pr0": {"name": "pr0", "templateType": "anything", "definition": "((e^-l2)*(l2^0))/0!", "description": "", "group": "Ungrouped variables"}, "l": {"name": "l", "templateType": "anything", "definition": "random(0.05..0.4#0.1)", "description": "average, lambda
", "group": "Ungrouped variables"}, "x": {"name": "x", "templateType": "anything", "definition": "random(0..2)", "description": "number of customers entering the shop
", "group": "Ungrouped variables"}, "n": {"name": "n", "templateType": "anything", "definition": "random(6..15#1)", "description": "time interval
", "group": "Ungrouped variables"}, "pr1": {"name": "pr1", "templateType": "anything", "definition": "((e^-l2)*(l2^1))/1!", "description": "", "group": "Ungrouped variables"}, "y": {"name": "y", "templateType": "anything", "definition": "3", "description": "upper value of X
", "group": "Ungrouped variables"}, "l2": {"name": "l2", "templateType": "anything", "definition": "l*n", "description": "", "group": "Ungrouped variables"}}, "advice": "(a)
\nRemember that for a Poisson random variable:
\\begin{align}
\\operatorname{P}(X=x)&=\\dfrac{\\lambda^x\\times e^{-\\lambda}}{x!}\\\\
\\end{align}
\\[ \\begin{eqnarray*}\\operatorname{P}(X = \\var{x}) &=& \\frac{\\var{l} ^ {\\var{x}}e ^ { -\\var{l}}} {\\var{x}!}\\\\& =& \\var{precround(answer1,3)} \\end{eqnarray*} \\] to 3 decimal places.
\n\n
(b)
\nFor a $\\var{n}$ page document, $\\lambda=\\var{n} \\times \\var{l} = \\var{l2}$
\nThe probability of having less than $\\var{y}$ errors is given by:
\n$P(X < \\var{y}) = P(X=0) + P(X=1) +P(X=2)$
\nwhere
\n$P(X=0) =\\frac{\\var{l2}^{0}e^{-\\var{l2}}}{0!}=\\var{precround(pr0,5)}$
\n$P(X=1) =\\frac{\\var{l2}^{1}e^{-\\var{l2}}}{1!}=\\var{precround(pr1,5)}$
\n$P(X=2) =\\frac{\\var{l2}^{2}e^{-\\var{l2}}}{2!}=\\var{precround(pr2,5)}$
\nHence
\n$P(X < \\var{y})$ = $\\var{precround(pr0,5)}+\\var{precround(pr1,5)}+\\var{precround(pr2,5)}=\\var{precround(answer2,5)}$
", "extensions": [], "type": "question", "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}