// Numbas version: finer_feedback_settings {"name": "Probability Distributions", "feedback": {"allowrevealanswer": true, "showtotalmark": true, "advicethreshold": 0, "intro": "", "feedbackmessages": [], "showanswerstate": true, "showactualmark": true, "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "never"}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "allQuestions": true, "shuffleQuestions": false, "percentPass": 0, "duration": 0, "pickQuestions": 0, "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "allowregen": true, "showresultspage": "oncompletion", "preventleave": true, "browse": true, "showfrontpage": true}, "metadata": {"description": "

Normal Distribution, Binomial Distribution, Poisson Distribution 

\n

rebel

\n

rebelmaths

", "licence": "None specified"}, "type": "exam", "questions": [], "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": [{"name": " BS3.1 Poisson or Binomial?", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}], "tags": ["Binomial Distribution", "Binomial distribution", "binomial distribution", "Poisson distribution", "poisson distribution", "random variables", "sc", "statistical distributions", "statistics"], "metadata": {"description": "

Given descriptions of  3 random variables, decide whether or not each is from a Poisson or Binomial distribution.

", "licence": "None specified"}, "statement": "\n

Which of the following random variables could be modelled with a binomial distribution and which could be modelled with a Poisson distribution?

\n

You will lose 1 mark for every incorrect answer. The minimum mark is 0.

\n ", "advice": "

No solution given.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"p2": {"name": "p2", "group": "Ungrouped variables", "definition": "switch(t=0,random(0..abs(b)-1 except p1),random(0..abs(pd)-1 except p3))", "description": "", "templateType": "anything", "can_override": false}, "p3": {"name": "p3", "group": "Ungrouped variables", "definition": "random(0..abs(pd)-1)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "\n [\"20% of eggs from a family-run farm are bad. r is the number of bad eggs in a box of a dozen.\",\n \"A salesperson has a 50% chance of making a sale on a customer visit and she arranges 10 visits in a day. Let r be the number of sales that day.\",\n \"30% of items off a factory production line have been shown to have defects. Let r be the number of defectives in a box of 20 such items.\",\n \"One in ten new small businesses in the north-east goes bust within a year. Let r be the number of small businesses that fail in the next year out of thirty that have been set up.\",\n \"The probability that an office photocopier will fail on any given day is 0.15. The human resources office at Newcastle University has ten such photocopiers; Let r be the number of photocopiers that fail today.\",\n \"Callers to the Vodaphone call centre will get through to an operator immediately with probability 0.25. r is the number of callers that speak to an operator immediately out of thirty such callers.\",\n \"Experience has shown that two in every ten components produced by a circuitboard company will be defective. A random sample of 100 components is inspected for defects, and r is the number of defectives in this sample.\"]\n ", "description": "", "templateType": "anything", "can_override": false}, "mm": {"name": "mm", "group": "Ungrouped variables", "definition": "[[1,-1],[1-2*t,2*t-1],[-1,1]]", "description": "", "templateType": "anything", "can_override": false}, "p1": {"name": "p1", "group": "Ungrouped variables", "definition": "random(0..abs(b)-1)", "description": "", "templateType": "anything", "can_override": false}, "ch1": {"name": "ch1", "group": "Ungrouped variables", "definition": "b[p1]", "description": "", "templateType": "anything", "can_override": false}, "ch2": {"name": "ch2", "group": "Ungrouped variables", "definition": "switch(t=0,b[p2],pd[p2])", "description": "", "templateType": "anything", "can_override": false}, "ch3": {"name": "ch3", "group": "Ungrouped variables", "definition": "pd[p3]", "description": "", "templateType": "anything", "can_override": false}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "", "templateType": "anything", "can_override": false}, "pd": {"name": "pd", "group": "Ungrouped variables", "definition": "\n [\"r is the number of flights sold per hour by an online travel agency. This travel agency usually sells 10 flights per hour.\",\n \"r is the number of cars sold by a local garage in a month. This garage usually sells about 10 cars per month.\",\n \"The number of calls, r, received at the British Passport Office in Durham occurs at the rate of 10 a minute.\",\n \"We are interested in r, the number of machine breakdowns in a day. Such breakdowns at a particular IT company occur at a rate of eight per week.\",\n \"Lemons are packed in boxes; the probability that a lemon is bad once a box is opened is 0.05. Let r be the number of boxes with at least one bad lemon.\",\n \"On average, three patients arrive at a local Accident and Emergency department every hour. We count the number, r, of patients in an hour period.\",\n \"About five customers arrive at a fish shop queue every ten minutes during the lunch time rush. We count r, the number of customers arriving during the lunch time rush.\"]\n ", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["p2", "p3", "b", "mm", "ch3", "ch1", "ch2", "p1", "t", "pd"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "m_n_x", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "minAnswers": 0, "maxAnswers": 0, "shuffleChoices": true, "shuffleAnswers": false, "displayType": "radiogroup", "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "choices": ["{ch1}", "{ch2}", "{ch3}"], "matrix": "mm", "layout": {"type": "all", "expression": ""}, "answers": ["Binomial Distribution", "Poisson Distribution"]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Binomial Distribution (Cycling)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}], "tags": ["binomial", "Binomial", "REBEL", "rebel", "Rebel", "rebelmaths"], "metadata": {"description": "

It is estimated that 30% of all CIT students cycle to college. If a random sample of eight CIT students is chosen, calculate the probability that...

\n

rebelmaths

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

Please give your answer to at least 3 decimal places.

\n

It is estimated that $\\var{p_perc}$% of all CIT students cycle to college. A random sample of $\\var{n}$ CIT students is chosen.

\n

", "advice": "

Part (a)

\n

If a random variable $X$ follows a binomial distribution with parameters $n$ and $p$. The probability of $r$ successes out of $n$ trials is given by:

\n

$P(X=r)=P(r,n)=C^n_{r}p^{r}q^{n-r}$

\n

where $p$ is the probability of success for each trial and $q$ is the probability of failure for each trial.

\n

The probability that a student cycles to college is $\\var{p}$, therefore $p=\\var{p}$ and $q=1-\\var{p}=\\var{q}$.

\n

We are interested in claculating the probability that none of the sample of $\\var{n}$ students cycle to college so $r=0$ and $n=\\var{n}$

\n

$P(\\var{r0}, \\var{n})= C^\\var{n}_{\\var{r0}}$ $\\var{p}^\\var{r0}$ $\\var{q}^{\\var{n}-\\var{r0}}$ 

\n

$P(\\var{r0}, \\var{n})= \\var{pr0}$

\n

\n

Part (b)

\n

We are interested in claculating the probability that at least $\\var{r}$ of the $\\var{n}$ students cycle to college. Let $X$ represent the number of students that cycle to college. We need to calculate:

\n

$P(X \\geq \\var{r}) = P(X= \\var{r}) + P(X= \\var{r+1})+...+ P(X=\\var{n})$

\n

\n

Since $P(X=\\var{r0})+P(X=\\var{r0+1})+...+P(X=\\var{n})=\\var{r0+1}$ 

\n

We may write 

\n

$P(X \\geq \\var{r}) = 1-P(X= \\var{r0}) - P(X=\\var{r0+1})-...- P(X=\\var{r-1})$

\n

\n

where

\n

$P(X= \\var{r0})=P(\\var{r0}, \\var{n})= C^\\var{n}_{\\var{r0}}$ $\\var{p}^\\var{r0}$ $\\var{q}^{\\var{n}-\\var{r0}}=\\var{pr0}$ 

\n

$P(X=1) =P(1, \\var{n})= C^\\var{n}_{1}$ $\\var{p}^{1}$ $\\var{q}^{\\var{n}-1}$ $=\\var{pr1}$

\n

$P(X=2) = P(2, \\var{n})=$ $C^\\var{n}_{2}$ $\\var{p}^{2}$ $\\var{q}^{\\var{n}-2}$ $=\\var{pr2}$

\n

\n

Then 

\n

$P(X \\geq \\var{r}) = 1-\\var{qn}-\\var{pr1}-\\var{pr2}=\\var{answer2}$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"pr1": {"name": "pr1", "group": "Ungrouped variables", "definition": "n*p*q^(n-1)", "description": "

probability that r = 1

", "templateType": "anything", "can_override": false}, "r0": {"name": "r0", "group": "Ungrouped variables", "definition": "0", "description": "", "templateType": "anything", "can_override": false}, "p_perc": {"name": "p_perc", "group": "Ungrouped variables", "definition": "p*100", "description": "

percentage of students that cycle to college

", "templateType": "anything", "can_override": false}, "pr2": {"name": "pr2", "group": "Ungrouped variables", "definition": "((n*(n-1))/2)*(p^2)*q^(n-2)", "description": "

probability that r = 2

", "templateType": "anything", "can_override": false}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "1-p", "description": "

probability tha an individual does not cycle to college

", "templateType": "anything", "can_override": false}, "answer2": {"name": "answer2", "group": "Ungrouped variables", "definition": "1-answer1", "description": "", "templateType": "anything", "can_override": false}, "pr3": {"name": "pr3", "group": "Ungrouped variables", "definition": "((n*(n-1)*(n-2))/6)*(p^3)*(q^(n-3))", "description": "

probability that r = 3

", "templateType": "anything", "can_override": false}, "r": {"name": "r", "group": "Ungrouped variables", "definition": "3", "description": "

more than r of the students cycle to college

", "templateType": "anything", "can_override": false}, "n2": {"name": "n2", "group": "Ungrouped variables", "definition": "n-2", "description": "", "templateType": "anything", "can_override": false}, "answer1": {"name": "answer1", "group": "Ungrouped variables", "definition": "if(r=2,pr0+pr1, pr0+pr1+pr2)", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "random(0.1..0.4#0.05)", "description": "

the probability that an individual student cycles to college

", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(6..12)", "description": "

sample size

", "templateType": "anything", "can_override": false}, "qn": {"name": "qn", "group": "Ungrouped variables", "definition": "q^n", "description": "", "templateType": "anything", "can_override": false}, "pr0": {"name": "pr0", "group": "Ungrouped variables", "definition": "q^n", "description": "

probability that r = 0

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["p", "p_perc", "n", "q", "r", "pr0", "pr1", "pr2", "pr3", "answer1", "answer2", "qn", "r0", "n2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Calculate the probability that none of the $\\var{n}$ students in the sample cycle to college.

", "minValue": "(q^n)-0.001", "maxValue": "(q^n)+0.001", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Calculate the probability that at least $\\var{r}$ of the $\\var{n}$ students cycle to college.

", "minValue": "answer2 -0.001", "maxValue": "answer2 +0.001", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Catherine's copy of Poisson Distribution (Dentist)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}], "tags": [], "metadata": {"description": "

The number of patients arriving at a dentist’s surgery each afternoon follows
a Poisson distribution, with a mean of four patients per hour.
Calculate the probability that in a particular one-hour period

", "licence": "None specified"}, "statement": "

Please give your answer to at least 3 decimal places.

\n

The number of patients arriving at a dentist’s surgery each afternoon follows a Poisson distribution, with a mean of $\\var{l}$ patients per hour.

\n

", "advice": "

Part (a)

\n

Remember that for a Poisson random variable:
\\begin{align}
\\operatorname{P}(X=x)&=\\dfrac{\\lambda^x\\times e^{-\\lambda}}{x!}\\\\
\\end{align}

\n

1.\\[ \\begin{eqnarray*}\\operatorname{P}(X = \\var{x}) &=& \\frac{\\var{l} ^ {\\var{x}}e ^ { -\\var{l}}} {\\var{x}!}\\\\& =& \\var{answer1} \\end{eqnarray*} \\] to 3 decimal places.

\n

 

\n

Part (b)

\n

The probability that in a particular one hour period, the number of patients entering the waiting room will be between $\\var{x}$ and $\\var{y}$ inclusive is given by:

\n

$P(\\var{x} \\leq X\\leq\\var{y}) = P(X=\\var{x}) + P(X=\\var{x+1}) +P(X=\\var{y})$

\n

where 

\n

$P(X=\\var{x}) =\\frac{\\var{l}^{\\var{x}}e^{-\\var{l}}}{\\var{x}!}=\\var{prx}$

\n

$P(X=\\var{x+1}) =\\frac{\\var{l}^{\\var{x+1}}e^{-\\var{l}}}{\\var{x+1}!}=\\var{prx1}$

\n

$P(X=\\var{y}) =\\frac{\\var{l}^{\\var{y}}e^{-\\var{l}}}{\\var{y}!}=\\var{pry}$

\n

Hence 

\n

$P(\\var{x} \\leq X \\leq \\var{y})=$ $\\var{prx}+\\var{prx1}+\\var{pry}=\\var{answer2}$

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"n": {"name": "n", "group": "Ungrouped variables", "definition": "random(10..50#5)", "description": "

time interval

", "templateType": "anything", "can_override": false}, "answer1": {"name": "answer1", "group": "Ungrouped variables", "definition": "((e^-l)*(l^x))/x!", "description": "", "templateType": "anything", "can_override": false}, "prx": {"name": "prx", "group": "Ungrouped variables", "definition": "((e^-l)*(l^x))/x!", "description": "", "templateType": "anything", "can_override": false}, "answer2": {"name": "answer2", "group": "Ungrouped variables", "definition": "((e^-l)*(l^x))/x!+((e^-l)*(l^(x+1)))/(x+1)!+((e^-l)*(l^y))/y!", "description": "", "templateType": "anything", "can_override": false}, "y": {"name": "y", "group": "Ungrouped variables", "definition": "x+2", "description": "

upper value of X

", "templateType": "anything", "can_override": false}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "random(1..5#1)", "description": "

time hour

", "templateType": "anything", "can_override": false}, "x": {"name": "x", "group": "Ungrouped variables", "definition": "random(3..12)", "description": "

number of customers entering the shop

", "templateType": "anything", "can_override": false}, "prx1": {"name": "prx1", "group": "Ungrouped variables", "definition": "((e^-l)*(l^(x+1)))/(x+1)!", "description": "", "templateType": "anything", "can_override": false}, "pry": {"name": "pry", "group": "Ungrouped variables", "definition": "((e^-l)*(l^y))/y!", "description": "", "templateType": "anything", "can_override": false}, "l": {"name": "l", "group": "Ungrouped variables", "definition": "random(5..10#1)", "description": "

average, lambda

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["l", "x", "n", "y", "t", "answer1", "answer2", "prx", "prx1", "pry"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Calculate the probability that in a particular one-hour period exactly $\\var{x}$ patients will arrive.

", "minValue": "answer1-0.001", "maxValue": "answer1+0.001", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Find the probability that in a particular one hour period, the number of patients entering the waiting room will be between $\\var{x}$ and $\\var{y}$ inclusive.

", "minValue": "answer2 -0.001", "maxValue": "answer2 +0.001", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Poisson (sales)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "Patricia Cogan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3359/"}], "tags": ["expectation", "expected number", "poisson distribution", "Poisson distribution", "probabilities", "probability", "Probability", "rebel", "Rebel", "REBEL", "rebelmaths", "sc", "standard deviation", "statistical distributions", "statistics"], "metadata": {"description": "

Application of the Poisson distribution given expected number of events per interval.

\n

Finding probabilities using the Poisson distribution.

\n

rebelmaths

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

{pre} $\\var{thismany}$.

\n

{something} $\\var{number1}$ {else}

\n

 The Poisson distribution formula: $P(r)=\\frac{\\lambda^re^{-\\lambda}}{r!}$ or $P(r)=e^{-\\lambda}\\left[\\frac{\\lambda^r}{r!}\\right]$

", "advice": "

a)

\n

1. $X \\sim \\operatorname{Poisson}(\\var{thismany})$, so $\\lambda = \\var{thismany}$.

\n

\n

b)

\n

Remember that for a Poisson random variable:
\\begin{align}
\\operatorname{P}(X=x)&=\\dfrac{\\lambda^x\\times e^{-\\lambda}}{x!}\\\\
\\end{align}

\n

1.\\[ \\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}.

\n

Hence 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*} \\]

\n

to 3 decimal places.

\n

 

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"pre": {"name": "pre", "group": "Ungrouped variables", "definition": "\"The mean number of sales per day at a telecommunications centre is \"", "description": "", "templateType": "anything", "can_override": false}, "what": {"name": "what", "group": "Ungrouped variables", "definition": "\"daily sales.\"", "description": "", "templateType": "anything", "can_override": false}, "this": {"name": "this", "group": "Ungrouped variables", "definition": "\"a randomly selected employee makes exactly \"", "description": "", "templateType": "anything", "can_override": false}, "things": {"name": "things", "group": "Ungrouped variables", "definition": "\"sales.\"", "description": "", "templateType": "anything", "can_override": false}, "number1": {"name": "number1", "group": "Ungrouped variables", "definition": "if(thismany<8,2, 3)", "description": "", "templateType": "anything", "can_override": false}, "descx": {"name": "descx", "group": "Ungrouped variables", "definition": "\"the number of sales per day\"", "description": "", "templateType": "anything", "can_override": false}, "else": {"name": "else", "group": "Ungrouped variables", "definition": "\"per day.\"", "description": "", "templateType": "anything", "can_override": false}, "thismany": {"name": "thismany", "group": "Ungrouped variables", "definition": "random(5..10)", "description": "", "templateType": "anything", "can_override": false}, "something": {"name": "something", "group": "Ungrouped variables", "definition": "\"Employees receive a warning if they make less than \"", "description": "", "templateType": "anything", "can_override": false}, "tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.001", "description": "", "templateType": "anything", "can_override": false}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "if(number1=2,0,1)", "description": "", "templateType": "anything", "can_override": false}, "tprob1": {"name": "tprob1", "group": "Ungrouped variables", "definition": "(thismany^thisnumber)*e^(-thismany)/fact(thisnumber)", "description": "", "templateType": "anything", "can_override": false}, "sd": {"name": "sd", "group": "Ungrouped variables", "definition": "precround(sqrt(thismany),3)", "description": "", "templateType": "anything", "can_override": false}, "tprob2": {"name": "tprob2", "group": "Ungrouped variables", "definition": "if(number1=2,e^(-thismany)*(1+thismany),e^(-thismany)*(1+thismany+thismany^2/2))", "description": "", "templateType": "anything", "can_override": false}, "prob2": {"name": "prob2", "group": "Ungrouped variables", "definition": "precround(tprob2,3)", "description": "", "templateType": "anything", "can_override": false}, "thisnumber": {"name": "thisnumber", "group": "Ungrouped variables", "definition": "if(thismany<8,thismany-1, random(3..7))", "description": "", "templateType": "anything", "can_override": false}, "thisaswell": {"name": "thisaswell", "group": "Ungrouped variables", "definition": "\"a randomly selected employee receives a warning.\"", "description": "", "templateType": "anything", "can_override": false}, "prob1": {"name": "prob1", "group": "Ungrouped variables", "definition": "precround(tprob1,3)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["pre", "what", "this", "things", "number1", "descx", "else", "thismany", "something", "tol", "v", "tprob1", "sd", "tprob2", "prob2", "thisnumber", "thisaswell", "prob1"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Assuming a Poisson distribution for {descX}, write down the value of $\\lambda$.

\n

$\\lambda = $[[0]]?

\n

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "thismany", "maxValue": "thismany", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Find the probability that {this} $\\var{thisnumber}$ {things}

\n

$\\operatorname{P}(r=\\var{thisnumber})=$? [[0]] (to 3 decimal places).

\n

 

\n

Find the probability that {thisaswell}

\n

$\\operatorname{P}(r < \\var{number1})= $? [[1]] (to 3 decimal places).

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "prob1-tol", "maxValue": "prob1+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "prob2-0.005", "maxValue": "prob2+0.005", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Clodagh's copy of Poisson Distribution (printing errors)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}], "tags": ["rebelmaths"], "metadata": {"description": "

rebelmaths

\n

Printing 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.

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

Please give your answer to at least 3 decimal places.

\n

Printing errors in the work produced by a particular film occur randomly at an average rate of $\\var{l}$ per page.

\n

\n

 The Poisson distribution formula: $P(r)=\\frac{\\lambda^re^{-\\lambda}}{r!}$ or $P(r)=e^{-\\lambda}\\left[\\frac{\\lambda^r}{r!}\\right]$

", "advice": "

Part (a)

\n

Remember that for a Poisson random variable:
\\begin{align}
\\operatorname{P}(X=x)&=\\dfrac{\\lambda^x\\times e^{-\\lambda}}{x!}\\\\
\\end{align}

\n

1.\\[ \\begin{eqnarray*}\\operatorname{P}(X = \\var{x}) &=& \\frac{\\var{l} ^ {\\var{x}}e ^ { -\\var{l}}} {\\var{x}!}\\\\& =& \\var{answer1} \\end{eqnarray*} \\] to 3 decimal places.

\n

 

\n

Part (b)

\n

2. For a $\\var{n}$ page document, $\\lambda=\\var{n} \\times \\var{l} = \\var{l2}$

\n

The 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)$

\n

where 

\n

$P(X=0) =\\frac{\\var{l2}^{0}e^{-\\var{l2}}}{0!}=\\var{pr0}$

\n

$P(X=1) =\\frac{\\var{l2}^{1}e^{-\\var{l2}}}{1!}=\\var{pr1}$

\n

$P(X=1) =\\frac{\\var{l2}^{2}e^{-\\var{l2}}}{2!}=\\var{pr2}$

\n

Hence 

\n

$P(X < \\var{y})$ = $\\var{pr0}+\\var{pr1}+\\var{pr2}=\\var{answer2}$

", "rulesets": {}, "variables": {"answer1": {"name": "answer1", "group": "Ungrouped variables", "definition": "((e^-l)*(l^x))/x!", "description": "", "templateType": "anything"}, "l": {"name": "l", "group": "Ungrouped variables", "definition": "random(0.05..0.4#0.1)", "description": "

average, lambda

", "templateType": "anything"}, "answer2": {"name": "answer2", "group": "Ungrouped variables", "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": "", "templateType": "anything"}, "l2": {"name": "l2", "group": "Ungrouped variables", "definition": "l*n", "description": "", "templateType": "anything"}, "pr0": {"name": "pr0", "group": "Ungrouped variables", "definition": "((e^-l2)*(l2^0))/0!", "description": "", "templateType": "anything"}, "pr2": {"name": "pr2", "group": "Ungrouped variables", "definition": "((e^-l2)*(l2^2))/2!", "description": "", "templateType": "anything"}, "y": {"name": "y", "group": "Ungrouped variables", "definition": "3", "description": "

upper value of X

", "templateType": "anything"}, "x": {"name": "x", "group": "Ungrouped variables", "definition": "random(0..2)", "description": "

number of customers entering the shop

", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(6..15#1)", "description": "

time interval

", "templateType": "anything"}, "pr1": {"name": "pr1", "group": "Ungrouped variables", "definition": "((e^-l2)*(l2^1))/1!", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["l", "x", "n", "y", "answer1", "answer2", "l2", "pr0", "pr1", "pr2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is the probability that a one page document will contain exactly $\\var{x}$ printing error(s)?

", "minValue": "answer1-0.001", "maxValue": "answer1+0.001", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

If a $\\var{n}$ page document is printed, calculate the probability of having less than $\\var{y}$ errors. 

", "minValue": "answer2 -0.001", "maxValue": "answer2 +0.001", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Clodagh's copy of BS3.3 Binomial Cookies", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}], "tags": ["Binomial Distribution", "binomial distribution", "Binomial distribution", "expectation", "expected number", "probabilities", "probability", "Probability", "rebelmaths", "sc", "standard deviation", "statistical distributions", "statistics"], "metadata": {"description": "

rebelmaths

\n

Application of the binomial distribution given probabilities of success of an event.

\n

Finding probabilities using the binomial distribution.

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

{pre} $\\var{thismany}${post}

\n

{something} $\\var{number1}$ {else}

\n

 

", "advice": "

a)

\n

$X \\sim \\operatorname{bin}(\\var{number1},\\var{prob})$, so $n= \\var{number1},\\;\\;p=\\var{prob}$.

\n

\n

b)

\n

1. \\[ \\begin{eqnarray*}\\operatorname{P}(X = \\var{thisnumber}) &=& \\dbinom{\\var{number1}}{\\var{thisnumber}}\\times\\var{prob}^{\\var{thisnumber}}\\times(1-\\var{prob})^{\\var{number1-thisnumber}}\\\\& =& \\var{comb(number1,thisnumber)} \\times\\var{prob}^{\\var{thisnumber}}\\times\\var{1-prob}^{\\var{number1-thisnumber}}\\\\&=&\\var{prob1}\\end{eqnarray*} \\] to 3 decimal places.

\n

 

\n

2. 

\n

\\[ \\begin{eqnarray*}\\operatorname{P}(X \\leq \\var{thatnumber})& =& \\simplify[all,!collectNumbers]{P(X = 0) + P(X = 1) + {v}*P(X = 2)+ {v1}*P(X = 3)}\\\\& =& \\simplify[zeroFactor,zeroTerm,unitFactor]{{1 -prob} ^ {number1}+ {number1} *{prob} *{1 -prob} ^ {number1 -1} + {v} * ({number1} * {number1 -1}/2)* {prob} ^ 2 *( {1 -prob} ^ {number1 -2})+ {v1} * ({number1} * {number1 -1}*{number1-2}/(3*2))* {prob} ^ 3 *( {1 -prob} ^ {number1 -3})}\\\\& =& \\var{prob3}\\end{eqnarray*} \\]

\n

to 3 decimal places.

\n

 

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"pre": {"name": "pre", "group": "Ungrouped variables", "definition": "' '", "description": "", "templateType": "anything", "can_override": false}, "descx1": {"name": "descx1", "group": "Ungrouped variables", "definition": "\"number of chocolate chip cookies in our sample:\"", "description": "", "templateType": "anything", "can_override": false}, "tprob3c": {"name": "tprob3c", "group": "Ungrouped variables", "definition": "if(thatnumber=1,(1-prob)^number1+number1*prob*(1-prob)^(number1-1),0)", "description": "", "templateType": "anything", "can_override": false}, "tprob3b": {"name": "tprob3b", "group": "Ungrouped variables", "definition": "if(thatnumber=3,(1-prob)^number1+number1*prob*(1-prob)^(number1-1)+number1*(number1-1)*prob^2*(1-prob)^(number1-2)/2+number1*(number1-1)*(number1-2)*prob^3*(1-prob)^(number1-3)/(3*2),0)", "description": "", "templateType": "anything", "can_override": false}, "tprob3a": {"name": "tprob3a", "group": "Ungrouped variables", "definition": "if(thatnumber=2,(1-prob)^number1+number1*prob*(1-prob)^(number1-1)+number1*(number1-1)*prob^2*(1-prob)^(number1-2)/2,0)", "description": "", "templateType": "anything", "can_override": false}, "something": {"name": "something", "group": "Ungrouped variables", "definition": "''", "description": "", "templateType": "anything", "can_override": false}, "thisnumber": {"name": "thisnumber", "group": "Ungrouped variables", "definition": "if(number1<6,random(2..3), if(number1<8,random(2..4),random(3..6)))", "description": "", "templateType": "anything", "can_override": false}, "things": {"name": "things", "group": "Ungrouped variables", "definition": "\"chocolate chip cookies.\"", "description": "", "templateType": "anything", "can_override": false}, "descx": {"name": "descx", "group": "Ungrouped variables", "definition": "\"the number of chocolate chip cookies\"", "description": "", "templateType": "anything", "can_override": false}, "tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.001", "description": "", "templateType": "anything", "can_override": false}, "prob": {"name": "prob", "group": "Ungrouped variables", "definition": "thismany/100", "description": "", "templateType": "anything", "can_override": false}, "thisaswell": {"name": "thisaswell", "group": "Ungrouped variables", "definition": "\"our selection contains no more than \"", "description": "", "templateType": "anything", "can_override": false}, "else": {"name": "else", "group": "Ungrouped variables", "definition": "\"biscuits are selected at random.\"", "description": "", "templateType": "anything", "can_override": false}, "v1": {"name": "v1", "group": "Ungrouped variables", "definition": "if(thatnumber=3,1,0)", "description": "", "templateType": "anything", "can_override": false}, "number1": {"name": "number1", "group": "Ungrouped variables", "definition": "random(5..12)*random([1,1,1,1,1,1,2,2,5])", "description": "", "templateType": "anything", "can_override": false}, "post": {"name": "post", "group": "Ungrouped variables", "definition": "\"% of biscuits made by a baker are chocolate chip cookies.\"", "description": "", "templateType": "anything", "can_override": false}, "prob2": {"name": "prob2", "group": "Ungrouped variables", "definition": "precround(tprob2,3)", "description": "", "templateType": "anything", "can_override": false}, "prob3": {"name": "prob3", "group": "Ungrouped variables", "definition": "precround(tprob3,3)", "description": "", "templateType": "anything", "can_override": false}, "prob1": {"name": "prob1", "group": "Ungrouped variables", "definition": "precround(tprob1,3)", "description": "", "templateType": "anything", "can_override": false}, "thatnumber": {"name": "thatnumber", "group": "Ungrouped variables", "definition": "random(1,2,3)", "description": "", "templateType": "anything", "can_override": false}, "thismany": {"name": "thismany", "group": "Ungrouped variables", "definition": "random(8..43)", "description": "", "templateType": "anything", "can_override": false}, "this": {"name": "this", "group": "Ungrouped variables", "definition": "\"our selection contains exactly \"", "description": "", "templateType": "anything", "can_override": false}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "if(thatnumber=1,0,1)", "description": "", "templateType": "anything", "can_override": false}, "tprob1": {"name": "tprob1", "group": "Ungrouped variables", "definition": "comb(number1,thisnumber)*prob^thisnumber*(1-prob)^(number1-thisnumber)", "description": "", "templateType": "anything", "can_override": false}, "tprob3": {"name": "tprob3", "group": "Ungrouped variables", "definition": "tprob3a+tprob3b+tprob3c", "description": "", "templateType": "anything", "can_override": false}, "tprob2": {"name": "tprob2", "group": "Ungrouped variables", "definition": "if(thatnumber=2,(1-prob)^number1+number1*prob*(1-prob)^(number1-1)+number1*(number1-1)*prob^2*(1-prob)^(number1-2)/2,(1-prob)^number1+number1*prob*(1-prob)^(number1-1))", "description": "", "templateType": "anything", "can_override": false}, "sd": {"name": "sd", "group": "Ungrouped variables", "definition": "precround(sqrt(number1*prob*(1-prob)),3)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["pre", "thatnumber", "this", "things", "prob1", "descx", "descx1", "thisnumber", "else", "thismany", "number1", "something", "tol", "v", "tprob1", "post", "tprob2", "prob2", "prob", "thisaswell", "sd", "v1", "tprob3a", "prob3", "tprob3b", "tprob3c", "tprob3"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Assuming a binomial distribution for {descX}, write down the values of $n$ and $p$.

\n

$n=\\; $[[0]]        $p=\\;$[[1]]

\n

\n

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "number1", "maxValue": "number1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "prob", "maxValue": "prob", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Find the probability that {this} $\\var{thisnumber}$ {things}

\n

$\\operatorname{P}(r=\\var{thisnumber})=$ [[0]] (to 3 decimal places).

\n

 

\n

Find the probability that {thisaswell} {thatnumber} {things}

\n

$\\operatorname{P}(r\\leq\\var{thatnumber})=$ [[1]] (to 3 decimal places).

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "prob1-tol", "maxValue": "prob1+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "prob3-tol", "maxValue": "prob3+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Binomial (practice of formula)", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}], "tags": ["binomial distribution", "Binomial Distribution", "Binomial distribution", "CDF", "cdf", "CDF of binomial distribution", "cr1", "cumulative density function", "Discrete random variables.", "distributions", "Expectation of binomial distribution", "probability", "Probability", "random variables", "REBEL", "rebel", "Rebel", "rebelmaths", "statistics", "tested1", "variance of binomial distribution"], "metadata": {"description": "

$X \\sim \\operatorname{Binomial}(n,p)$. Find $P(X=a)$, $P(X \\leq b)$, $E[X],\\;\\operatorname{Var}(X)$.

\n

rebelmaths

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

Answer the following questions on the Binomial Distribution.

\n

Suppose \\[X \\sim \\operatorname{Binomial}(\\var{n},\\var{p}),\\]

\n

that is $n=\\var{n}$ and $p=\\var{p}$.

", "advice": "

a)
\\[\\simplify[std,!otherNumbers]{P(X = {x1}) = {n}! / ({n -x1}! * {x1}!) * {p} ^ {x1} * (1 -{p}) ^ {n -x1}} = \\var{ans1}\\]

\n

to 3 decimal places.

\n

b)

\n

We have:

\n

\\[ \\begin{eqnarray*} F_X (\\var{x2}) &=& P(X \\le \\var{x2}) =\\simplify[std]{ P(X = 0) + P(X = 1) + P(X = 2) + {v3} * P(X = 3) + {v4} * P(X = 4)}\\\\ &=& \\simplify[unitFactor,zeroTerm,zeroFactor]{(1 -{p}) ^ {n} + {n} * (1 -{p}) ^ {n -1} * {p} + {(n * (n -1)) / 2} * (1 -{p}) ^ {n -2} * {p} ^ 2 + {v3} * {Comb(n , 3)} * (1 -{p}) ^ {n -3} * {p} ^ 3 + {v4} * {Comb(n , 4)} * (1 -{p}) ^ {n -4} * {p} ^ 4}\\\\ &=&\\var{ans2} \\end{eqnarray*} \\]
to 3 decimal places.

\n

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "variables": {"w": {"name": "w", "group": "Ungrouped variables", "definition": "random(1..100)", "description": "", "templateType": "anything"}, "ans1": {"name": "ans1", "group": "Ungrouped variables", "definition": "precround(tans1,3)", "description": "", "templateType": "anything"}, "ans2": {"name": "ans2", "group": "Ungrouped variables", "definition": "precround(tans2,3)", "description": "", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(6..20)", "description": "", "templateType": "anything"}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "random(0.1..0.9#0.1)", "description": "", "templateType": "anything"}, "v3": {"name": "v3", "group": "Ungrouped variables", "definition": "switch(x2>2,1,0)", "description": "", "templateType": "anything"}, "v4": {"name": "v4", "group": "Ungrouped variables", "definition": "switch(x2>3,1,0)", "description": "", "templateType": "anything"}, "tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.001", "description": "", "templateType": "anything"}, "x2": {"name": "x2", "group": "Ungrouped variables", "definition": "random(2,3,4)", "description": "", "templateType": "anything"}, "x1": {"name": "x1", "group": "Ungrouped variables", "definition": "round((w+(100-w)*(n-1))/100)", "description": "", "templateType": "anything"}, "tans1": {"name": "tans1", "group": "Ungrouped variables", "definition": "binomialPDF(x1,n,p)", "description": "", "templateType": "anything"}, "tans2": {"name": "tans2", "group": "Ungrouped variables", "definition": "binomialCDF(x2,n,p)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["w", "ans1", "ans2", "n", "p", "v3", "v4", "tol", "x2", "x1", "tans1", "tans2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Compute $P(r=\\var{x1})=\\;\\;$[[0]] (to 3 decimal places).

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{ans1-tol}", "maxValue": "{ans1+tol}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Compute $P(r\\le\\var{x2})=\\;\\;$[[0]] (to 3 decimal places).

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{ans2-tol}", "maxValue": "{ans2+tol}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "type": "question"}, {"name": "Probabilities from a normal distribution - Electrician", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "Patricia Cogan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3359/"}], "tags": ["checked2015", "MAS1403", "rebel", "REBEL", "Rebel", "rebelmaths"], "metadata": {"description": "

Given a random variable $X$  normally distributed as $\\operatorname{N}(m,\\sigma^2)$ find probabilities $P(X \\gt a),\\; a \\gt m;\\;\\;P(X \\lt b),\\;b \\lt m$.

\n

rebelmaths

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

The salary of an irish electrician is normally distributed with mean €{m} and standard deviation €{s}.

\n

 

", "advice": "

1. Converting to $\\operatorname{N}(0,1)$

\n

$\\simplify[all,!collectNumbers]{P(X > {upper}) = P(Z > ({upper} -{m}) / {s})} = P(Z>\\var{zupper}) = 1-P(Z<\\var{zupper})=1-\\var{p1} = \\var{prob2}$ to 2 decimal places.

\n

2.

\n

$\\simplify[all,!collectNumbers]{P({lower} < X < {upper}) = P(X < {upper})-P(X < {lower})}=P(Z<\\var{zupper})-P(Z<-\\var{zlower}) =\\var{p1}-\\var{p2} = \\var{prob3}$ to 2 decimal places.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"zupper": {"name": "zupper", "group": "Ungrouped variables", "definition": "precround((upper-m)/s,2)", "description": "", "templateType": "anything", "can_override": false}, "p2": {"name": "p2", "group": "Ungrouped variables", "definition": "1-p", "description": "", "templateType": "anything", "can_override": false}, "amount": {"name": "amount", "group": "Ungrouped variables", "definition": "\"electricity consumption\"", "description": "", "templateType": "anything", "can_override": false}, "units1": {"name": "units1", "group": "Ungrouped variables", "definition": "\"k Wh\"", "description": "", "templateType": "anything", "can_override": false}, "upper": {"name": "upper", "group": "Ungrouped variables", "definition": "random(m+0.5s..m+1.5*s#10000)", "description": "", "templateType": "anything", "can_override": false}, "prob3": {"name": "prob3", "group": "Ungrouped variables", "definition": "precround(p1-p2,2)", "description": "", "templateType": "anything", "can_override": false}, "s": {"name": "s", "group": "Ungrouped variables", "definition": "random(5000..15000#1000)", "description": "", "templateType": "anything", "can_override": false}, "prob1": {"name": "prob1", "group": "Ungrouped variables", "definition": "precround(1-p,2)", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(30000..50000#2000)", "description": "", "templateType": "anything", "can_override": false}, "prob2": {"name": "prob2", "group": "Ungrouped variables", "definition": "precround(1-p1,2)", "description": "", "templateType": "anything", "can_override": false}, "tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.01", "description": "", "templateType": "anything", "can_override": false}, "lower": {"name": "lower", "group": "Ungrouped variables", "definition": "random(m-1.5*s..m-0.5s#10000)", "description": "", "templateType": "anything", "can_override": false}, "stuff": {"name": "stuff", "group": "Ungrouped variables", "definition": "\"a frozen foods warehouse each week in the summer months \"", "description": "", "templateType": "anything", "can_override": false}, "zlower": {"name": "zlower", "group": "Ungrouped variables", "definition": "precround((m-lower)/s,2)", "description": "", "templateType": "anything", "can_override": false}, "p1": {"name": "p1", "group": "Ungrouped variables", "definition": "precround(normalcdf(zupper,0,1),4)", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "precround(normalcdf(zlower,0,1),4)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["units1", "upper", "lower", "p1", "m", "s", "zupper", "p", "amount", "p2", "tol", "zlower", "stuff", "prob2", "prob3", "prob1"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

If one electrician is chosen at random, what is probability that this electrician earns over €{upper}? 

\n

Probability = [[0]](to 2  decimal places)

\n

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "prob2-tol", "maxValue": "prob2+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

If one electrician is chosen at random, what is probability that this electrician earns less than €{lower} ?

\n

Probability = [[0]](to 2  decimal places)

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "prob1-tol", "maxValue": "prob1+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

If one electrician is chosen at random, what is probability that this electrician earns between €{lower} and €{upper}?

\n

Probability = [[0]](to 2  decimal places)

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "prob3-tol", "maxValue": "prob3+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Clodagh's copy of Julie's copy of Calculate probabilities from normal distribution, ", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}], "functions": {}, "ungrouped_variables": ["units1", "upper", "lower", "p1", "m", "amount", "zupper", "p", "s", "stuff", "tol", "zlower", "prob2", "prob1"], "tags": ["ACC1012", "checked2015", "MAS1403", "rebelmaths"], "advice": "

1. Converting to $\\operatorname{N}(0,1)$

\n

$\\simplify[all,!collectNumbers]{P(X < {lower}) = P(Z < ({lower} -{m}) / {s}) =1 -P(Z < {m-lower}/{s})} = 1-P(z<\\var{zlower})=1 -\\var{p} = \\var{prob1}$ to 2 decimal places.

\n

2. Converting to $\\operatorname{N}(0,1)$

\n

$\\simplify[all,!collectNumbers]{P(X > {upper}) = P(Z > ({upper} -{m}) / {s}) = 1 -P(Z < {upper-m}/{s})} = 1-P(z<\\var{zupper})=1-\\var{p1} = \\var{prob2}$ to 2 decimal places.

", "rulesets": {}, "parts": [{"prompt": "

Find the probability that in a particular week the {amount} is less than {lower} {units1}:

\n

Probability = ?[[0]](to 2  decimal places)

\n

Find the probability that in a particular week the {amount} is greater than {upper} {units1}:

\n

Probability = ?[[1]](to 2  decimal places)

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "prob1+tol", "minValue": "prob1-tol", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "prob2+tol", "minValue": "prob2-tol", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "

The {amount}, $X$, of {stuff}  is normally distributed with mean {m}k Wh and standard deviation {s}{units1}.

\n

\n

 

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"units1": {"definition": "\"k Wh\"", "templateType": "anything", "group": "Ungrouped variables", "name": "units1", "description": ""}, "upper": {"definition": "random(m+0.5s..m+1.5*s#5)", "templateType": "anything", "group": "Ungrouped variables", "name": "upper", "description": ""}, "lower": {"definition": "random(m-1.5*s..m-0.5s#5)", "templateType": "anything", "group": "Ungrouped variables", "name": "lower", "description": ""}, "p1": {"definition": "precround(normalcdf(zupper,0,1),4)", "templateType": "anything", "group": "Ungrouped variables", "name": "p1", "description": ""}, "m": {"definition": "random(750..1250#50)", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "amount": {"definition": "\"electricity consumption\"", "templateType": "anything", "group": "Ungrouped variables", "name": "amount", "description": ""}, "zupper": {"definition": "precround((upper-m)/s,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "zupper", "description": ""}, "p": {"definition": "precround(normalcdf(zlower,0,1),4)", "templateType": "anything", "group": "Ungrouped variables", "name": "p", "description": ""}, "s": {"definition": "random(60..100#10)", "templateType": "anything", "group": "Ungrouped variables", "name": "s", "description": ""}, "stuff": {"definition": "\"a frozen foods warehouse each week in the summer months \"", "templateType": "anything", "group": "Ungrouped variables", "name": "stuff", "description": ""}, "tol": {"definition": "0.01", "templateType": "anything", "group": "Ungrouped variables", "name": "tol", "description": ""}, "zlower": {"definition": "precround((m-lower)/s,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "zlower", "description": ""}, "prob2": {"definition": "precround(1-p1,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "prob2", "description": ""}, "prob1": {"definition": "precround(1-p,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "prob1", "description": ""}}, "metadata": {"description": "

rebelmaths

\n

Given a random variable $X$ normally distributed as $\\operatorname{N}(m,\\sigma^2)$ find probabilities $P(X \\gt a),\\; a \\gt m;\\;\\;P(X \\lt b),\\;b \\lt m$.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Clodagh's copy of Calculate probabilities from a normal distribution", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}], "functions": {}, "ungrouped_variables": ["units1", "upper", "lower", "p1", "m", "s", "zupper", "p", "amount", "p2", "tol", "zlower", "stuff", "prob2", "prob3", "prob1"], "tags": ["checked2015", "MAS1403", "rebelmaths"], "advice": "

1. Converting to $\\operatorname{N}(0,1)$

\n

$\\simplify[all,!collectNumbers]{P(X < {lower}) = P(Z < ({lower} -{m}) / {s})} = P(Z<-\\var{zlower})= \\var{prob1}$ to 2 decimal places.

\n

2. Converting to $\\operatorname{N}(0,1)$

\n

$\\simplify[all,!collectNumbers]{P(X > {upper}) = P(Z > ({upper} -{m}) / {s})} = P(Z>\\var{zupper}) = 1-P(Z<\\var{zupper})=1-\\var{p1} = \\var{prob2}$ to 2 decimal places.

\n

3.

\n

$\\simplify[all,!collectNumbers]{P({lower} < X < {upper}) = P(X < {upper})-P(X < {lower})}=P(Z<\\var{zupper})-P(Z<-\\var{zlower}) =\\var{p1}-\\var{p2} = \\var{prob3}$ to 2 decimal places.

", "rulesets": {}, "parts": [{"prompt": "

Find the probability that in a particular week the {amount} is less than {lower} {units1}:

\n

Probability = ?[[0]](to 2  decimal places)

\n

Find the probability that in a particular week the {amount} is greater than {upper} {units1}:

\n

Probability = ?[[1]](to 2  decimal places)

\n

Find the probability that in a particular week the {amount} is between {lower}{units1} and {upper} {units1}:

\n

Probability = ?[[2]](to 2  decimal places)

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "prob1+tol", "minValue": "prob1-tol", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "prob2+tol", "minValue": "prob2-tol", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "prob3+tol", "minValue": "prob3-tol", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": "2", "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "

The {amount}, $X$, of {stuff}  is normally distributed with mean {m}{units1} and standard deviation {s}{units1}.

\n

 

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"units1": {"definition": "\"k Wh\"", "templateType": "anything", "group": "Ungrouped variables", "name": "units1", "description": ""}, "upper": {"definition": "random(m+0.5s..m+1.5*s#5)", "templateType": "anything", "group": "Ungrouped variables", "name": "upper", "description": ""}, "lower": {"definition": "random(m-1.5*s..m-0.5s#5)", "templateType": "anything", "group": "Ungrouped variables", "name": "lower", "description": ""}, "p1": {"definition": "precround(normalcdf(zupper,0,1),4)", "templateType": "anything", "group": "Ungrouped variables", "name": "p1", "description": ""}, "m": {"definition": "random(750..1250#50)", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "amount": {"definition": "\"electricity consumption\"", "templateType": "anything", "group": "Ungrouped variables", "name": "amount", "description": ""}, "zupper": {"definition": "precround((upper-m)/s,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "zupper", "description": ""}, "p": {"definition": "precround(normalcdf(zlower,0,1),4)", "templateType": "anything", "group": "Ungrouped variables", "name": "p", "description": ""}, "s": {"definition": "random(60..100#10)", "templateType": "anything", "group": "Ungrouped variables", "name": "s", "description": ""}, "p2": {"definition": "1-p", "templateType": "anything", "group": "Ungrouped variables", "name": "p2", "description": ""}, "tol": {"definition": "0.01", "templateType": "anything", "group": "Ungrouped variables", "name": "tol", "description": ""}, "zlower": {"definition": "precround((m-lower)/s,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "zlower", "description": ""}, "stuff": {"definition": "\"a frozen foods warehouse each week in the summer months \"", "templateType": "anything", "group": "Ungrouped variables", "name": "stuff", "description": ""}, "prob2": {"definition": "precround(1-p1,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "prob2", "description": ""}, "prob3": {"definition": "precround(p1-p2,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "prob3", "description": ""}, "prob1": {"definition": "precround(1-p,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "prob1", "description": ""}}, "metadata": {"description": "

rebelmaths

\n

Given a random variable $X$  normally distributed as $\\operatorname{N}(m,\\sigma^2)$ find probabilities $P(X \\gt a),\\; a \\gt m;\\;\\;P(X \\lt b),\\;b \\lt m$.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}]}], "contributors": [{"name": "Deirdre Casey", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/681/"}], "extensions": ["stats"], "custom_part_types": [], "resources": []}