// Numbas version: exam_results_page_options {"name": "Simon's copy of 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}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"rulesets": {}, "variable_groups": [], "functions": {}, "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 $\\var{name}$ wins or $\\var{name}$ doesn't win.

\n

This means that

\n

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

\n

\n

a)

\n

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

\n

So the probability of {name} 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{name}) &= \\mathrm{P}(\\var{people[0]['name']})+\\mathrm{P}(\\var{people[1]['name']})+\\mathrm{P}(\\var{people[2]['name']})+\\mathrm{P}(\\var{people[3]['name']}) \\\\
&= \\var{latex(join(probs,' + '))}\\\\
&= \\var{sum(probs)}.
\\end{align}

\n

b)

\n

Rearranging the equation above gives

\n

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

\n

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

\n

Therefore

\n

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

", "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]}$
", "variablesTest": {"maxRuns": 100, "condition": ""}, "ungrouped_variables": ["people", "raw_probs", "probs", "person", "name"], "tags": [], "extensions": ["random_person"], "preamble": {"css": "", "js": ""}, "parts": [{"showFeedbackIcon": true, "unitTests": [], "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "type": "gapfill", "prompt": "

\n

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

\n

[[0]]

\n

", "marks": 0, "gaps": [{"correctAnswerStyle": "plain", "minValue": "sum(probs)", "showFeedbackIcon": true, "correctAnswerFraction": false, "maxValue": "sum(probs)", "allowFractions": false, "unitTests": [], "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "type": "numberentry", "mustBeReducedPC": 0, "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "mustBeReduced": false}], "scripts": {}, "customMarkingAlgorithm": ""}, {"showFeedbackIcon": true, "unitTests": [], "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "type": "gapfill", "prompt": "

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

\n

[[0]]

", "marks": 0, "gaps": [{"correctAnswerStyle": "plain", "minValue": "1-sum(probs)", "showFeedbackIcon": true, "correctAnswerFraction": false, "maxValue": "1-sum(probs)", "allowFractions": false, "unitTests": [], "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "type": "numberentry", "mustBeReducedPC": 0, "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "mustBeReduced": false}], "scripts": {}, "customMarkingAlgorithm": ""}], "name": "Simon's copy of The probability of an event not happening - five friends play mini golf", "variables": {"probs": {"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.

", "name": "probs", "definition": "map(precround(raw_probs[j]/sum(raw_probs),2),j,0..3)", "templateType": "anything", "group": "Ungrouped variables"}, "name": {"description": "", "name": "name", "definition": "person['name']", "templateType": "anything", "group": "Ungrouped variables"}, "people": {"description": "", "name": "people", "definition": "random_people(5)", "templateType": "anything", "group": "Ungrouped variables"}, "raw_probs": {"description": "

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

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

The person whose probability is not given.

", "name": "person", "definition": "people[2]", "templateType": "anything", "group": "Ungrouped variables"}}, "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"}, "type": "question", "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/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "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/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}