// Numbas version: finer_feedback_settings {"type": "exam", "feedback": {"allowrevealanswer": true, "showanswerstate": true, "showactualmark": true, "showtotalmark": true, "advicethreshold": 0, "intro": "", "feedbackmessages": [], "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "never"}, "name": "Probability", "timing": {"allowPause": true, "timedwarning": {"action": "none", "message": ""}, "timeout": {"action": "none", "message": ""}}, "showQuestionGroupNames": false, "showstudentname": true, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "
Calculations involving elementary probability, and several questions designed to draw out misconceptions to do with probability.
"}, "navigation": {"browse": true, "showfrontpage": true, "showresultspage": "oncompletion", "reverse": true, "preventleave": true, "allowregen": true, "onleave": {"action": "none", "message": ""}}, "percentPass": 0, "duration": 0, "question_groups": [{"pickQuestions": 1, "name": "Group", "pickingStrategy": "all-ordered", "questions": [{"name": "Discrete and continuous data", "extensions": [], "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": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}], "variable_groups": [], "preamble": {"js": "", "css": ""}, "type": "question", "parts": [{"matrix": [0, "1"], "maxMarks": 0, "type": "1_n_2", "showCorrectAnswer": true, "minMarks": 0, "distractors": ["", ""], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "shuffleChoices": false, "showFeedbackIcon": true, "marks": 0, "displayColumns": 0, "scripts": {}, "choices": ["Discrete
", "Continuous
"], "variableReplacements": [], "prompt": "{cont[ranc]}
"}, {"matrix": ["1", 0], "maxMarks": 0, "type": "1_n_2", "showCorrectAnswer": true, "minMarks": 0, "distractors": ["", ""], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "shuffleChoices": false, "showFeedbackIcon": true, "marks": 0, "displayColumns": 0, "scripts": {}, "choices": ["Discrete
", "Continuous
"], "variableReplacements": [], "prompt": "{disc[rand]}
"}, {"matrix": ["1", 0], "maxMarks": 0, "type": "1_n_2", "showCorrectAnswer": true, "minMarks": 0, "distractors": ["", ""], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "shuffleChoices": false, "showFeedbackIcon": true, "marks": 0, "displayColumns": 0, "scripts": {}, "choices": ["Discrete
", "Continuous
"], "variableReplacements": [], "prompt": "{disc[rand2]}
"}, {"matrix": [0, "1"], "maxMarks": 0, "type": "1_n_2", "showCorrectAnswer": true, "minMarks": 0, "distractors": ["", ""], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "shuffleChoices": false, "showFeedbackIcon": true, "marks": 0, "displayColumns": 0, "scripts": {}, "choices": ["Discrete
", "Continuous
"], "variableReplacements": [], "prompt": "{cont[ranc2]}
"}, {"matrix": ["1", 0], "maxMarks": 0, "type": "1_n_2", "showCorrectAnswer": true, "minMarks": 0, "distractors": ["", ""], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "shuffleChoices": false, "showFeedbackIcon": true, "marks": 0, "displayColumns": 0, "scripts": {}, "choices": ["Discrete
", "Continuous
"], "variableReplacements": [], "prompt": "{trick[rant]}
"}, {"matrix": ["1", 0], "maxMarks": 0, "type": "1_n_2", "showCorrectAnswer": true, "minMarks": 0, "distractors": ["", ""], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "shuffleChoices": false, "showFeedbackIcon": true, "marks": 0, "displayColumns": 0, "scripts": {}, "choices": ["Discrete
", "Continuous
"], "variableReplacements": [], "prompt": "{disc[rand3]}
"}], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Deicde whether each of the described sets of data is drawn from a discrete or continuous distribution.
"}, "tags": ["continuous data", "discrete data", "taxonomy"], "variables": {"rand3": {"templateType": "anything", "description": "", "definition": "random(0..5 except rand except rand2)", "name": "rand3", "group": "Ungrouped variables"}, "cont": {"templateType": "anything", "description": "", "definition": "[\"The height of Newcastle University students.\", \"The weight of Olympic medalists.\", \"The time taken to brush teeth.\", \"The maximum daily temperature.\"]", "name": "cont", "group": "Ungrouped variables"}, "disc": {"templateType": "anything", "description": "", "definition": "[\"The number of Stage 1 students.\", \"The result of rolling 3 dice.\", \"Shoe sizes.\", \"The number of chocolate bars sold on Monday.\", \"The number of movies downloaded.\", \"The number of cinema tickets sold.\"]", "name": "disc", "group": "Ungrouped variables"}, "trick": {"templateType": "anything", "description": "", "definition": "[\"The weight of a dog to the nearest kg.\", \"The height of Olympic medalists to the nearest cm.\", \"The time taken to run 10km to the nearest min.\"]", "name": "trick", "group": "Ungrouped variables"}, "ranc2": {"templateType": "anything", "description": "", "definition": "random(0..3 except ranc)", "name": "ranc2", "group": "Ungrouped variables"}, "rant": {"templateType": "anything", "description": "", "definition": "random(0..2)", "name": "rant", "group": "Ungrouped variables"}, "rand": {"templateType": "anything", "description": "", "definition": "random(0..5)", "name": "rand", "group": "Ungrouped variables"}, "rand2": {"templateType": "anything", "description": "", "definition": "random(0..5 except rand)", "name": "rand2", "group": "Ungrouped variables"}, "ranc": {"templateType": "anything", "description": "", "definition": "random(0..3)", "name": "ranc", "group": "Ungrouped variables"}}, "rulesets": {}, "functions": {}, "ungrouped_variables": ["disc", "cont", "trick", "ranc", "rant", "ranc2", "rand2", "rand3", "rand"], "statement": "Decide whether the following data sets are discrete or continuous.
", "advice": "Data can either be discrete or continuous.
\nHeight is a continuous variable. For example, 180.3cm and 180.4cm have a valid midpoint 180.35cm.Weight is a continuous variable. For example, 54.5kg and 54.6kg have a valid midpoint 54.55kg.Time is a continuous variable. For example, 54.2s and 54.3s have a valid midpoint 54.25s.Temperature is a continuous variable, it can take any value between -273.15°C (absolute zero) and positive infinity. For example, 25°C and 26°C have a valid midpoint 25.5°C. Hence, this data is continuous.
\nThe number of Stage 1 students will always be an integer. You cannot split one student into two, for example value 19.5 students does not make sense. Therefore, this is a discrete set of data.The result of rolling 3 dice can take values of integers from 3 up to 18. For example, values 3 and 4 do not have any valid middle measurement. Therefore, this is a discrete set of data.Shoe sizes are a discrete set of data. For example, sizes 39 and 40 mean something while the middle value 39.5 does not.The number of chocolate bars sold on Monday will always be an integer. There is no middle measurement between 1 and 2 bars sold. You cannot buy a half of a bar. Therefore, this is a discrete set of data.The number of movies downloaded will always be an integer. You can either download a movie successfully or unsuccessfuly, so this is a discrete set of data. It is impossible to split 0 and 1 movies downloaded into 0.5. The number of cinema tickets sold will always be a whole number. There is no middle measurement between 1 and 2 tickets sold. You simply cannot buy half of a ticket. Therefore, this is a discrete set of data.
\nThe number of Stage 1 students will always be an integer. You cannot split one student into two, for example value 19.5 students does not make sense. Therefore, this is a discrete set of data.The result of rolling 3 dice can take values of integers from 3 up to 18. For example, values 3 and 4 do not have any valid middle measurement. Therefore, this is a discrete set of data.Shoe sizes are a discrete set of data. For example, sizes 39 and 40 mean something while the middle value 39.5 does not..The number of chocolate bars sold on Monday will always be an integer. There is no middle measurement between 1 and 2 bars sold. You cannot buy a half of a bar. Therefore, this is a discrete set of data.The number of movies downloaded will always be an integer. You can either download a movie successfully or unsuccessfuly, so this is a discrete set of data. It is impossible to split 0 and 1 movies downloaded into 0.5.The number of cinema tickets sold will always be a whole number. There is no middle measurement between 1 and 2 tickets sold. You simply cannot buy half of a ticket. Therefore, this is a discrete set of data.
\nHeight is a continuous variable. For example, 180.3cm and 180.4cm have a valid midpoint 180.35cm.Weight is a continuous variable. For example, 54.5kg and 54.6kg have a valid midpoint 54.55kg.Time is a continuous variable. For example, 54.2s and 54.3s have a valid midpoint 54.25s.Temperature is a continuous variable, it can take any value between -273.15°C (absolute zero) and positive infinity. For example, 25°C and 26°C have a valid midpoint 25.5°C. Hence, this data is continuous.
\nWhen we round continuous variables to the nearest integer, this data becomes discrete, as there are no valid middle measurements between the integers. Therefore, the weight of a dog to the nearest kgthe height of Olympic medalists to the nearest cmthe time taken to run 10km to the nearest min is discrete and not continuous.
\nThe number of Stage 1 students will always be an integer. You cannot split one student into two, for example value 19.5 students does not make sense. Therefore, this is a discrete set of data.The result of rolling 3 dice can take values of integers from 3 up to 18. For example, values 3 and 4 do not have any valid middle measurement. Therefore, this is a discrete set of data.Shoe sizes are a discrete set of data. For example, sizes 39 and 40 mean something while the middle value 39.5 does not.The number of chocolate bars sold on Monday will always be an integer. There is no middle measurement between 1 and 2 bars sold. You cannot buy half of a bar of chocolate. Therefore, this is a discrete set of data.The number of movies downloaded will always be an integer. You can either download a movie successfully or unsuccessfuly, so this is a discrete set of data. It is impossible to split 0 and 1 movies downloaded into 0.5.The number of cinema tickets sold will always be a whole number. There is no middle measurement between 1 and 2 tickets sold. You simply cannot buy half of a ticket. Therefore, this is a discrete set of data.
\n\n", "variablesTest": {"condition": "", "maxRuns": 100}}, {"name": "Probability - Notation and Conversion between Percentages, Decimals and Fractions", "extensions": [], "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": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "variable_groups": [], "preamble": {"js": "", "css": ""}, "type": "question", "parts": [{"variableReplacementStrategy": "originalfirst", "type": "gapfill", "scripts": {}, "marks": 0, "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "mustBeReduced": false, "type": "numberentry", "showCorrectAnswer": true, "variableReplacements": [], "precisionMessage": "You have not given your answer to the correct precision.", "precisionType": "dp", "mustBeReducedPC": 0, "precisionPartialCredit": 0, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "allowFractions": false, "showPrecisionHint": true, "strictPrecision": false, "maxValue": "{percentage}/100", "precision": "2", "marks": 1, "scripts": {}, "minValue": "{percentage}/100", "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"]}, {"correctAnswerFraction": true, "mustBeReduced": true, "type": "numberentry", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "allowFractions": true, "scripts": {}, "minValue": "{percentage}/100", "maxValue": "{percentage}/100", "marks": 1, "variableReplacements": []}], "variableReplacements": [], "showFeedbackIcon": true, "prompt": "The probability that it rains today is $\\var{percentage}\\%$.
\ni)
\nConvert this probability to a decimal.
\n$\\mathrm{P}(\\text{Rain}) =$ [[0]]
\nii)
\nConvert this probability to a fraction.
\n$\\mathrm{P}(\\text{Rain}) =$ [[1]]
"}, {"variableReplacementStrategy": "originalfirst", "type": "gapfill", "scripts": {}, "marks": 0, "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "mustBeReduced": false, "type": "numberentry", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "allowFractions": false, "scripts": {}, "minValue": "{decimal}*100", "maxValue": "{decimal}*100", "marks": 1, "variableReplacements": []}, {"correctAnswerFraction": true, "mustBeReduced": true, "type": "numberentry", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "allowFractions": true, "scripts": {}, "minValue": "{decimal}", "maxValue": "{decimal}", "marks": 1, "variableReplacements": []}], "variableReplacements": [], "showFeedbackIcon": true, "prompt": "The probability that your bus is late today is $\\var{decimal}$.
\ni)
\nConvert this probability to a percentage (if necessary, round your answer to the nearest percent).
\n$\\mathrm{P}(\\text{Late}) =$ [[0]]$\\%$.
\nii)
\nConvert this probability to a fraction.
\n$\\mathrm{P}(\\text{Late}) =$ [[1]]
"}, {"variableReplacementStrategy": "originalfirst", "type": "gapfill", "scripts": {}, "marks": 0, "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "mustBeReduced": false, "type": "numberentry", "showCorrectAnswer": true, "variableReplacements": [], "precisionMessage": "You have not given your answer to the correct precision.", "precisionType": "dp", "mustBeReducedPC": 0, "precisionPartialCredit": 0, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "allowFractions": false, "showPrecisionHint": false, "strictPrecision": false, "maxValue": "(1/{denominator})*100", "precision": 0, "marks": 1, "scripts": {}, "minValue": "(1/{denominator})*100", "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"]}, {"correctAnswerFraction": false, "mustBeReduced": false, "type": "numberentry", "showCorrectAnswer": true, "variableReplacements": [], "precisionMessage": "You have not given your answer to the correct precision.", "precisionType": "dp", "mustBeReducedPC": 0, "precisionPartialCredit": 0, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "allowFractions": false, "showPrecisionHint": true, "strictPrecision": false, "maxValue": "(1/{denominator})", "precision": "2", "marks": 1, "scripts": {}, "minValue": "(1/{denominator})", "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"]}], "variableReplacements": [], "showFeedbackIcon": true, "prompt": "The probability that a football match between Newcastle United and Manchester United ends in a draw is $\\displaystyle\\frac{1}{\\var{denominator}}$.
\ni)
\nConvert this probability to a percentage (if necessary, round your answer to the nearest percent).
\n$\\mathrm{P}(\\text{Draw}) =$ [[0]]$\\%$.
\nii)
\nConvert this probability to a decimal.
\n$\\mathrm{P}(\\text{Draw}) =$ [[1]]
"}], "advice": "We are told that $\\mathrm{P}(\\text{Rain}) = \\var{percentage}\\%$.
\ni)
\nTo convert this to a decimal, we divide $\\var{percentage}$ by $100$.
\n\\[\\frac{\\var{percentage}}{100} = \\simplify{{{percentage}/100}}.\\]
\nThen, $\\mathrm{P}(\\text{Rain}) = \\simplify{{{percentage}/100}}$.
\nii)
\nSimilary, to convert this to a fraction, we divide $\\var{percentage}$ by $100$, but leave the fraction in its simplified form.
\n\\[\\frac{\\var{percentage}}{100} = \\simplify{{percentage}/100}.\\]
\nThen, $\\mathrm{P}(\\text{Rain}) = \\displaystyle\\simplify{{percentage}/100}$.
\nWe are told that $\\mathrm{P}(\\text{Late}) = \\var{decimal}$.
\ni)
\nTo convert this to a percentage, we multiply $\\var{decimal}$ by $100$.
\n\\[\\var{decimal} \\times 100 = \\simplify{{decimal}*100}.\\]
\nThen, $\\mathrm{P}(\\text{Late}) = \\simplify{{decimal}*100}\\%$.
\nii)
\nTo convert this to a fraction, we multiply $\\var{decimal}$ by $\\displaystyle\\frac{100}{100}$.
\n\\[
\\begin{align}
\\var{decimal} \\times \\frac{100}{100} &= \\frac{\\simplify{{decimal}*100}}{100} \\\\[0.5em]
&= \\simplify{({decimal*100})/100}.
\\end{align}
\\]
Then, $\\mathrm{P}(\\text{Late}) =\\displaystyle\\simplify{({decimal}*100)/100}$.
\nWe are told that $\\mathrm{P}(\\text{Draw}) = \\displaystyle\\frac{1}{\\var{denominator}}$.
\ni)
\nTo convert this to a percentage, we multiply $\\displaystyle\\frac{1}{\\var{denominator}}$ by $100$.
\n\\[
\\begin{align}
\\frac{1}{\\var{denominator}} \\times 100 &= \\var{100/{denominator}} \\\\
&= \\var{dpformat(100/{denominator},0)} & (\\text{rounded to the nearest integer}).
\\end{align}
\\]
So, $\\mathrm{P}(\\text{Draw}) = \\var{dpformat(100/{denominator},0)}\\%$.
\nii)
\nTo convert this to a decimal, we can use a calculator to calculate $1 \\div \\var{denominator}$.
\n\\[\\frac{1}{\\var{denominator}} = \\simplify{{1/{denominator}}}.\\]
\nSo, $\\mathrm{P}(\\text{Draw}) = \\var{dpformat(1/{denominator},2)}$ (rounded to two decimal places).
", "tags": ["conversion", "Decimals", "decimals", "fractions", "Fractions", "percentages", "Probability", "probability", "taxonomy"], "variables": {"percentage": {"templateType": "anything", "description": "Part a.
", "definition": "random(10..90 #10)", "name": "percentage", "group": "Ungrouped variables"}, "denominator": {"templateType": "anything", "description": "Part c.
", "definition": "random(3..9 except 5) ", "name": "denominator", "group": "Ungrouped variables"}, "decimal": {"templateType": "anything", "description": "Part b.
", "definition": "random(0.10..0.90 #0.10 except percentage/100 )", "name": "decimal", "group": "Ungrouped variables"}}, "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "functions": {}, "ungrouped_variables": ["percentage", "decimal", "denominator"], "statement": "Probabilities can be expressed as fractions, decimals or percentages.
\nConvert each of the following probabilities into each of the two alternative numerical forms.
", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Represent a given probability to a decimal, fraction or percentage.
"}}, {"name": "Probabilities of certain and impossible events", "extensions": [], "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": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "metadata": {"description": "Determine whether outcomes are impossible or certain to occur.
", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["dice", "students"], "type": "question", "advice": "We are told that a fair, $6$-sided die is thrown.
\nThe sides on a fair, $6$-sided die are numbered $1$ to $6$. There is no $7$ on such a die.
\nTherefore, there is no chance of the die landing on a $7$, which means that the probability of the die landing on a $7$ must be $0$.
\nHence, this is an impossible event.
\nWe are told that a teacher chooses a student at random from a class of $20$ girls.
\nThe key piece of information to notice here is that the teacher's class is comprised of $20$ girls. Everybody in the class is a girl.
\nTherefore, the student that the teacher randomly chooses from the class must be a girl, which means that the probability that the student chosen is a girl is $1$.
\nHence, this is a certain event.
", "variable_groups": [], "rulesets": {}, "statement": "Probability is the chance that an event will occur.
\nA certain event is an event that will definitely happen and therefore has a probability of $1$.
\nAn impossible event is an event that will never happen and therefore has a probability of $0$.
", "parts": [{"scripts": {}, "gaps": [{"shuffleChoices": false, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "choices": ["1
", "1/2
", "1/6
", "0
"], "scripts": {}, "distractors": ["", "", "", ""], "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "marks": 0, "variableReplacements": [], "matrix": ["0", "0", 0, "1"], "displayType": "dropdownlist"}, {"shuffleChoices": true, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "choices": ["impossible
", "certain
", "unlikely
"], "scripts": {}, "distractors": ["", "", ""], "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "marks": 0, "variableReplacements": [], "matrix": ["1", 0, 0], "displayType": "dropdownlist"}], "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "A fair $6$-sided die is rolled. The probability that the die lands on a $\\var{dice}$ is [[0]]. Therefore, we say that this event is [[1]].
\n", "variableReplacementStrategy": "originalfirst"}, {"scripts": {}, "gaps": [{"shuffleChoices": false, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "choices": ["1
", "{students-1}/{students}
", "1/{students}
", "0
"], "scripts": {}, "distractors": ["", "", "", ""], "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "marks": 0, "variableReplacements": [], "matrix": ["1", 0, 0, "0"], "displayType": "dropdownlist"}, {"shuffleChoices": true, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "choices": ["certain
", "impossible
", "unlikely
"], "scripts": {}, "distractors": ["", "", ""], "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "marks": 0, "variableReplacements": [], "matrix": ["1", 0, 0], "displayType": "dropdownlist"}], "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "A teacher chooses a student at random from a class of $\\var{students}$ girls. The probability that the student chosen is a girl is [[0]]. Therefore, we say that this event is [[1]].
", "variableReplacementStrategy": "originalfirst"}], "tags": ["Certain", "Chance", "event", "Impossible", "Probability", "probability", "taxonomy"], "preamble": {"css": "", "js": ""}, "functions": {}, "variables": {"dice": {"description": "", "group": "Ungrouped variables", "definition": "random(7,8,9)", "name": "dice", "templateType": "anything"}, "students": {"description": "", "group": "Ungrouped variables", "definition": "random(20..30 #5)", "name": "students", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Ways of rolling two dice ", "extensions": [], "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": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "rulesets": {}, "functions": {}, "ungrouped_variables": [], "metadata": {"description": "Calculate outcomes for different configurations of rolling two dice.
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "variable_groups": [], "advice": "This question asks you to think about a very subtle property of probability. Don't worry if it seems complicated - it is!
\nYou're asked to consider what can happen when you roll dice following each of the given methods, before adding up the scores on the dice. So you need to think about how many different outcomes you can observe.
\nThere are a total of $36$ different outcomes when we roll one die twice; these are shown in the table below. for each outcome, the value of the first throw is shown before the outcome of the second throw.
\n\n | 1 | \n2 | \n3 | \n4 | \n5 | \n6 | \n
---|---|---|---|---|---|---|
1 | \n(1,1) | \n(1,2) | \n(1,3) | \n(1,4) | \n(1,5) | \n(1,6) | \n
2 | \n(2,1) | \n(2,2) | \n(2,3) | \n(2,4) | \n(2,5) | \n(2,6) | \n
3 | \n(3,1) | \n(3,2) | \n(3,3) | \n(3,4) | \n(3,5) | \n(3,6) | \n
4 | \n(4,1) | \n(4,2) | \n(4,3) | \n(4,4) | \n(4,5) | \n(4,6) | \n
5 | \n(5,1) | \n(5,2) | \n(5,3) | \n(5,4) | \n(5,5) | \n(5,6) | \n
6 | \n(6,1) | \n(6,2) | \n(6,3) | \n(6,4) | \n(6,5) | \n(6,6) | \n
When we roll one die twice, we know the order in which the rolls happened.
\nThis means that we can differentiate between rolling a 1 followed by a 2 - that's written (1,2) in the table above - and rolling a 2 followed by a 1 - that's written (2,1).
\nAlthough the sum of the numbers in these outcomes is the same, these two outcomes are different because we are able to distinguish between the two rolls of the die.
\nSimilarly to Method 1, there are a total of $36$ different outcomes when we roll two dice consecutively (one after the other); these are the same outcomes as in the table for Method 1.
\nAs in Method 1, we know that the dice were rolled in a certain order so we can distinguish between them.
\nIf you roll two indistinguishable dice simultaneously (at the same time), you can't tell the difference between (a 1 and a 2) or (a 2 and a 1), because there is nothing different about the dice and they weren't rolled in any order. From your point of view, they are the same outcome with probability $\\displaystyle\\frac{2}{36}$. The probabilities of the underlying events (each die's score) haven't changed, but the outcomes you observe have.
\nIn this case you have $21$ outcomes:
\nIn methods 1 and 2 we have $36$ outcomes, which are all different. Hence any one of these $36$ outcomes is equally likely to occur and the probability of each outcome is $\\displaystyle\\frac{1}{36}$.
\nContrastingly in Method 3, we have $21$ outcomes but these outcomes are not all equally likely.
\nFor example, there's only one way of obtaining two 1s, while there are two ways of obtaining a 1 and a 2, corresponding to two squares in the table in part a).
\nTherefore, the probability of obtaining two 1s would be $\\displaystyle\\frac{1}{36}$ but the probability of obtaining a 1 and a 2 would be
\n\\[\\displaystyle\\frac{2}{36} = \\displaystyle\\frac{1}{18}.\\]
", "statement": "A game asks for two dice scores to be added together, but doesn't specify how. You want to work out the probability of each possible outcome occurring.
\nYou come up with three different methods for obtaining two dice scores:
\nMethod $1$: Rolling one die twice.
\nMethod $2$: Rolling two dice consecutively.
\nMethod $3$: Rolling two identical dice simultaneously.
", "preamble": {"js": "", "css": ""}, "variables": {}, "parts": [{"variableReplacementStrategy": "originalfirst", "prompt": "How many different outcomes are there in each of the three methods, before adding up the scores on the dice?
\nNumber of outcomes for Method $1 =$ [[0]]
\nNumber of outcomes for Method $2 =$ [[1]]
\nNumber of outcomes for Method $3 =$ [[2]]
", "gaps": [{"variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "maxValue": "36", "allowFractions": false, "mustBeReducedPC": 0, "minValue": "36", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "marks": 1, "showCorrectAnswer": true}, {"variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "maxValue": "36", "allowFractions": false, "mustBeReducedPC": 0, "minValue": "36", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "marks": 1, "showCorrectAnswer": true}, {"variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "maxValue": "21", "allowFractions": false, "mustBeReducedPC": 0, "minValue": "21", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "marks": 1, "showCorrectAnswer": true}], "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "scripts": {}}, {"variableReplacementStrategy": "originalfirst", "choices": ["Method 1
", "Method 2
", "Method 3
"], "matrix": [0, 0, "1"], "displayColumns": 0, "distractors": ["", "", ""], "maxMarks": 0, "type": "m_n_2", "minMarks": 0, "marks": 0, "maxAnswers": 0, "prompt": "In which of these methods are the outcomes not all equally likely to occur?
", "variableReplacements": [], "warningType": "none", "showFeedbackIcon": true, "displayType": "checkbox", "shuffleChoices": false, "showCorrectAnswer": true, "minAnswers": 0, "scripts": {}}], "tags": ["Dice", "dice", "equally likely outcomes", "number of outcomes", "Probability", "probability", "sum of two dice", "taxonomy", "two dice"], "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Choose the probability of getting certain scores on a die", "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": {"js": "", "css": ""}, "type": "question", "parts": [{"variableReplacementStrategy": "originalfirst", "type": "gapfill", "scripts": {}, "showCorrectAnswer": true, "gaps": [{"matrix": [0, 0, "1", 0], "maxMarks": 0, "type": "1_n_2", "showCorrectAnswer": true, "minMarks": 0, "distractors": ["", "", "", ""], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "shuffleChoices": false, "showFeedbackIcon": true, "displayColumns": 0, "scripts": {}, "choices": ["$1$
", "$\\displaystyle\\frac{2}{3}$
", "$\\displaystyle\\frac{1}{2}$
", "$\\displaystyle\\frac{1}{3}$
"], "variableReplacements": [], "marks": 0}], "marks": 0, "showFeedbackIcon": true, "variableReplacements": [], "prompt": "What is the probability of rolling an even number?
\n[[0]]
"}, {"variableReplacementStrategy": "originalfirst", "type": "gapfill", "scripts": {}, "showCorrectAnswer": true, "gaps": [{"matrix": ["0", "1", 0, 0], "maxMarks": 0, "type": "1_n_2", "showCorrectAnswer": true, "minMarks": 0, "distractors": ["", "", "", ""], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "shuffleChoices": false, "showFeedbackIcon": true, "displayColumns": 0, "scripts": {}, "choices": ["$0$
", "$\\displaystyle\\frac{2}{3}$
", "$\\displaystyle\\frac{1}{3}$
", "$\\displaystyle\\frac{1}{4}$
"], "variableReplacements": [], "marks": 0}], "marks": 0, "showFeedbackIcon": true, "variableReplacements": [], "prompt": "What is the probability of not rolling a $\\var{die1}$ or $\\var{die2}$?
\n[[0]]
"}], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "First part asks for the probability of rolling an even number. Second part asks for the probability of not rolling either of two given numbers.
"}, "tags": ["taxonomy"], "variables": {"red": {"templateType": "anything", "description": "number of red balls in part c
", "definition": "random(15,19)", "name": "red", "group": "Ungrouped variables"}, "die2": {"templateType": "anything", "description": "Not included number for a) ii)
", "definition": "random(4..6)", "name": "die2", "group": "Ungrouped variables"}, "die1": {"templateType": "anything", "description": "Not included number for a) ii)
", "definition": "random(1..3)", "name": "die1", "group": "Ungrouped variables"}}, "rulesets": {}, "functions": {}, "ungrouped_variables": ["red", "die1", "die2"], "statement": "You're going to roll a fair six-sided die.
", "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}}$.
\nRolling a fair six-sided die has six possible outcomes, each of which is equally likely.
\nLet's say we want to find the probability of rolling a $2$. There is only one outcome which involves a $2$ being rolled, so the number of favourable outcomes is $1$.
\nHence using the above formula,
\n\\begin{align}
P(\\text{rolling a $2$}) &= \\displaystyle\\frac{\\text{number of favourable outcomes}}{\\text{total number of outcomes}}\\\\
&= \\displaystyle\\frac{1}{6}
\\end{align}
There are three possible outcomes where we roll an even number on the die:
\nUsing the formula for probability for equally likely outcomes, this means that
\n\\[
P(\\text{rolling an even number}) = \\frac{\\text{number of favourable outcomes}}{\\text{total number of outcomes}}= \\frac{3}{6} = \\frac{1}{2}
\\]
To find the probability of not rolling a $\\var{die1}$ or a $\\var{die2}$, we use the same formula again.
\nThe total number of outcomes is still $6$.
\nHere, we have four possible outcomes which don't involve rolling a $\\var{die1}$ or a $\\var{die2}$, i.e. when we roll any of the other numbers on the die.
\nUsing the formula,
\n\\[
P(\\text{not rolling a $\\var{die1}$ or a $\\var{die2}$}) = \\frac{\\text{number of favourable outcomes}}{\\text{total number of outcomes}} = \\frac{4}{6} = \\frac{2}{3}
\\]
$1$
", "$\\displaystyle\\frac{2}{3}$
", "$\\displaystyle\\frac{1}{2}$
", "$\\displaystyle\\frac{1}{3}$
"], "scripts": {}, "variableReplacements": [], "marks": 0}], "variableReplacements": [], "showFeedbackIcon": true, "prompt": "An unbiased coin is flipped. What is the probability of getting a tails?
\n[[0]]
"}], "advice": "\n\nWhen we flip an unbiased coin there are $2$ possible outcomes: heads or tails. Both outcomes are equally likely.
\n\\[
\\begin{align}
P(\\text{tails}) &= \\displaystyle\\frac{\\text{number of favourable outcomes}}{\\text{total number of outcomes}}\\\\
&= \\displaystyle\\frac{1}{2}.
\\end{align}
\\]
Choose the probability of getting a tails, from four options.
"}}, {"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\nWe 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.
\nThe total number of balls in the bag before the chosen ball is removed is
\n\\[\\var{red}+\\var{blue}+\\var{green} = \\var{total}.\\]
\nAs the ball is being removed randomly from the bag, there is an equal probability of selecting any one of the $\\var{total}$ balls.
\nTherefore, 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}}
\\]
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": "Which coin is more likely to be biased?", "extensions": [], "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": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "tags": ["Bias", "coin", "Coin", "Experimental probability", "experimental probability", "Experimental Probability", "Probability", "probability", "taxonomy"], "advice": "The results from the tosses of both coins are given in the table below.
\nOutcome | \nCoin 1 | \nCoin 2 | \n
Heads | \n$\\var{h1}$ | \n$\\var{h2}$ | \n
Tails | \n$\\var{t1}$ | \n$\\var{t2}$ | \n
We can calculate the number of tosses of each coin by adding together the number of heads and tails obtained for each coin.
\nCoin $1$ was tossed $\\var{h1+t1}$ times.
\nCoin $2$ was tossed $\\var{h2+t2}$ times.
\nThis means that for Coin $1$, the experimental probability of tossing heads is
\n\\[
\\begin{align}
\\displaystyle\\frac{\\var{h1}}{10000} &= \\var{{h1}/10000}\\\\
&= \\var{100*({h1}/10000)}\\%.
\\end{align}
\\]
Whereas for Coin $2$, the experimental probability of tossing heads is
\n\\[\\begin{align}\\displaystyle\\frac{\\var{h2}}{15} &= \\var{dpformat({h2}/15,2)} \\; (\\text{rounded to two decimal places})\\\\&= \\var{dpformat(100*({h2}/15),0)}\\%. \\end{align} \\]
\n\\[\\begin{align}\\displaystyle\\frac{\\var{h2}}{15} &= \\var{{h2}/15}\\\\&= \\var{100*({h2}/15)}\\%. \\end{align} \\]
\nWe can see from part a) that the number of tosses of Coin $1$ is much larger than the number of tosses of Coin $2$.
\nIt is important to know that as the number of trials in an experiment gets very large the experimental probability tends towards the theoretical probability.
\nFor an unbiased coin, the theoretical probability of tossing heads is $50\\%$ so as the number of tosses gets very large we would expect the experimental probability of tossing heads to get closer to $50\\%$.
\nTherefore, as the number of tosses of Coin $1$ is very large and the experimental probability of tossing heads with this coin is significantly different from $50\\%$, then it is quite likely that Coin $1$ could be biased.
\nOn the other hand, as the number of tosses for Coin $2$ is small, we cannot give an accurate opinion of whether this coin is biased or unbiased.
\nSo, there is more evidence of bias for Coin $1$ than for Coin $2$.
\nAs discussed in part b), there is more evidence of bias for Coin $1$ than for Coin $2$.
\nFurthermore, we saw that the experimental probability of tossing heads with Coin $1$ is significantly different from $50\\%$, which means that the coin could be biased in favour of heads.
\nSo, as we want the coin to land tails then we want to choose the coin that has the most reliable chance of landing tails-up.
\nSince there is less evidence of bias for Coin $2$ than for Coin $1$, we should choose to use Coin $2$ in the bet as there is a more reliable chance of tossing tails with this coin.
", "variables": {"h1": {"description": "number of heads for coin 1.
", "name": "h1", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(6000..7000 #250)"}, "h2": {"description": "Number of heads for coin 2.
", "name": "h2", "group": "Ungrouped variables", "templateType": "anything", "definition": "15 - t2"}, "t2": {"description": "Number of tails for coin 2.
", "name": "t2", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(2,3)"}, "t1": {"description": "Number of tails for coin 1
", "name": "t1", "group": "Ungrouped variables", "templateType": "anything", "definition": "10000 - h1"}, "win": {"description": "Money won in part b.
", "name": "win", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(5..20 #5)"}}, "statement": "Two different coins are flipped a different number of times. It is known that one of the coins is biased.
\nThe results for both coins are given in the table below.
\nOutcome | \nCoin 1 | \nCoin 2 | \n
---|---|---|
Heads | \n$\\var{h1}$ | \n$\\var{h2}$ | \n
Tails | \n$\\var{t1}$ | \n$\\var{t2}$ | \n
Calculate the experimental probability of tossing heads, $P(\\text{heads})$, for each coin. Enter your answers as fractions.
\n$P(\\text{heads})\\; \\text{for Coin $1$} =$ [[0]]
\n$P(\\text{heads})\\; \\text{for Coin $2$} =$ [[1]]
\n", "marks": 0}, {"scripts": {}, "minMarks": 0, "distractors": ["", ""], "variableReplacementStrategy": "originalfirst", "stepsPenalty": 0, "displayType": "radiogroup", "choices": ["Coin 1
", "Coin 2
"], "showFeedbackIcon": true, "prompt": "Based on the available results and the experimental probabilities calculated in part a), for which coin is there more evidence of bias?
", "steps": [{"scripts": {}, "variableReplacements": [], "type": "information", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "prompt": "We say that an event is biased if one outcome of the event is more likely than the other outcomes.
", "marks": 0}], "shuffleChoices": false, "matrix": ["1", 0], "variableReplacements": [], "marks": 0, "displayColumns": 0, "showCorrectAnswer": true, "maxMarks": 0, "type": "1_n_2"}, {"scripts": {}, "minMarks": 0, "distractors": ["", ""], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "choices": ["Coin 1
", "Coin 2
"], "showFeedbackIcon": true, "prompt": "You decide to take part in a bet with your friend Alex.
\nAlex says that if you toss either one of the above coins and the coin lands on tails then you win $£\\var{win}$. However, if the coin lands on heads then Alex wins $£\\var{win}$.
\nWhich coin should you choose in order to have a more reliable chance of winning the bet?
", "shuffleChoices": false, "matrix": [0, "1"], "variableReplacements": [], "marks": 0, "displayColumns": 0, "showCorrectAnswer": true, "maxMarks": 0, "type": "1_n_2"}], "ungrouped_variables": ["h1", "t1", "h2", "t2", "win"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "This question aims to assess the student's understanding of the difference between biased and unbiased events and also to assess the student's understanding of the fact that the experimental probability tends towards the theoretical probability as the number of trials increases.
"}, "preamble": {"css": "", "js": ""}, "functions": {}}, {"name": "The gambler's fallacy - probability of getting heads again after repeatedly getting heads", "extensions": [], "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/"}], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "tags": ["taxonomy"], "advice": "When we flip an unbiased coin there are two possible events that we could measure: the coin lands on heads or the coin lands on tails.
\nEach toss of the coin is independent; if we flip a coin once and it lands on heads then the next time we flip the coin it is still equally likely to land on either heads or tails.
\nIt doesn't matter what the coin landed on previously as this outcome does not affect the outcome of the next flip of the coin.
\nEven when we flip an unbiased coin $\\var{no_flips}$ times and it lands on heads each time; the next time we flip the coin, it is still equally likely to land on either heads or tails.
\nSo the probability that the coin lands on heads the next time that the coin is flipped is still $\\displaystyle\\frac{1}{2}$.
\n", "variables": {"no_flips": {"description": "Number of flips of the coin
", "name": "no_flips", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(6..9)"}}, "statement": "", "variable_groups": [], "parts": [{"correctAnswerFraction": true, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "maxValue": "1/2", "showFeedbackIcon": true, "prompt": "An unbiased coin is flipped $\\var{no_flips}$ times. Given that the coin landed on heads each time, what is the probability of the coin landing on heads the next time it is flipped?
", "correctAnswerStyle": "plain", "allowFractions": true, "mustBeReduced": false, "minValue": "1/2", "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "ungrouped_variables": ["no_flips"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Previous throws don't affect the probability distribution of subsequent throws. Believing otherwise is the gambler's fallacy.
"}, "preamble": {"css": "", "js": ""}, "functions": {}}, {"name": "Calculating Expected Values given a table of probabilities", "extensions": [], "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": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "type": "question", "tags": ["Dice", "dice", "Expected values", "Expected Values", "Experimental Probability", "experimental probability", "Experimental probability", "Probability", "probability", "relative frequency", "Relative Frequency", "taxonomy", "Theoretical Probability", "theoretical probability"], "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"SW": {"templateType": "anything", "name": "SW", "description": "Probability someone goes to see Star Wars
", "definition": "random(0.4..0.51 #0.05)", "group": "Ungrouped variables"}, "Avatar": {"templateType": "anything", "name": "Avatar", "description": "Probability someone sees Avatar
", "definition": "random(0.2..0.31 #0.05)", "group": "Ungrouped variables"}, "NYSM": {"templateType": "anything", "name": "NYSM", "description": "Probability someone goes to see Now you see me
", "definition": "(1-(Avatar+SW))*3/5", "group": "Ungrouped variables"}, "TIJ": {"templateType": "anything", "name": "TIJ", "description": "Probability someone goes to see the Italian Job
", "definition": "1-(Avatar+SW+NYSM)", "group": "Ungrouped variables"}, "no_people": {"templateType": "anything", "name": "no_people", "description": "Number of people who see a movie.
", "definition": "random(100..180 #20)", "group": "Ungrouped variables"}}, "functions": {}, "statement": "There are four films being shown in a cinema on a particular day.
\nThe probability that a person buys a ticket to see each film, denoted $P(\\text{Film})$, is given in the table below.
\nFilm | \n$P(\\text{Film})$ | \nGenre | \n
Forgotten Game | \n$\\var{Avatar}$ | \nSci-Fi | \n
The Diamond Valley | \n$\\var{SW}$ | \nSci-Fi | \n
School of Return | \n$\\var{NYSM}$ | \nThriller | \n
The Silk's Nobody | \n$\\var{TIJ}$ | \nCrime | \n
$\\var{no_people}$ people each buy a ticket at the cinema to see a film of their own choosing during the day.
", "variable_groups": [], "parts": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "{no_people}*{Avatar}", "showFeedbackIcon": true, "prompt": "How many of these people would you expect to have bought tickets to see Forgotten Game?
", "minValue": "{no_people}*{Avatar}", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "{no_people}*({Avatar}+{SW})", "showFeedbackIcon": true, "prompt": "How many of these people would you expect to have bought tickets to see a Sci-Fi film?
", "minValue": "{no_people}*({Avatar}+{SW})", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "ungrouped_variables": ["Avatar", "SW", "NYSM", "TIJ", "no_people"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "This question assesses the students ability to find the expected number of times an event occurs given the probability of the event occurring for a single trial and the total number of trials.
"}, "preamble": {"css": "", "js": ""}, "advice": "If we are given the probability of an event occurring in a single trial then we can calculate the expected number of times that this event would occur in a larger number of trials.
\nTo do this, we multiply the probability of the event occurring in a single trial by the total number of trials:
\n\\[\\text{Expected number of times an event occurs} = \\text{Probability of event} \\times \\text{Number of trials}.\\]
\nWe are given the probabilities that someone buys a ticket to see each film in the table below.
\nFilm | \n$P(\\text{Film})$ | \nGenre | \n
Forgotten Game | \n$\\var{Avatar}$ | \nSci-Fi | \n
The Diamond Valley | \n$\\var{SW}$ | \nSci-Fi | \n
School of Return | \n$\\var{NYSM}$ | \nThriller | \n
The Silk's Nobody | \n$\\var{TIJ}$ | \nCrime | \n
We are also told that $\\var{no_people}$ people each buy a ticket at the cinema to see a film of their own choosing during this day.
\nTo calculate the expected number of people who bought tickets to see one of these films we multiply the probability that a person buys a ticket for that film by how many people bought tickets for a film at the cinema.
\nSo the expected number of people who bought tickets to see Forgotten Game is
\n\\[
\\var{Avatar} \\times \\var{no_people} = \\var{{Avatar}*{no_people}}.
\\]
We are now asked to calculate the expected number of people who bought tickets to see a Sci-Fi film.
\nFrom the table above we can see that there are two films which belong to the Sci-Fi genre: Forgotten Game and The Diamond Valley.
\nFirstly, we need to calculate the probability that a person buys a ticket to see a Sci-Fi film, which we will denote $P(\\text{Sci-Fi})$.
\nSince the probability that a person buys a ticket to see each film is different, it would be incorrect to say that the probability that a person buys a ticket to see a Sci-Fi film is
\n\\[\\displaystyle\\frac{2}{4} = \\displaystyle\\frac{1}{2}.\\]
\nInstead we must recognise that the probability that a person buys a ticket to see a Sci-Fi film is the probability that a person buys a ticket to see either Forgotten or The Diamond Valley.
\nTherefore to calculate this probability, we add the probabilities of a person buying a ticket to see each of these films:
\n\\[
\\begin{align}
P(\\text{Sci-Fi}) &= P(\\text{Forgotten Game})+P(\\text{The Diamond Valley})\\\\
&= \\var{Avatar}+\\var{SW}\\\\
&= \\var{Avatar+SW}.
\\end{align}
\\]
Then the expected number of people who bought tickets to see a Sci-Fi film is
\n\\[
\\var{Avatar+SW} \\times \\var{no_people} = \\var{({Avatar+SW})*{no_people}}.
\\]
This question assesses
\nThe question also helps to show students how using experimental probability and theoretical probability results in different expected values of an outcome.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "{pname} rolls an unbiased six-sided die $\\var{no_rolls}$ times.
", "advice": "Firstly, we must calculate the theoretical probability of rolling either a $\\var{num1}$ or a $\\var{num2}$.
\nBoth $\\var{num1}$ and $\\var{num2}$ only appear once on an unbiased six-sided die, so there are only $2$ possible outcomes where we roll either a $\\var{num1}$ or a $\\var{num2}$.
\nThere are $6$ possible outcomes when we roll an unbiased six-sided die.
\nTherefore, the theoretical probability of rolling either a $\\var{num1}$ or a $\\var{num2}$ is
\n\\[\\displaystyle\\frac{2}{6} = \\displaystyle\\frac{1}{3}.\\]
\nThen the expected number of times that {pname} rolls either a $\\var{num1}$ or a $\\var{num2}$ is
\n\\[\\var{no_rolls} \\times \\displaystyle\\frac{1}{3} = \\var{{no_rolls}/3}.\\]
\nWe are told that in {pronouns['their']} experiment, {pname} obtained either a $\\var{num1}$ or a $\\var{num2}$ on $\\var{Obtained}$ occasions.
\nRecall the formula for the relative frequency of an outcome.
\n\\[ \\text{Relative Frequency} = \\displaystyle\\frac{\\text{Frequency of an outcome}}{\\text{Number of trials}}.\\]
\nThe Number of trials in the experiment is $\\var{no_rolls}$ and the frequency of the desired outcome is $\\var{Obtained}$.
\nSo the relative frequency of rolling either a $\\var{num1}$ or a $\\var{num2}$ is $\\displaystyle\\frac{\\var{Obtained}}{\\var{no_rolls}}$.
\nThe same die is now thrown $\\var{more_rolls}$ times.
\nWe know from b) that the relative frequency of rolling either a $\\var{num1}$ or a $\\var{num2}$ with this die was $\\displaystyle\\simplify{{Obtained}/{no_rolls}}$.
\nTherefore using the experimental data, the number of times we would expect {pname} to roll either a $\\var{num1}$ or a $\\var{num2}$ in $\\var{more_rolls}$ throws of the die is
\n\\[\\var{more_rolls} \\times \\displaystyle\\simplify{{Obtained}/{no_rolls}} = \\var{{more_rolls}*{Obtained}/{no_rolls}}.\\]
\nOn the other hand, we know from a) that the theoretical probability of rolling either a $\\var{num1}$ or a $\\var{num2}$ with this die is $\\displaystyle\\frac{1}{3}$.
\nUsing the theoretical probability, the number of times we would expect {pname} to roll either a $\\var{num1}$ or a $\\var{num2}$ in $\\var{more_rolls}$ throws of the die is
\n\\[\\var{more_rolls} \\times \\displaystyle\\frac{1}{3} = \\var{{more_rolls}/3}.\\]
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"num2": {"name": "num2", "group": "Ungrouped variables", "definition": "random(4,5,6)", "description": "Second number.
", "templateType": "anything", "can_override": false}, "pronouns": {"name": "pronouns", "group": "Ungrouped variables", "definition": "person['pronouns']", "description": "", "templateType": "anything", "can_override": false}, "Obtained": {"name": "Obtained", "group": "Ungrouped variables", "definition": "(no_rolls*multiplier)/10", "description": "Number of times the event is obtained in the experiment.
", "templateType": "anything", "can_override": false}, "pname": {"name": "pname", "group": "Ungrouped variables", "definition": "person['name']", "description": "", "templateType": "anything", "can_override": false}, "no_rolls": {"name": "no_rolls", "group": "Ungrouped variables", "definition": "random(210..390 #30)", "description": "Number of rolls of the die.
", "templateType": "anything", "can_override": false}, "verbs": {"name": "verbs", "group": "Ungrouped variables", "definition": "if(person['gender']='neutral','','s')", "description": "", "templateType": "anything", "can_override": false}, "multiplier": {"name": "multiplier", "group": "Ungrouped variables", "definition": "random(5,6,7)", "description": "multiplier for the value of Obtained variable
", "templateType": "anything", "can_override": false}, "num1": {"name": "num1", "group": "Ungrouped variables", "definition": "random(1,2,3)", "description": "First number.
", "templateType": "anything", "can_override": false}, "person": {"name": "person", "group": "Ungrouped variables", "definition": "random_person()", "description": "", "templateType": "anything", "can_override": false}, "more_rolls": {"name": "more_rolls", "group": "Ungrouped variables", "definition": "random(600..780 #30)", "description": "Number of extra rolls of the die
", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["no_rolls", "num1", "num2", "Obtained", "more_rolls", "multiplier", "person", "pronouns", "pname", "verbs"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": "fraction {\n display: inline-block;\n vertical-align: middle;\n}\nfraction > numerator, fraction > denominator {\n float: left;\n width: 100%;\n text-align: center;\n line-height: 2.5em;\n}\nfraction > numerator {\n border-bottom: 1px solid;\n padding-bottom: 5px;\n}\nfraction > denominator {\n padding-top: 5px;\n}\nfraction input {\n line-height: 1em;\n}\n\nfraction .part {\n margin: 0;\n}\n\n.table-responsive, .fractiontable {\n display:inline-block;\n}\n.fractiontable {\n padding: 0; \n border: 0;\n}\n\n.fractiontable .tddenom \n{\n text-align: center;\n}\n\n.fractiontable .tdnum \n{\n border-bottom: 1px solid black; \n text-align: center;\n}\n\n\n.fractiontable tr {\n height: 3em;\n}\n"}, "parts": [{"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, "prompt": "Based on the theoretical probability of rolling a $\\var{num1}$ or a $\\var{num2}$, how many times would you expect {pronouns['them']} to roll either one of these numbers?
", "minValue": "{no_rolls}*1/3", "maxValue": "{no_rolls}*1/3", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "After performing the experiment, {pname} reports that {pronouns['they']} rolled either a $\\var{num1}$ or a $\\var{num2}$ on $\\var{Obtained}$ occasions.
\nCalculate the relative frequency of rolling either a $\\var{num1}$ or a $\\var{num2}$.
\nEnter your answer as a fraction.
\n$\\text{Relative Frequency} =$ [[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": "obtained/no_rolls", "maxValue": "obtained/no_rolls", "correctAnswerFraction": true, "allowFractions": true, "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": "If {pname} rolled the same die $\\var{more_rolls}$ more times, how many times could {pronouns['they']} expect to roll either a $\\var{num1}$ or a $\\var{num2}$?
\nBased on the experimental data: [[0]]
\nBased on the theoretical probability: [[1]]
", "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": "{more_rolls}*({Obtained}/{no_rolls})", "maxValue": "{more_rolls}*({Obtained}/{no_rolls})", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": 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": "{more_rolls}/3", "maxValue": "{more_rolls}/3", "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", "type": "question"}, {"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.
\nThe probability that each person wins the game, $\\mathrm{P}(\\text{Person})$, is given in the table.
\nPerson | \n{people[0]['name']} | \n{people[1]['name']} | \n{people[2]['name']} | \n{people[3]['name']} | \n{people[4]['name']} | \n
$\\mathrm{P}(\\text{Person})$ | \n$\\var{probs[0]}$ | \n$\\var{probs[1]}$ | \n\n | $\\var{probs[2]}$ | \n$\\var{probs[3]}$ | \n
All probability situations can be reduced to two possible outcomes: success or failure.
\nWhen we express the outcomes in this way we say that they are complementary.
\nThe sum of the probability of an event and its complement is always $1$.
\nIf $\\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.\\]
\nRearranging this equation gives:
\n\\[\\mathrm{P}(\\bar{\\mathrm{E}}) = 1 - \\mathrm{P}(\\mathrm{E})\\]
\nWe can think of this game as having two possible outcomes: either {pname} wins or {pname} doesn't win.
\nThis means that
\n\\[\\mathrm{P}(\\var{pname}) + \\mathrm{P}(\\text{not } \\var{pname}) = 1 \\text{.}\\]
\n\nIf {pname} doesn't win the game then that means that one of the other four players must win the game.
\nSo the probability of {pname} not winning the game is the same as the probability of any of the other four players winning the game.
\nTherefore
\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}
Rearranging the equation above gives
\n\\[\\mathrm{P}(\\var{pname}) = 1 - \\mathrm{P}(\\text{not } \\var{pname}).\\]
\nWe know from a) that $\\mathrm{P}(\\text{not } \\var{pname}) = \\var{sum(probs)}$.
\nTherefore
\n\\begin{align}
\\mathrm{P}(\\var{pname}) &= 1 - \\mathrm{P}(\\text{not } \\var{pname})\\\\
&= 1 - \\var{sum(probs)}\\\\
&= \\var{1-sum(probs)}.
\\end{align}
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", "type": "question"}, {"name": "Probability of scoring at basketball given probability of not scoring", "extensions": [], "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/"}], "variable_groups": [], "preamble": {"js": "", "css": ""}, "type": "question", "parts": [{"correctAnswerFraction": true, "mustBeReduced": false, "type": "numberentry", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "allowFractions": true, "scripts": {}, "minValue": "1-1/{Hoop}", "maxValue": "1-1/{Hoop}", "marks": 1, "variableReplacements": [], "prompt": "What is the probability that the ball goes through the hoop?
\nInput your answer as a fraction.
"}], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Given the probability that a basketball shot misses the hoop, find the probability that it's on target - use the law of total probability.
"}, "tags": ["taxonomy"], "variables": {"Hoop": {"templateType": "anything", "description": "Denominator of the fraction for the probability that the ball misses the hoop.
", "definition": "random(5..9)", "name": "Hoop", "group": "Ungrouped variables"}}, "rulesets": {}, "functions": {}, "ungrouped_variables": ["Hoop"], "statement": "You are playing a game of basketball against your friend. You have the ball but your friend is blocking you from moving forwards so you throw the ball and hope that it goes through the hoop.
\nThe probability that the ball misses the hoop is $\\displaystyle \\frac{1}{\\var{Hoop}}$.
", "advice": "All probability situations can be reduced to two possible outcomes: success or failure.
\nWhen we express the outcomes in this way we say that they are complementary.
\nThe sum of the probability of an event and its complement is always $1$.
\nIf $\\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.\\]
\nRearranging this equation gives:
\n\\[\\mathrm{P}(\\bar{\\mathrm{E}}) = 1 - \\mathrm{P}(\\mathrm{E})\\]
\nWhen we throw the ball we can say that there are two possible outcomes: either the ball goes through the hoop or the ball does not go through the hoop (the ball misses the hoop).
\nLet $\\mathrm{H}$ be the event that the ball goes through the hoop. Then
\n\\[\\mathrm{P}(\\mathrm{H}) + \\mathrm{P}(\\bar{\\mathrm{H}}) = 1.\\]
\nBut we are given that $\\mathrm{P}(\\bar{\\mathrm{H}}) = \\displaystyle\\frac{1}{\\var{Hoop}}$.
\nRearranging the above equation to obtain $\\mathrm{P}(\\mathrm{H})$.
\n\\begin{align}
\\mathrm{P}(\\mathrm{H}) &= 1 - \\mathrm{P}(\\bar{\\mathrm{H}}) \\\\[0.5em]
&= 1 - \\displaystyle\\frac{1}{\\var{Hoop}}\\\\[0.5em]
&= \\simplify[fractionNumbers]{{1-1/{Hoop}}}.
\\end{align}
Mutually exclusive events are events that cannot happen at the same time.
\n\nWhen you roll a die, it is only possible for the die to land on one number. Therefore it is impossible to roll both a $\\var{even}$ and an odd number, which means that these events are mutually exclusive.
\nIt is possible to walk while scratching your head, so these events are not mutually exclusive.
\nIt is impossible to obtain both a heads and a tails when you flip a coin, so these events are mutually exclusive.
\nIn a standard deck of cards, there is a card which is both an Ace and a Spade, the Ace of Spades.
\n\nTherefore it is possible to randomly select a card from such a deck which is both an Ace and a Spade, which means that these events are not mutually exclusive.
", "statement": "", "variables": {"even": {"group": "Ungrouped variables", "name": "even", "description": "", "templateType": "anything", "definition": "random(2,4,6)"}}, "tags": ["Multiple Choice", "multiple choice", "Multiple choice", "Mutually exclusive events", "Probability", "probability", "taxonomy"], "ungrouped_variables": ["even"], "functions": {}, "preamble": {"js": "", "css": ""}, "type": "question", "variable_groups": [], "parts": [{"variableReplacements": [], "maxMarks": "2", "shuffleChoices": false, "distractors": ["", "", "", ""], "variableReplacementStrategy": "originalfirst", "displayType": "checkbox", "warningType": "prevent", "choices": ["Rolling a $\\var{even}$ on a die, and rolling an odd number.
", "Picking an Ace at random from a deck of cards, and picking a Spade.
", "Walking, and scratching your head.
", "Flipping a coin and getting heads, and flipping a coin and getting tails.
"], "scripts": {}, "displayColumns": "1", "showCorrectAnswer": true, "type": "m_n_2", "maxAnswers": "4", "minAnswers": "1", "marks": 0, "prompt": "Which of the following are mutually exclusive events?
", "matrix": ["1", "-1", "-1", "1"], "showFeedbackIcon": true, "minMarks": "0"}], "variablesTest": {"condition": "", "maxRuns": 100}, "metadata": {"description": "Given descriptions of some pairs of random events, pick the ones which are mutually exclusive.
", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {}}, {"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": "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, so we can present the information given to us in the question in the form of a Venn diagram.
\n\n\nThe number of people who have cereal or toast for breakfast is:
\nHowever, this counts the people who have cereal as well as toast twice!
\nTo correct our answer, we subtract the extra \"and\" part:
\n\nAs 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:
\nUsing 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}
\\]
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.
\nThis 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.
\nA story in the newspaper displayed the results of the survey in this table:
\nFood | \nCereal | \nToast | \nFruit | \nFry-up | \nOther | \n
---|---|---|---|---|---|
% of participants | \n{proportions[0]} | \n{proportions[1]} | \n{proportions[2]} | \n{proportions[3]} | \n{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}}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "extensions": ["random_person"], "custom_part_types": [], "resources": [["question-resources/dice.svg", "/srv/numbas/media/question-resources/dice.svg"], ["question-resources/aceOfSpades.svg", "/srv/numbas/media/question-resources/aceOfSpades.svg"], ["question-resources/aceOfSpades_NnxOXmM.svg", "/srv/numbas/media/question-resources/aceOfSpades_NnxOXmM.svg"], ["question-resources/breakfastven2.svg", "/srv/numbas/media/question-resources/breakfastven2.svg"], ["question-resources/breakfastvenplus2.svg", "/srv/numbas/media/question-resources/breakfastvenplus2.svg"]]}