// Numbas version: finer_feedback_settings {"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}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"rulesets": {}, "variable_groups": [], "tags": ["Multiple Choice", "multiple choice", "Multiple choice", "Mutually exclusive events", "Not mutually exclusive events", "Probability", "probability", "taxonomy"], "name": "Probability of the union of two non-mutually exclusive events", "functions": {}, "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.

"}, "ungrouped_variables": ["c", "t", "b", "raw_proportions", "proportions", "total"], "parts": [{"distractors": ["", ""], "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "displayColumns": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "scripts": {}, "marks": 0, "displayType": "radiogroup", "matrix": [0, "1"], "choices": ["

Yes

", "

No

"], "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?

", "minMarks": 0, "shuffleChoices": false}, {"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$."], "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "displayColumns": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "scripts": {}, "marks": 0, "displayType": "radiogroup", "matrix": ["1", 0, 0, "0"], "choices": ["

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

", "

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

", "

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

", "

$1$

"], "type": "1_n_2", "prompt": "

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

", "minMarks": 0, "shuffleChoices": false}], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"c": {"description": "

Percentage of people who have cereal for breakfast.

", "templateType": "anything", "name": "c", "definition": "proportions[0]//random(20..40)", "group": "Ungrouped variables"}, "raw_proportions": {"description": "", "templateType": "anything", "name": "raw_proportions", "definition": "[random(4..6#0),random(2..3#0)]+repeat(random(1..4#0),3)", "group": "Ungrouped variables"}, "b": {"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.

", "templateType": "anything", "name": "b", "definition": "let(s,min(c,t), random(round(s/8)..round(s/3)))", "group": "Ungrouped variables"}, "proportions": {"description": "

The percentage of people who ticked each option.

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

Percentage of people who have toast for breakfast.

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

The total of the percentages for each option.

\n

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

", "templateType": "anything", "name": "total", "definition": "random(120..160)", "group": "Ungrouped variables"}}, "extensions": [], "type": "question", "preamble": {"js": "", "css": ""}, "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}
\\]

", "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.

", "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": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "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": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}