// Numbas version: finer_feedback_settings {"name": "Calculating expected values using theoretical probability and experimental probability", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Calculating expected values using theoretical probability and experimental probability", "tags": ["dice", "Dice", "Expected Values", "Expected values", "Experimental Probability", "experimental probability", "Experimental probability", "probability", "Probability", "Relative Frequency", "relative frequency", "taxonomy", "Theoretical Probability", "theoretical probability"], "metadata": {"description": "
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": {}, "extensions": ["random_person"], "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", "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/"}]}]}], "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/"}]}