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

Calculate P(A|B) given a Venn diagram.

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

{geogebra_applet('https://www.geogebra.org/m/rudd6jns',[a:{neither}, b:{A}, c:{both},d:{B}])}

", "advice": "

{geogebra_applet('https://www.geogebra.org/m/rudd6jns',[a:{neither}, b:{A}, c:{both},d:{B}])}

$P(A \\vert B)$ can be read as \"the probability of $A$ given $B$\", or \"if we know $B$ is true, what is the probability of $A$?\".

\n

We can use the formula, or the Venn diagram; the Venn diagram clarifies the standard formula:

\n

$P(A \\vert B) = \\frac{P(A \\cap B)}{P(B)}$

\n

since we know $B$ is true, we restrict ourselves to the domain of $B$, and then look for where $A$ is true, which now is only the intersection, $A \\cap B$.

\n

$P(A \\vert B) = \\frac{P(A \\cap B)}{P(B)} = \\frac{\\var{both}}{\\var{B}} = \\var{precround(both/B,2)}$.

", "rulesets": {}, "extensions": ["geogebra"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"A": {"name": "A", "group": "Ungrouped variables", "definition": "random(0.01 .. 0.99#0.01)", "description": "", "templateType": "randrange", "can_override": false}, "B": {"name": "B", "group": "Ungrouped variables", "definition": "random(0.01 .. 0.99#0.01)", "description": "", "templateType": "randrange", "can_override": false}, "justA": {"name": "justA", "group": "Ungrouped variables", "definition": "A-both", "description": "", "templateType": "anything", "can_override": false}, "justB": {"name": "justB", "group": "Ungrouped variables", "definition": "B-both", "description": "", "templateType": "anything", "can_override": false}, "both": {"name": "both", "group": "Ungrouped variables", "definition": "A+B-AuB", "description": "", "templateType": "anything", "can_override": false}, "AuB": {"name": "AuB", "group": "Ungrouped variables", "definition": "1-neither", "description": "", "templateType": "anything", "can_override": false}, "neither": {"name": "neither", "group": "Ungrouped variables", "definition": "1-random(max(A,B)..1 #0.01)", "description": "", "templateType": "anything", "can_override": false}, "sol": {"name": "sol", "group": "Ungrouped variables", "definition": "both/B", "description": "", "templateType": "anything", "can_override": false}, "sol2": {"name": "sol2", "group": "Ungrouped variables", "definition": "precround(sol,2)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "both>0", "maxRuns": 100}, "ungrouped_variables": ["A", "B", "justA", "justB", "both", "AuB", "neither", "sol", "sol2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "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(A|B)$  (Give your answer to 2 decimal places where necessary)

", "answer": "{sol2}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "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/"}]}