// Numbas version: exam_results_page_options {"name": "probability complement rule", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "probability complement rule", "tags": [], "metadata": {"description": "

Calculate probability using P(A) = 1-P(not A)

", "licence": "None specified"}, "statement": "

Two $\\var{n}$-sided dice, each with sides labelled $1,2...\\var{n}$ are rolled and their scores are added.


", "advice": "

part a)

\n

We are looking for pairs of numbers than total to make $\\var{min[choice]}$ or less, which is quite a small total, so it doesn't take too long to find that the pairs of numbers are:

\n

\\[ \\var{pairstruncate} \\]

\n

so there {isorare} $\\var{pairschoice[choice]+1}$ {event} we are interested in, and therefore the probability is 

\\[ P(\\text{total is} \\leq \\var{min[choice]}) = \\frac{\\var{pairschoice[choice]+1}}{\\var{total}} \\] 

\n

part b)

\n

There are a very large number of ways to totals of $\\var{min[choice]+1}$ or greater, so in this case we use the complement rule;

\\[P(A') = 1-P(A)\\]

\n

which in this case means

\n

\\[P(\\text{total is}\\ge \\var{min[choice]+1}) = 1-P(\\text{total is} \\leq \\var{min[choice]}) = 1-\\frac{\\var{pairschoice[choice]+1}}{\\var{total}} = \\var[fractionnumbers]{1-options[choice]/{total}}\\]

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"min": {"name": "min", "group": "Ungrouped variables", "definition": "list(2..4)", "description": "", "templateType": "anything", "can_override": false}, "options": {"name": "options", "group": "Ungrouped variables", "definition": "[1,3,6]", "description": "", "templateType": "anything", "can_override": false}, "choice": {"name": "choice", "group": "Ungrouped variables", "definition": "random(0..2)", "description": "", "templateType": "anything", "can_override": false}, "total": {"name": "total", "group": "Ungrouped variables", "definition": "n*n", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(5..10)", "description": "", "templateType": "anything", "can_override": false}, "pairs": {"name": "pairs", "group": "Ungrouped variables", "definition": "[[1,1],[1,2],[2,1],[2,2],[1,3],[3,1]]", "description": "", "templateType": "anything", "can_override": false}, "pairschoice": {"name": "pairschoice", "group": "Ungrouped variables", "definition": "[0,2,5]", "description": "", "templateType": "anything", "can_override": false}, "pairstruncate": {"name": "pairstruncate", "group": "Ungrouped variables", "definition": "pairs[0..pairschoice[choice]+1]", "description": "", "templateType": "anything", "can_override": false}, "event": {"name": "event", "group": "Ungrouped variables", "definition": "if(pairschoice[choice]+1=1,'event','events')", "description": "", "templateType": "anything", "can_override": false}, "isorare": {"name": "isorare", "group": "Ungrouped variables", "definition": "if(pairschoice[choice]+1=1,'is','are')", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["min", "options", "choice", "total", "n", "pairs", "pairschoice", "pairstruncate", "event", "isorare"], "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 the probability that the score is less than or equal to $\\var{min[choice]}$?

\n

\n

[[0]] (Give your answer as a fraction)

\n

", "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": "{options[choice]}/{total}", "maxValue": "{options[choice]}/{total}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": "100", "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 the probability that the score is $\\var{min[choice]+1}$ or greater?

Hint: It will probably save you time if you use the complement rule.

\n

\n

[[0]]   (Give your answer as a fraction)

\n

", "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": "1-{options[choice]}/{total}", "maxValue": "1-{options[choice]}/{total}", "correctAnswerFraction": true, "allowFractions": true, "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", "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}]}], "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}