// Numbas version: exam_results_page_options {"name": "Simon's copy of 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}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"js": "", "css": ""}, "variables": {"raw_proportions": {"templateType": "anything", "definition": "[random(4..6#0),random(2..3#0)]+repeat(random(1..4#0),3)", "description": "", "name": "raw_proportions", "group": "Ungrouped variables"}, "c": {"templateType": "anything", "definition": "proportions[0]//random(20..40)", "description": "

Percentage of people who have cereal for breakfast.

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

The total of the percentages for each option.

\n

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

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

Percentage of people who have toast for breakfast.

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

The percentage of people who ticked each option.

", "name": "proportions", "group": "Ungrouped variables"}, "b": {"templateType": "anything", "definition": "let(s,min(c,t), random(round(s/8)..round(s/3)))", "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.

", "name": "b", "group": "Ungrouped variables"}}, "rulesets": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "name": "Simon's copy of Probability of the union of two non-mutually exclusive events", "variable_groups": [], "tags": [], "parts": [{"matrix": [0, "1"], "variableReplacements": [], "displayType": "radiogroup", "showFeedbackIcon": true, "unitTests": [], "choices": ["

Yes

", "

No

"], "shuffleChoices": false, "showCellAnswerState": true, "displayColumns": 0, "distractors": ["", ""], "type": "1_n_2", "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?

", "showCorrectAnswer": true, "marks": 0, "scripts": {}, "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "minMarks": 0, "extendBaseMarkingAlgorithm": true}, {"matrix": ["1", 0, 0, "0"], "variableReplacements": [], "displayType": "radiogroup", "showFeedbackIcon": true, "unitTests": [], "choices": ["

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

", "

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

", "

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

", "

$1$

"], "shuffleChoices": false, "showCellAnswerState": true, "displayColumns": 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$."], "type": "1_n_2", "prompt": "

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

", "showCorrectAnswer": true, "marks": 0, "scripts": {}, "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "minMarks": 0, "extendBaseMarkingAlgorithm": true}], "extensions": [], "metadata": {"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.

", "licence": "Creative Commons Attribution 4.0 International"}, "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.

\n

\n

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

\n\n

If we added these two numbers, this would count the people who have cereal AND toast twice! To correct our answer, we must subtract the number of people who had cereal AND toast.

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

", "ungrouped_variables": ["c", "t", "b", "raw_proportions", "proportions", "total"], "functions": {}, "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.

", "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/"}]}