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.

\nThis 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": "Mutually exclusive events are events that cannot happen at the same time.

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

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

\nWe know from the results of the survey** **that some people have both cereal and toast for breakfast.

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

- \n
- all the people who have cereal (including the participants who have cereal
**AND**toast) \n - all the people who have toast (including the participants who have toast
**AND**cereal) \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.

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

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

\n- \n
- The \"Intersection\" symbol $\\cap$, used instead of \"and\". \n
- The \"Union\" symbol $\\cup$, used instead of \"or\". \n

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

\\[

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

\\]

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

\nA 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\nFood | Cereal | Toast | Fruit | Fry-up | Other |
---|---|---|---|---|---|

% of participants | {proportions[0]} | {proportions[1]} | {proportions[2]} | {proportions[3]} | {proportions[4]} |

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