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

Calculate P(A u B) given P(A), P(B) and intersection.

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

Given that 

\\[ P(\\var{LIST[1]}) = \\var{pa} \\\\
 P(\\var{LIST[2]}) = \\var{pb} \\\\
P(\\var{LIST[1]} \\cap \\var{LIST[2]}) = \\var{inter} \\]


", "advice": "

We need to use the general form of the Addition Law of Probability.  This law always holds, regardless of whether the variables are independent or mutually exclusive.

The law is:

\\[P(A \\cup B) = P(A) + P(B) - P(A \\cap B)\\]

Substituting in the values we are given:

\\[ \\begin{split}
P(\\var{LIST[1]} \\cup \\var{LIST[2]}) &\\,= \\var{pa} + \\var{pb} - \\var{inter} \\\\ &\\,= \\var{union}
\\end{split} \\]

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"pa": {"name": "pa", "group": "Ungrouped variables", "definition": "random(0.1..0.9#0.01)", "description": "", "templateType": "anything", "can_override": false}, "pb": {"name": "pb", "group": "Ungrouped variables", "definition": "random(0.1..0.9#0.01)", "description": "", "templateType": "anything", "can_override": false}, "inter": {"name": "inter", "group": "Ungrouped variables", "definition": "random(0.1..(min(pa,pb)-0.01)#0.01)", "description": "", "templateType": "anything", "can_override": false}, "union": {"name": "union", "group": "Ungrouped variables", "definition": "pa+pb-inter", "description": "", "templateType": "anything", "can_override": false}, "LIST": {"name": "LIST", "group": "Ungrouped variables", "definition": "shuffle(['$A$','$B$', '$C$', '$D$', '$E$', '$F$', '$G$', '$H$'])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "union < 1", "maxRuns": 100}, "ungrouped_variables": ["pa", "pb", "inter", "union", "LIST"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "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": "

Calculate $P(\\var{LIST[1]} \\cup \\var{LIST[2]})$

", "minValue": "union", "maxValue": "union", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "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/"}]}