// Numbas version: exam_results_page_options {"timing": {"allowPause": true, "timedwarning": {"message": "", "action": "none"}, "timeout": {"message": "", "action": "none"}}, "navigation": {"preventleave": true, "showfrontpage": true, "startpassword": "", "showresultspage": "oncompletion", "browse": true, "reverse": true, "onleave": {"message": "

Just checking. You haven't completed the last question.

", "action": "warnifunattempted"}, "allowregen": true}, "feedback": {"advicethreshold": 0, "feedbackmessages": [], "allowrevealanswer": true, "showanswerstate": true, "showtotalmark": true, "intro": "", "showactualmark": true}, "showstudentname": true, "metadata": {"licence": "All rights reserved", "description": "Here are some practice questions on Probability. Remember that you should also use the practice questions on Blackboard and in your workbooks."}, "question_groups": [{"pickQuestions": 1, "pickingStrategy": "all-shuffled", "name": "Group", "questions": [{"name": "Probability of picking a particular colour ball from a bag", "extensions": [], "custom_part_types": [], "resources": [["question-resources/dice.svg", "/srv/numbas/media/question-resources/dice.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "variable_groups": [], "preamble": {"css": "", "js": ""}, "type": "question", "parts": [{"variableReplacementStrategy": "originalfirst", "type": "gapfill", "showCorrectAnswer": true, "variableReplacements": [], "scripts": {}, "gaps": [{"maxMarks": 0, "type": "1_n_2", "showCorrectAnswer": true, "minMarks": 0, "distractors": ["This is the probability of not picking a blue ball.", "Divide by the total number of outcomes, not the number of unfavourable outcomes.", "", "Divide the number of favourable outcomes by the total number of outcomes.", "There's more than one blue ball."], "displayColumns": 0, "displayType": "radiogroup", "scripts": {}, "showFeedbackIcon": true, "marks": 0, "matrix": [0, 0, "1", 0, 0], "choices": ["

$\\displaystyle\\frac{\\var{red+green}}{\\var{total}}$

", "

$\\displaystyle\\frac{\\var{blue}}{\\var{green+red}}$

", "

$\\displaystyle\\frac{\\var{blue}}{\\var{total}}$

", "

$\\displaystyle\\frac{1}{\\var{blue}}$

", "

$\\displaystyle\\frac{1}{\\var{total}}$

"], "shuffleChoices": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst"}], "marks": 0, "showFeedbackIcon": true, "prompt": "

A bag contains $\\var{red}$ red balls, $\\var{blue}$ blue balls and $\\var{green}$ green balls. One ball is removed from the bag at random. What is the probability that the chosen ball will be blue? Remember to reduce any fractions into their simplest form.

\n

[[0]]

"}], "advice": "

For equally likely outcomes, you can calculate the probability of a particular event occurring by using the formula

\n

$\\text{Probability of an event} = \\displaystyle\\frac{\\text{number of favourable outcomes}}{\\text{total number of outcomes}}$.

\n

\n

We are told that the bag contains $\\var{red}$ red balls, $\\var{blue}$ blue balls and $\\var{green}$ green balls and that one ball is removed from the bag at random.

\n

The total number of balls in the bag before the chosen ball is removed is 

\n

\\[\\var{red}+\\var{blue}+\\var{green} = \\var{total}.\\]

\n

As the ball is being removed randomly from the bag, there is an equal probability of selecting any one of the $\\var{total}$ balls.

\n

Therefore, the probability of the chosen ball being blue is

\n

\\[
P(\\text{blue}) = \\displaystyle\\frac{\\text{number of favourable outcomes}}{\\text{total number of outcomes}} = \\displaystyle\\frac{\\var{blue}}{\\var{total}}
\\]

", "tags": ["taxonomy"], "variables": {"red": {"templateType": "anything", "description": "

number of red balls in part c

", "definition": "random(15,19)", "name": "red", "group": "Ungrouped variables"}, "green": {"templateType": "anything", "description": "

number of green balls in part c.

", "definition": "random(4,8,10)", "name": "green", "group": "Ungrouped variables"}, "total": {"templateType": "anything", "description": "

total number of balls in part c

", "definition": "red+blue+green", "name": "total", "group": "Ungrouped variables"}, "blue": {"templateType": "anything", "description": "

number of blue balls in part c

", "definition": "random(6,7,11)", "name": "blue", "group": "Ungrouped variables"}}, "rulesets": {}, "functions": {}, "ungrouped_variables": ["red", "blue", "green", "total"], "statement": "", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

A bag contains balls of three different colours. You're told how many there are of each, and asked the probability of picking a ball of a particular colour.

"}, "variablesTest": {"condition": "", "maxRuns": "100"}}, {"name": "Calculate probability of either of two events occurring", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"dothisandthat": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"work on both domestic and European routes\"", "description": "", "name": "dothisandthat"}, "ans2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(1-prob1,2)", "description": "", "name": "ans2"}, "desc2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"are in training\"", "description": "", "name": "desc2"}, "things": {"templateType": "anything", "group": "Ungrouped variables", "definition": "'stewardesses'", "description": "", "name": "things"}, "dothat1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"works on European routes\"", "description": "", "name": "dothat1"}, "p3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "p-random(85..95)", "description": "", "name": "p3"}, "prob1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround((p-p3)/100,2)", "description": "", "name": "prob1"}, "therest": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"The remainder\"", "description": "", "name": "therest"}, "desc1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"with a small UK-based airline\"", "description": "", "name": "desc1"}, "p2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "p-p1", "description": "", "name": "p2"}, "thing": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"stewardess\"", "description": "", "name": "thing"}, "dothis1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"works on domestic routes\"", "description": "", "name": "dothis1"}, "desc4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"is in training\"", "description": "", "name": "desc4"}, "dothat": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"work on European routes\"", "description": "", "name": "dothat"}, "dothis": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"work on domestic routes\"", "description": "", "name": "dothis"}, "p1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(40..70)", "description": "", "name": "p1"}, "p": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(105..125)", "description": "", "name": "p"}, "desc3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "\"working with this airline\"", "description": "", "name": "desc3"}}, "ungrouped_variables": ["dothisandthat", "desc4", "p1", "desc1", "dothat", "desc3", "things", "ans2", "p3", "p", "p2", "dothat1", "dothis", "therest", "desc2", "thing", "dothis1", "prob1"], "functions": {}, "variable_groups": [], "preamble": {"css": "", "js": ""}, "parts": [{"customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "prompt": "\n

Find the probabilities that a randomly chosen {thing} {desc3}: 

\n

a) {dothis1} or {dothat1}.

\n

Probability = [[0]]

\n

b) {desc4}.

\n

Probability = [[1]]

\n

Enter both probabilities to 2 decimal places.

\n ", "unitTests": [], "showFeedbackIcon": true, "scripts": {}, "gaps": [{"correctAnswerFraction": false, "allowFractions": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "minValue": "prob1", "maxValue": "prob1", "unitTests": [], "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "mustBeReducedPC": 0}, {"correctAnswerFraction": false, "allowFractions": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "minValue": "ans2", "maxValue": "ans2", "unitTests": [], "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "mustBeReducedPC": 0}], "type": "gapfill", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacements": [], "marks": 0, "sortAnswers": false}], "statement": "\n

$\\var{p1}$% of {things} {desc1} {dothis}, $\\var{p2}$% {dothat} and $\\var{p3}$% {dothisandthat}. 

\n

{therest} {desc2}

\n ", "tags": ["checked2015"], "rulesets": {}, "type": "question", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Example showing how to calculate the probability of A or B using the law $p(A \\;\\textrm{or}\\; B)=p(A)+p(B)-p(A\\;\\textrm{and}\\;B)$. 

\n

Also converting percentages to probabilities.

\n

Easily adapted to other applications.

"}, "advice": "

a) There are $\\var{p1}+\\var{p2}-\\var{p3}=\\var{p-p3}$ % of stewardesses working on one of the routes. The probability that a random stewardess is working on one of these routes is therefore $\\displaystyle \\frac{\\var{p-p3}}{100}=\\var{prob1}$.

\n

b) The rest are in training and the probability that a randomly selected stewardess is in training is $1-\\var{prob1}=\\var{1-prob1}$.

"}, {"name": "Poisson Distribution", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Brad Allison", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3394/"}], "tags": [], "metadata": {"description": "", "licence": "All rights reserved"}, "statement": "\n

\n\n

\n

\n\n

\n

\n\n

\n

\n\n

\n

\n\n

\n

\n\n

\n

\n\n

\n

\n\n

\n

\n

\n\n

\n

\n\n

\n

\n\n

\n

\n\n

\n

\n\n

\n

\n\n

\n

\n\n

\n

\n\n

\n

", "advice": "\n

Here are some tips on how to set out your work, as well as how to complete the questions. None of the answers given below have been rounded to what the question states. 

\n

Question 1

\n

1a: $X\\sim Po(\\var{Lambda3})$

\n

(i) $P(X=x)=P(X=\\var{x5})=\\frac{e^{-\\var{Lambda3}}\\times\\var{Lambda3}^{\\var{x5}}}{\\var{x5}!}=\\var{Ans5}$

\n

(ii) $P(X=x)=P(X=\\var{x6})=\\frac{e^{-\\var{Lambda3}}\\times\\var{Lambda3}^{\\var{x6}}}{\\var{x6}!}=\\var{Ans6}$

\n

(iii) $P(X=x)=P(X=\\var{x7})=\\frac{e^{-\\var{Lambda3}}\\times\\var{Lambda3}^{\\var{x7}}}{\\var{x7}!}=\\var{Ans7}$

\n

\n

1b: $X\\sim Po(\\var{Lambda4})$

\n

(i) $P(X=x)=P(X<\\var{x8})=P(X=0)+P(X=1)+P(X=2)=\\frac{e^{-\\var{Lambda4}}\\times\\var{Lambda4}^0} {0!}+\\frac{e^{-\\var{Lambda4}}\\times\\var{Lambda4}^1} {1!}+\\frac{e^{-\\var{Lambda4}}\\times\\var{Lambda4}^2} {2!}=\\var{Ans8}$

\n

(ii) $P(X=x)=P(X\\leq\\var{x9})=P(X=0)+P(X=1)+...+P(X={\\var{x9}})=\\frac{e^{-\\var{Lambda4}}\\times\\var{Lambda4}^0} {0!}+\\frac{e^{-\\var{Lambda4}}\\times\\var{Lambda4}^1} {1!}+...+\\frac{e^{-\\var{Lambda4}}\\times\\var{Lambda4}^{\\var{x9}}} {\\var{x9}!}=\\var{Ans9}$

\n

(iii) $P(X=x)=P(X>\\var{x10})=1-P(X\\leq\\var{x10})=1-(P(X=0)+P(X=1)+...+P(X={\\var{x10}}))=1-(\\frac{e^{-\\var{Lambda4}}\\times\\var{Lambda4}^0} {0!}+\\frac{e^{-\\var{Lambda4}}\\times\\var{Lambda4}^1} {1!}+...+\\frac{e^{-\\var{Lambda4}}\\times\\var{Lambda4}^{\\var{x10}}} {\\var{x10}!})=\\var{Ans10}$

\n

(iv)$P(X=x)=P(X\\geq\\var{x11})=1-P(X<\\var{x11})=1-(P(X=0)+P(X=1)+...+P(X={5}))=1-(\\frac{e^{-\\var{Lambda4}}\\times\\var{Lambda4}^0} {0!}+\\frac{e^{-\\var{Lambda4}}\\times\\var{Lambda4}^1} {1!}+...+\\frac{e^{-\\var{Lambda4}}\\times\\var{Lambda4}^{5}} {5!})=\\var{Ans11}$

\n

Question 2

\n

2a: $\\lambda=rate  \\times hours = \\var{rate2} \\times 1 = \\var{rate2} \\therefore X\\sim Po(\\var{rate2})$

\n

(i) $P(X=x) = P(X=\\var{xx1})=\\frac{e^{-\\var{rate2}}\\times\\var{rate2}^\\var{xx1}}{\\var{xx1}!}=\\var{Ansxx}$

\n

\n

2b: $\\lambda=rate  \\times hours =rate  \\times \\frac{mins}{60} = \\var{rate}\\times\\frac{\\var{mins}}{60}=\\var{Lambda1}  \\therefore X\\sim Po(\\var{Lambda1})$

\n

(i) $P(X=x) = P(X=\\var{x1})=\\frac{e^{-\\var{Lambda1}}\\times\\var{Lambda1}^\\var{x1}}{\\var{x1}!}=\\var{Ans1}$

\n

(ii) $P(X=x) = P(X\\geq\\var{x2})=1-P(X<\\var{x2})=1-(P(X=0)+P(X=1)+...+P(X={3}))=1-(\\frac{e^{-\\var{Lambda1}}\\times\\var{Lambda1}^0} {0!}+\\frac{e^{-\\var{Lambda1}}\\times\\var{Lambda1}^1} {1!}+...+\\frac{e^{-\\var{Lambda1}}\\times\\var{Lambda1}^{3}} {3!})=\\var{Ans2}$

\n

\n

2c: $\\lambda=rate  \\times hours=rate  \\times \\frac{mins}{60} = \\var{rate}\\times\\frac{\\var{Totalmins}}{60}=\\var{Lambda1}  \\therefore X\\sim Po(\\var{Lambda1})$

\n

(i) This is the time difference in minutes, that the rate of patients arrives within. 

\n

(ii) $P(X=x) = P(X\\geq1)=1-P(X<1)=1-P(X=0)=1-\\frac{e^{-\\var{Lambda1}}\\times\\var{Lambda1}^0} {0!}=\\var{Ans4}$

", "rulesets": {}, "variables": {"rate": {"name": "rate", "group": "Question 2a(i)", "definition": "random(2 .. 5#1)", "description": "", "templateType": "randrange"}, "Timehrs": {"name": "Timehrs", "group": "Question 2b", "definition": "random(11 .. 13#1)", "description": "", "templateType": "randrange"}, "Daypart": {"name": "Daypart", "group": "Question 2b", "definition": "if(Timehrs>11,\"pm\",\"am\")", "description": "", "templateType": "anything"}, "Ans10": {"name": "Ans10", "group": "Question 1b", "definition": "1-(if(x10=2,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!), if(x10=3,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!)+((e^(-Lambda4) * Lambda4^3)/3!),if(x10=4,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!)+((e^(-Lambda4) * Lambda4^3)/3!)++((e^(-Lambda4) * Lambda4^4)/4!),if(x10=5,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!)+((e^(-Lambda4) * Lambda4^3)/3!)+((e^(-Lambda4) * Lambda4^4)/4!)+((e^(-Lambda4) * Lambda4^5)/5!),0)))))", "description": "", "templateType": "anything"}, "Ans5": {"name": "Ans5", "group": "Question 1a", "definition": "(e^(-Lambda3) *Lambda3^x5)/x5!", "description": "", "templateType": "anything"}, "Totalmins": {"name": "Totalmins", "group": "Question 2b", "definition": "Hours*60", "description": "", "templateType": "anything"}, "x11": {"name": "x11", "group": "Question 1b", "definition": "6", "description": "", "templateType": "number"}, "Lambda3": {"name": "Lambda3", "group": "Question 1a", "definition": "random(1 .. 5#0.1)", "description": "", "templateType": "randrange"}, "xx1": {"name": "xx1", "group": "Question 2a(i)", "definition": "random(1 .. 5#1)", "description": "", "templateType": "randrange"}, "rate2": {"name": "rate2", "group": "Question 2a(i)", "definition": "random(2 .. 7#1)", "description": "", "templateType": "randrange"}, "Ans8": {"name": "Ans8", "group": "Question 1b", "definition": "if(x8=2,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!), if(x8=3,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!),if(x8=4,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!)+((e^(-Lambda4) * Lambda4^3)/3!),if(x8=5,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!)+((e^(-Lambda4) * Lambda4^3)/3!)+((e^(-Lambda4) * Lambda4^4)/4!),0))))", "description": "", "templateType": "anything"}, "Ansxx": {"name": "Ansxx", "group": "Question 2a(i)", "definition": "(e^(-rate2) * rate2^ xx1)/xx1!", "description": "", "templateType": "anything"}, "Totaltime": {"name": "Totaltime", "group": "Question 2b", "definition": "Timehrs+(Timeminsno/100)", "description": "", "templateType": "anything"}, "Timemins": {"name": "Timemins", "group": "Question 2b", "definition": "random(15 .. 45#15)", "description": "", "templateType": "randrange"}, "Ans9": {"name": "Ans9", "group": "Question 1b", "definition": "if(x9=2,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!), if(x9=3,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!)+((e^(-Lambda4) * Lambda4^3)/3!),if(x9=4,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!)+((e^(-Lambda4) * Lambda4^3)/3!)+((e^(-Lambda4) * Lambda4^4)/4!),if(x9=5,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!)+((e^(-Lambda4) * Lambda4^3)/3!)+((e^(-Lambda4) * Lambda4^4)/4!)+((e^(-Lambda4) * Lambda4^5)/5!),0))))", "description": "", "templateType": "anything"}, "mins": {"name": "mins", "group": "Question 2a(i)", "definition": "random(30 .. 120#30)", "description": "", "templateType": "randrange"}, "Hours": {"name": "Hours", "group": "Question 2b", "definition": "Totaltime-11", "description": "", "templateType": "anything"}, "x7": {"name": "x7", "group": "Question 1a", "definition": "random(5 .. 5#1)", "description": "", "templateType": "randrange"}, "Lambda1": {"name": "Lambda1", "group": "Question 2a(i)", "definition": "hrs*rate", "description": "", "templateType": "anything"}, "x3": {"name": "x3", "group": "Question 2b", "definition": "0", "description": "", "templateType": "anything"}, "x8": {"name": "x8", "group": "Question 1b", "definition": "3", "description": "", "templateType": "number"}, "Ans2": {"name": "Ans2", "group": "Question 2a(ii)", "definition": "1-(if(x2=2,((e^(-Lambda1) * Lambda1^0)/0!)+((e^(-Lambda1) * Lambda1^1)/1!), if(x2=3,((e^(-Lambda1) * Lambda1^0)/0!)+((e^(-Lambda1) * Lambda1^1)/1!)+((e^(-Lambda1) * Lambda1^2)/2!),if(x2=4,((e^(-Lambda1) * Lambda1^0)/0!)+((e^(-Lambda1) * Lambda1^1)/1!)+((e^(-Lambda1) * Lambda1^2)/2!)+((e^(-Lambda1) * Lambda1^3)/3!),if(x2=5,((e^(-Lambda1) * Lambda1^0)/0!)+((e^(-Lambda1) * Lambda1^1)/1!)+((e^(-Lambda1) * Lambda1^2)/2!)+((e^(-Lambda1) * Lambda1^3)/3!)+((e^(-Lambda1) * Lambda1^4)/4!), if(x2=6,(e^(-Lambda1) * Lambda1^0)/0!)+((e^(-Lambda1) * Lambda1^1)/1!)+((e^(-Lambda1) * Lambda1^2)/2!)+((e^(-Lambda1) * Lambda1^3)/3!)+((e^(-Lambda1) * Lambda1^4)/4!)+((e^(-Lambda1) * Lambda1^5)/5!),0)))))", "description": "", "templateType": "anything"}, "x5": {"name": "x5", "group": "Question 1a", "definition": "random(1 .. 2#1)", "description": "", "templateType": "randrange"}, "Lambda2": {"name": "Lambda2", "group": "Question 2b", "definition": "Hours*rate", "description": "", "templateType": "anything"}, "x10": {"name": "x10", "group": "Question 1b", "definition": "5", "description": "", "templateType": "number"}, "x4": {"name": "x4", "group": "Question 1a", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange"}, "Ans11": {"name": "Ans11", "group": "Question 1b", "definition": "1-(if(x11=2,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!), if(x11=3,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!), if(x11=4,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!)+((e^(-Lambda4) * Lambda4^3)/3!), if(x11=5,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!)+((e^(-Lambda4) * Lambda4^3)/3!)+((e^(-Lambda4) * Lambda4^4)/4!),if(x11=6,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!)+((e^(-Lambda4) * Lambda4^3)/3!)+((e^(-Lambda4) * Lambda4^4)/4!)+((e^(-Lambda4) *Lambda4^5)/5!),0))))))", "description": "

(if(x11=2,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!), if(x11=3,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!), if(x11=4,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!)+((e^(-Lambda4) * Lambda4^3)/3!), if(x11=5,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!)+((e^(-Lambda4) * Lambda4^3)/3!)+((e^(-Lambda4) * Lambda4^4)/4!),if(x11=6,((e^(-Lambda4) * Lambda4^0)/0!)+((e^(-Lambda4) * Lambda4^1)/1!)+((e^(-Lambda4) * Lambda4^2)/2!)+((e^(-Lambda4) * Lambda4^3)/3!)+((e^(-Lambda4) * Lambda4^4)/4!)+((e^(-Lambda4) *Lambda4^5)/5!),0))))))

", "templateType": "anything"}, "x2": {"name": "x2", "group": "Question 2a(ii)", "definition": "random(3 .. 6#1)", "description": "", "templateType": "randrange"}, "Ans3": {"name": "Ans3", "group": "Question 2b", "definition": "Totalmins", "description": "", "templateType": "anything"}, "Ans1": {"name": "Ans1", "group": "Question 2a(i)", "definition": "(e^(-Lambda1) * Lambda1^ x1)/x1!", "description": "", "templateType": "anything"}, "Lambda4": {"name": "Lambda4", "group": "Question 1b", "definition": "random(1 .. 5#0.1)", "description": "", "templateType": "randrange"}, "Ans4": {"name": "Ans4", "group": "Question 2b", "definition": "1-((e^(-Lambda2) * Lambda2^x3)/x3!)", "description": "", "templateType": "anything"}, "x1": {"name": "x1", "group": "Question 2a(i)", "definition": "random(2 .. 3#1)", "description": "", "templateType": "randrange"}, "Timeminsno": {"name": "Timeminsno", "group": "Question 2b", "definition": "(Timemins * 100)/60", "description": "", "templateType": "anything"}, "Ans7": {"name": "Ans7", "group": "Question 1a", "definition": "(e^(-Lambda3) *Lambda3^x7)/x7!", "description": "", "templateType": "anything"}, "Ans6": {"name": "Ans6", "group": "Question 1a", "definition": "(e^(-Lambda3) *Lambda3^x6)/x6!", "description": "

And

", "templateType": "anything"}, "x6": {"name": "x6", "group": "Question 1a", "definition": "random(3 .. 4#1)", "description": "", "templateType": "randrange"}, "hrs": {"name": "hrs", "group": "Question 2a(i)", "definition": "mins/60", "description": "", "templateType": "anything"}, "x9": {"name": "x9", "group": "Question 1b", "definition": "4", "description": "", "templateType": "number"}}, "variablesTest": {"condition": "", "maxRuns": "1000"}, "ungrouped_variables": [], "variable_groups": [{"name": "Question 2a(i)", "variables": ["x1", "hrs", "mins", "Ans1", "rate", "Lambda1", "xx1", "Ansxx", "rate2"]}, {"name": "Question 2a(ii)", "variables": ["Ans2", "x2"]}, {"name": "Question 2b", "variables": ["Timemins", "Timeminsno", "Timehrs", "Daypart", "Totaltime", "Lambda2", "Ans3", "Hours", "x3", "Totalmins", "Ans4"]}, {"name": "Question 1a", "variables": ["Ans5", "Ans6", "Ans7", "Lambda3", "x4", "x5", "x6", "x7"]}, {"name": "Question 1b", "variables": ["Lambda4", "x8", "x9", "x10", "x11", "Ans8", "Ans9", "Ans10", "Ans11"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Question 1", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

(a) Given that  $X\\sim Po\\left({\\var{Lambda3}}\\right)$. Find,

\n

(i) $P\\left(X=\\var{x5}\\right)$

\n

Answer:[[0]]

\n

\n

(ii) $P\\left(X=\\var{x6}\\right)$

\n

Answer:[[1]]

\n

\n

(iii) $P\\left(X=\\var{x7}\\right)$

\n

Answer:[[2]]

\n

\n

(b) Given that  $X\\sim Po\\left({\\var{Lambda4}}\\right)$. Find,

\n

(i) $P(X<\\var{x8})$ 

\n

Answer:[[3]]

\n

\n

(ii) $P(X\\le\\var{x9})$

\n

Answer:[[4]]

\n

\n

(iii) $P(X>\\var{x10})$

\n

Answer:[[5]]

\n

\n

(iv) $P(X\\ge\\var{x11})$

\n

Answer:[[6]]

\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": "{Ans5}", "maxValue": "{Ans5}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": 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": "{Ans6}", "maxValue": "{Ans6}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": 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": "{Ans7}", "maxValue": "{Ans7}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "{Ans8}", "maxValue": "{Ans8}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "{Ans9}", "maxValue": "{Ans9}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "{Ans10}", "maxValue": "{Ans10}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "{Ans11}", "maxValue": "{Ans11}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Question 2", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

(a) Patients arrive at a hospital A & E department at random at a rate of {rate2} per hour.  

\n

Let x be the r.v of the number of patients arriving per hour. 

\n

Find the probability that, during any hour period, the number of patients arriving at the hospital accident and emergency department is

\n

(i) exactly {xx1}

\n

Answer: [[4]]

\n

\n

(b) Patients arrive at a hospital A & E department at random at a rate of {rate} per hour.  

\n

Let x be the r.v of the number of patients arriving per {mins} mins. 

\n

Find the probability that, during any {mins} minute period, the number of patients arriving at the hospital accident and emergency department is

\n

(i) exactly {x1} 

\n

Answer: [[0]]

\n

(ii) at least {x2}

\n

Answer: [[1]]

\n

\n

(c) A patient arrives at 11.00am. To find the probability that the next patient arrives before {Timehrs}.{Timemins}{Daypart}, x needs to be redefined.

\n

(i) Redefine the random variable x for part b by completing the below statement. 

\n

Let x be the r.v of the number of patients arriving per [[2]] mins. 

\n

(ii) Now find the probability that the next patient arrives before {Timehrs}.{Timemins}{Daypart}.

\n

Answer: [[3]]

\n

\n

", "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": "{Ans1}", "maxValue": "{Ans1}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "{Ans2}", "maxValue": "{Ans2}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": 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": "{Ans3}", "maxValue": "{Ans3}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "{Ans4}", "maxValue": "{Ans4}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "{Ansxx}", "maxValue": "{Ansxx}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Probability of the union of two non-mutually exclusive events", "extensions": [], "custom_part_types": [], "resources": [["question-resources/breakfastven2.svg", "/srv/numbas/media/question-resources/breakfastven2.svg"], ["question-resources/breakfastvenplus2.svg", "/srv/numbas/media/question-resources/breakfastvenplus2.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "variable_groups": [], "preamble": {"css": "", "js": ""}, "type": "question", "parts": [{"maxMarks": 0, "type": "1_n_2", "showCorrectAnswer": true, "minMarks": 0, "distractors": ["", ""], "displayColumns": 0, "displayType": "radiogroup", "scripts": {}, "showFeedbackIcon": true, "marks": 0, "matrix": [0, "1"], "choices": ["

Yes

", "

No

"], "shuffleChoices": false, "variableReplacements": [], "prompt": "

Consider the event that someone has cereal for breakfast and the event that the same person has toast for breakfast. Are these events mutually exclusive?

", "variableReplacementStrategy": "originalfirst"}, {"maxMarks": 0, "type": "1_n_2", "showCorrectAnswer": true, "minMarks": 0, "distractors": ["", "You have double-counted the people who eat both.", "Subtract the people who take both, rather than adding them on again.", "Some people eat neither cereal nor toast, so the probability is less than $1$."], "displayColumns": 0, "displayType": "radiogroup", "scripts": {}, "showFeedbackIcon": true, "marks": 0, "matrix": ["1", 0, 0, "0"], "choices": ["

$\\var{({c}+{t}-{b})/100}$

", "

$\\var{({c}+{t})/100}$

", "

$\\var{({c}+{t}+{b})/100}$

", "

$1$

"], "shuffleChoices": false, "variableReplacements": [], "prompt": "

What is the probability that a participant selected at random typically eats cereal or toast for breakfast?

", "variableReplacementStrategy": "originalfirst"}], "advice": "

a)

\n

Mutually exclusive events are events that cannot happen at the same time. 

\n

We know from the results of the survey that $\\var{b}\\%$ of participants stated that they have cereal as well as toast for breakfast. 

\n

Therefore it is possible to have both cereal and toast for breakfast, which means that the events \"cereal\" and \"toast\" are not mutually exclusive.

\n

b)

\n

We know from the results of the survey that some people have both cereal and toast for breakfast, so we can present the information given to us in the question in the form of a Venn diagram.

\n

\n

\n

The number of people who have cereal or toast for breakfast is:

\n\n

However, this counts the people who have cereal as well as toast twice! 

\n

To correct our answer, we subtract the extra \"and\" part:

\n

\n

As a general formula this is:

\n

\\[\\mathrm{P}(\\mathrm{A} \\cup \\mathrm{B}) = \\mathrm{P}(\\mathrm{A}) + \\mathrm{P}(\\mathrm{B}) - \\mathrm{P}(\\mathrm{A} \\cap \\mathrm{B}).\\] 

\n

Note that here we have made use of some notation that is frequently used in probability calculations:

\n\n

Using this equation, the probability that a participant selected at random will either have cereal or toast for breakfast is

\n

\\[
\\begin{align}
\\mathrm{P}(\\text{cereal} \\cup \\text{toast}) &= \\mathrm{P}(\\text{cereal})+\\mathrm{P}(\\text{toast}) - \\mathrm{P}(\\text{cereal} \\cap \\text{toast})\\\\
&= \\var{{c}/100}+\\var{{t}/100}-\\var{{b}/100}\\\\
&= \\var{({c}+{t}-{b})/100}.
\\end{align}
\\]

", "tags": ["Multiple Choice", "multiple choice", "Multiple choice", "Mutually exclusive events", "Not mutually exclusive events", "Probability", "probability", "taxonomy"], "variables": {"proportions": {"templateType": "anything", "description": "

The percentage of people who ticked each option.

", "definition": "map(floor(total*x/sum(raw_proportions)),x,raw_proportions)", "name": "proportions", "group": "Ungrouped variables"}, "c": {"templateType": "anything", "description": "

Percentage of people who have cereal for breakfast.

", "definition": "proportions[0]//random(20..40)", "name": "c", "group": "Ungrouped variables"}, "raw_proportions": {"templateType": "anything", "description": "", "definition": "[random(4..6#0),random(2..3#0)]+repeat(random(1..4#0),3)", "name": "raw_proportions", "group": "Ungrouped variables"}, "t": {"templateType": "anything", "description": "

Percentage of people who have toast for breakfast.

", "definition": "proportions[1]//random(6..15)", "name": "t", "group": "Ungrouped variables"}, "total": {"templateType": "anything", "description": "

The total of the percentages for each option.

\n

This is greater than 100 because some people tick more than one option.

", "definition": "random(120..160)", "name": "total", "group": "Ungrouped variables"}, "b": {"templateType": "anything", "description": "

Percentage of people who have both toast and cereal for breakfast. Between an eighth and a third of the lowest of the two options.

", "definition": "let(s,min(c,t), random(round(s/8)..round(s/3)))", "name": "b", "group": "Ungrouped variables"}}, "rulesets": {}, "functions": {}, "ungrouped_variables": ["c", "t", "b", "raw_proportions", "proportions", "total"], "statement": "

A survey asked people what they eat for breakfast. Participants had to select foods that they typically eat for breakfast from a list.

\n

A story in the newspaper displayed the results of the survey in this table:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
FoodCerealToastFruitFry-upOther
% of participants{proportions[0]}{proportions[1]}{proportions[2]}{proportions[3]}{proportions[4]}
\n

The most popular combination was cereal and toast, with $\\var{b}\\%$ of the participants selecting both.

", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Given results from a survey about what people eat for breakfast, where some people eat one or both of cereal and toast. Student is asked to pick the probability of eating either one or the other from a list. Distractors pick out common errors.

"}, "variablesTest": {"condition": "", "maxRuns": 100}}, {"name": "The probability of an event not happening - five friends play mini golf", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "tags": ["complement", "Complement", "complementary", "Probabilities sum to 1", "probability", "Probability"], "metadata": {"description": "

Given the probabilities that each of four out of five friends will win a round of mini-golf, work out the probability that the fifth friend won't win, then use that to find the probability that they will win.

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

Five friends are playing a game of mini-golf.

\n

The probability that each person wins the game, $\\mathrm{P}(\\text{Person})$, is given in the table.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Person{people[0]['name']}{people[1]['name']}{people[2]['name']}{people[3]['name']}{people[4]['name']}
$\\mathrm{P}(\\text{Person})$$\\var{probs[0]}$$\\var{probs[1]}$$\\var{probs[2]}$$\\var{probs[3]}$
", "advice": "

All probability situations can be reduced to two possible outcomes: success or failure.

\n

When we express the outcomes in this way we say that they are complementary.

\n

The sum of the probability of an event and its complement is always $1$.

\n

If $\\mathrm{P}(\\mathrm{E})$ is the probability of an event $\\mathrm{E}$ happening and $\\mathrm{P}(\\bar{\\mathrm{E}})$ is the probability of that event not happening then

\n

\\[\\mathrm{P}(\\mathrm{E}) +\\mathrm{P}(\\bar{\\mathrm{E}}) = 1.\\]

\n

Rearranging this equation gives:

\n

\\[\\mathrm{P}(\\bar{\\mathrm{E}}) = 1 - \\mathrm{P}(\\mathrm{E})\\]

\n

We can think of this game as having two possible outcomes: either {pname} wins or {pname} doesn't win.

\n

This means that

\n

\\[\\mathrm{P}(\\var{pname}) + \\mathrm{P}(\\text{not } \\var{pname}) = 1 \\text{.}\\]

\n

\n

a)

\n

If {pname} doesn't win the game then that means that one of the other four players must win the game.

\n

So the probability of {pname} not winning the game is the same as the probability of any of the other four players winning the game.

\n

Therefore

\n

\\begin{align}
\\mathrm{P}(\\text{not }\\var{pname}) &= \\mathrm{P}(\\var{people[0]['name']})+\\mathrm{P}(\\var{people[1]['name']})+\\mathrm{P}(\\var{people[3]['name']})+\\mathrm{P}(\\var{people[4]['name']}) \\\\
&= \\var{latex(join(probs,' + '))}\\\\
&= \\var{sum(probs)}.
\\end{align}

\n

b)

\n

Rearranging the equation above gives

\n

\\[\\mathrm{P}(\\var{pname}) = 1 - \\mathrm{P}(\\text{not } \\var{pname}).\\]

\n

We know from a) that $\\mathrm{P}(\\text{not } \\var{pname}) = \\var{sum(probs)}$.

\n

Therefore

\n

\\begin{align}
\\mathrm{P}(\\var{pname}) &= 1 - \\mathrm{P}(\\text{not } \\var{pname})\\\\
&= 1 - \\var{sum(probs)}\\\\
&= \\var{1-sum(probs)}.
\\end{align}

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"probs": {"name": "probs", "group": "Ungrouped variables", "definition": "map(precround(raw_probs[j]/sum(raw_probs),2),j,0..3)", "description": "

The probability of each of the first 4 friends winning the game. The missing person isn't included, so their probability can be 1 minus the sum of the rest, accumulating any rounding errors.

", "templateType": "anything", "can_override": false}, "pname": {"name": "pname", "group": "Ungrouped variables", "definition": "person['name']", "description": "", "templateType": "anything", "can_override": false}, "person": {"name": "person", "group": "Ungrouped variables", "definition": "people[2]", "description": "

The person whose probability is not given.

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

Uniform random values for each of the five friends. Their winning probabilities will be in proportion to this.

", "templateType": "anything", "can_override": false}, "people": {"name": "people", "group": "Ungrouped variables", "definition": "random_people(5)", "description": "", "templateType": "anything", "can_override": false}, "p_not_name": {"name": "p_not_name", "group": "Ungrouped variables", "definition": "sum(probs)", "description": "

The probability that the chosen person does not win.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["people", "raw_probs", "probs", "person", "pname", "p_not_name"], "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": "

What is $\\mathrm{P}(\\text{not } \\var{pname})$?

\n

[[0]]

\n

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "P(not {name})", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "p_not_name", "maxValue": "p_not_name", "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": "

What is $\\mathrm{P}(\\var{pname})$?

\n

[[0]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "P({name})", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "p_not_name", "part": "p0g0", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "1-p_not_name", "maxValue": "1-p_not_name", "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"}, {"name": "Roll a pair of dice - find probability at least one die shows a given number.", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "tags": ["checked2015", "dice", "Dice", "die", "elementary probability", "events", "independence", "Independence", "independent events", "Probability", "probability", "probability dice", "statistics", "tested1"], "metadata": {"description": "

Rolling a pair of dice. Find probability that at least one die shows a given number.

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

Two fair six-sided dice are rolled.

", "advice": "\n \n \n

Let $A$ be the event that first dice shows a $\\var{number}$ $\\Rightarrow P(A)=\\frac{1}{6}$.

\n \n \n \n

Let $B$ be the event that second dice shows a $\\var{number}$ $\\Rightarrow P(B)=\\frac{1}{6}$.

\n \n \n \n

$A$ and $B$ are independent events so $P(A\\cap B) = P(A)\\times P(B)$.

\n \n \n \n

We want the probability $P(A \\cup B)$ of either $A$ or $B$ showing $\\var{number}$ and

\n \n \n \n

\\[\\begin{eqnarray*}\n \n P(A \\cup B) &=& P(A)+P(B)-P(A \\cap B)\\\\\n \n &=& P(A)+P(B)-P(A)P(B)\\\\\n \n &=&\\frac{1}{6}+ \\frac{1}{6}-\\frac{1}{36}\\\\\n \n &=& \\frac{11}{36}\n \n \\end{eqnarray*}\n \n \\]

\n \n \n ", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"number": {"name": "number", "group": "Ungrouped variables", "definition": "random(1..6)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["number"], "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": "

What is the probability of at least one die showing a $\\var{number}$?

\n

Probability = [[0]]

", "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": "11/36", "maxValue": "11/36", "correctAnswerFraction": true, "allowFractions": true, "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"}, {"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"}, {"name": "Poisson distribution", "extensions": [], "custom_part_types": [], "resources": [["question-resources/Capture_AwJBoYj.PNG", "/srv/numbas/media/question-resources/Capture_AwJBoYj.PNG"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Yvonne Wancke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3531/"}], "tags": [], "rulesets": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "statement": "

Give your answers to 4 decimal places.

", "metadata": {"licence": "All rights reserved", "description": "Some questions to try"}, "advice": "

You should use the formula for the Poisson distribution.

\n

\n

", "parts": [{"maxValue": "((e^-mean)*mean^r)/r!", "precisionType": "dp", "minValue": "((e^-mean)*mean^r)/r!", "correctAnswerFraction": false, "variableReplacements": [], "strictPrecision": true, "variableReplacementStrategy": "originalfirst", "customName": "", "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "showPrecisionHint": true, "showCorrectAnswer": true, "mustBeReducedPC": 0, "precisionPartialCredit": "50", "correctAnswerStyle": "plain", "allowFractions": false, "useCustomName": false, "scripts": {}, "customMarkingAlgorithm": "", "marks": 1, "precision": "4", "type": "numberentry", "showFeedbackIcon": true, "precisionMessage": "You have not given your answer to the correct precision.", "unitTests": [], "prompt": "

A call centre has an average of {mean} calls in one hour. What is the probability that exactly {r} calls are received in a one hour time period?

", "notationStyles": ["plain", "en", "si-en"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "variable_groups": [], "variables": {"Prob": {"definition": "(e^(-{mean})*{mean}^r)/{r}!\n", "group": "Ungrouped variables", "description": "", "name": "Prob", "templateType": "anything"}, "mean": {"definition": "random(3..15)", "group": "Ungrouped variables", "description": "", "name": "mean", "templateType": "anything"}, "r": {"definition": "random(3..10)", "group": "Ungrouped variables", "description": "", "name": "r", "templateType": "anything"}}, "ungrouped_variables": ["mean", "r", "Prob"]}, {"name": "Venn Diagram question", "extensions": [], "custom_part_types": [], "resources": [["question-resources/Venn.PNG", "/srv/numbas/media/question-resources/Venn.PNG"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Yvonne Wancke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3531/"}], "tags": [], "rulesets": {}, "ungrouped_variables": ["A", "B", "N", "Both", "T", "A1", "B1", "Both1", "N1", "T1"], "statement": "

You can solve these questions by using a Venn Diagram

", "metadata": {"licence": "None specified", "description": ""}, "advice": "", "parts": [{"maxValue": "Both", "minValue": "Both", "correctAnswerFraction": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "customName": "", "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "showFeedbackIcon": true, "useCustomName": false, "scripts": {}, "customMarkingAlgorithm": "", "marks": 1, "type": "numberentry", "allowFractions": false, "showFractionHint": true, "unitTests": [], "prompt": "

{T} people were asked which newspapers they read. {A} people said that they read a tabloid, while {B} people read a broadsheet. {N} people read neither. Calculate how many people read both tabloids and broadsheets.

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

{T1} students took part in a survey. {A1} said that they preferred eBooks, whilst {B1} said that they preferred traditional books. {Both1} like both equally. How many did not like either?

", "showCorrectAnswer": true}], "variablesTest": {"maxRuns": 100, "condition": ""}, "functions": {}, "preamble": {"js": "", "css": ""}, "variable_groups": [], "variables": {"B1": {"definition": "random(50..80)", "group": "Ungrouped variables", "description": "", "name": "B1", "templateType": "anything"}, "A1": {"definition": "random(50..90)", "group": "Ungrouped variables", "description": "", "name": "A1", "templateType": "anything"}, "N": {"definition": "random(3..20)", "group": "Ungrouped variables", "description": "

Neither

", "name": "N", "templateType": "anything"}, "N1": {"definition": "Both1+T1-(A1+B1)", "group": "Ungrouped variables", "description": "", "name": "N1", "templateType": "anything"}, "A": {"definition": "random(60..90)", "group": "Ungrouped variables", "description": "

One of the categories

", "name": "A", "templateType": "anything"}, "T": {"definition": "random (110..120)", "group": "Ungrouped variables", "description": "

Total

", "name": "T", "templateType": "anything"}, "Both": {"definition": "(A+B)-(T-N)", "group": "Ungrouped variables", "description": "

Both

", "name": "Both", "templateType": "anything"}, "Both1": {"definition": "random(20..30)", "group": "Ungrouped variables", "description": "", "name": "Both1", "templateType": "anything"}, "B": {"definition": "random(60..80)", "group": "Ungrouped variables", "description": "", "name": "B", "templateType": "anything"}, "T1": {"definition": "random(150..160)", "group": "Ungrouped variables", "description": "", "name": "T1", "templateType": "anything"}}}, {"name": "Tree Diagrams Question (2 events)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Yvonne Wancke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3531/"}], "statement": "

Questions using tree diagrams

", "rulesets": {}, "variable_groups": [], "parts": [{"customMarkingAlgorithm": "", "mustBeReduced": false, "allowFractions": false, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "b", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "prompt": "

Jenny always travels to work by either metro or bus. The probability that she travels by metro is {m}. If she travels by metro then the probability that she is on time is {Tm}. If she travels by bus then the probability that she is on time is {Tb}.

\n

What is the probability that she travels by bus on any given day?

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

If she travels by metro, what is the probability that she is late?

", "showCorrectAnswer": true, "type": "numberentry", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "customName": "", "unitTests": [], "maxValue": "1-Tm", "mustBeReducedPC": 0, "marks": 1, "useCustomName": false, "showFeedbackIcon": true}, {"customMarkingAlgorithm": "", "mustBeReduced": false, "allowFractions": false, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "b*(1-Tb)", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "prompt": "

What is the probability that she travels by bus and she is late?

", "showCorrectAnswer": true, "type": "numberentry", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "customName": "", "unitTests": [], "maxValue": "b*(1-Tb)", "mustBeReducedPC": 0, "marks": 1, "useCustomName": false, "showFeedbackIcon": true}, {"customMarkingAlgorithm": "", "mustBeReduced": false, "allowFractions": false, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "b*(1-Tb)+m*(1-Tm)", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "prompt": "

What is the probability that she is late?

", "showCorrectAnswer": true, "type": "numberentry", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "customName": "", "unitTests": [], "maxValue": "b*(1-Tb)+m*(1-Tm)", "mustBeReducedPC": 0, "marks": 1, "useCustomName": false, "showFeedbackIcon": true}], "functions": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "", "ungrouped_variables": ["m", "b", "Tm", "Tb"], "variables": {"b": {"description": "

The probability of travelling by bus.

", "templateType": "anything", "definition": "1-{m}", "name": "b", "group": "Ungrouped variables"}, "Tm": {"description": "

The probability of being on time if the metro is used

", "templateType": "anything", "definition": "random(0.6,0.7,0.8,0.9)", "name": "Tm", "group": "Ungrouped variables"}, "m": {"description": "

The probability of travelling by metro

", "templateType": "anything", "definition": "random(0.6,0.7,0.8,0.9)", "name": "m", "group": "Ungrouped variables"}, "Tb": {"description": "

The probability of being on time if the bus is used.

", "templateType": "anything", "definition": "random(0.6,0.7,0.8,0.9)", "name": "Tb", "group": "Ungrouped variables"}}, "metadata": {"description": "", "licence": "None specified"}, "preamble": {"js": "", "css": ""}, "tags": []}]}], "showQuestionGroupNames": false, "percentPass": 0, "name": "Probability Revision", "duration": 0, "contributors": [{"name": "Yvonne Wancke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3531/"}], "extensions": ["random_person", "stats"], "custom_part_types": [], "resources": [["question-resources/dice.svg", "/srv/numbas/media/question-resources/dice.svg"], ["question-resources/breakfastven2.svg", "/srv/numbas/media/question-resources/breakfastven2.svg"], ["question-resources/breakfastvenplus2.svg", "/srv/numbas/media/question-resources/breakfastvenplus2.svg"], ["question-resources/Capture_AwJBoYj.PNG", "/srv/numbas/media/question-resources/Capture_AwJBoYj.PNG"], ["question-resources/Venn.PNG", "/srv/numbas/media/question-resources/Venn.PNG"]]}