// Numbas version: exam_results_page_options {"name": "Conditional probability from frequency table v2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "name": "Conditional probability from frequency table v2", "metadata": {"description": "

Asks students to compute conditional probabilities based on a frequency table.

", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"showCorrectAnswer": true, "answer": "{values[ar][ac]}/({values[0][ac]}+{values[1][ac]}+{values[2][ac]})", "showpreview": true, "marks": "6", "scripts": {}, "vsetrange": [0, 1], "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "showFeedbackIcon": true, "checkingaccuracy": 0.001, "type": "jme", "checkingtype": "absdiff", "checkvariablenames": false, "prompt": "

Calculate the probability that a randomly selected person likes {rows[ar]} given they like the {cols[ac]}. Enter your answer as a fraction.

", "vsetrangepoints": 5, "variableReplacements": []}, {"showCorrectAnswer": true, "answer": "{values[br][bc]}/({values[br][0]}+{values[br][1]}+{values[br][2]})", "showpreview": true, "marks": "6", "scripts": {}, "vsetrange": [0, 1], "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "showFeedbackIcon": true, "checkingaccuracy": 0.001, "type": "jme", "checkingtype": "absdiff", "checkvariablenames": false, "prompt": "

Calculate the probability that a randomly selected person likes the {cols[bc]} given they like {rows[br]}. Enter your answer as a fraction.

", "vsetrangepoints": 5, "variableReplacements": []}], "rulesets": {}, "statement": "

200 people were asked about their favourite Western Canadian ice hockey teams and their favourite 15th century explorer. The following table shows the results.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
CanucksFlamesOilers
Magellan{a1}{a2}{a3}
Columbus{a4}{b1}{b2}
da Gama{a5}{b3}{b4}
", "functions": {}, "advice": "", "variablesTest": {"maxRuns": 100, "condition": ""}, "tags": [], "ungrouped_variables": ["a1", "a2", "a3", "a4", "a5", "b1", "b2", "b3", "b4", "values", "rows", "cols", "ar", "ac", "br", "bc"], "extensions": [], "preamble": {"css": "", "js": ""}, "variables": {"values": {"description": "", "definition": "matrix([a1,a2,a3],[a4,b1,b2],[a5,b3,b4])", "group": "Ungrouped variables", "templateType": "anything", "name": "values"}, "ac": {"description": "", "definition": "random(0..2)", "group": "Ungrouped variables", "templateType": "anything", "name": "ac"}, "br": {"description": "", "definition": "random(0..2 except ar)", "group": "Ungrouped variables", "templateType": "anything", "name": "br"}, "bc": {"description": "", "definition": "random(0..2 except ac)", "group": "Ungrouped variables", "templateType": "anything", "name": "bc"}, "a3": {"description": "", "definition": "random(1..20)", "group": "Ungrouped variables", "templateType": "anything", "name": "a3"}, "b3": {"description": "", "definition": "random(1..30)", "group": "Ungrouped variables", "templateType": "anything", "name": "b3"}, "cols": {"description": "", "definition": "[\"Canucks\", \"Flames\", \"Oilers\"]", "group": "Ungrouped variables", "templateType": "anything", "name": "cols"}, "a1": {"description": "", "definition": "random(1..20)", "group": "Ungrouped variables", "templateType": "anything", "name": "a1"}, "b4": {"description": "", "definition": "100-(b1+b2+b3)", "group": "Ungrouped variables", "templateType": "anything", "name": "b4"}, "ar": {"description": "", "definition": "random(0..2)", "group": "Ungrouped variables", "templateType": "anything", "name": "ar"}, "a2": {"description": "", "definition": "random(1..20)", "group": "Ungrouped variables", "templateType": "anything", "name": "a2"}, "a4": {"description": "", "definition": "random(1..20)", "group": "Ungrouped variables", "templateType": "anything", "name": "a4"}, "b2": {"description": "", "definition": "random(1..30)", "group": "Ungrouped variables", "templateType": "anything", "name": "b2"}, "b1": {"description": "", "definition": "random(1..30)", "group": "Ungrouped variables", "templateType": "anything", "name": "b1"}, "rows": {"description": "", "definition": "[\"Magellan\", \"Columbus\", \"da Gama\"]", "group": "Ungrouped variables", "templateType": "anything", "name": "rows"}, "a5": {"description": "", "definition": "100-(a1+a2+a3+a4)", "group": "Ungrouped variables", "templateType": "anything", "name": "a5"}}, "type": "question", "contributors": [{"name": "Peter Chapman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/210/"}]}]}], "contributors": [{"name": "Peter Chapman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/210/"}]}