// Numbas version: exam_results_page_options {"name": "Conditional probability from frequency table", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a1", "a2", "a3", "a4", "a5", "b1", "b2", "b3", "b4", "values", "rows", "cols", "ar", "ac", "br", "bc"], "name": "Conditional probability from frequency table", "tags": [], "advice": "", "rulesets": {}, "parts": [{"variableReplacements": [], "prompt": "

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

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

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

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

200 people were asked about their favourite kind of milk and their favourite sports. 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
FootballSwimmingGolf
Full fat{a1}{a2}{a3}
Semi-skimmed{a4}{b1}{b2}
Skimmed{a5}{b3}{b4}
\n

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"b4": {"definition": "100-(b1+b2+b3)", "templateType": "anything", "group": "Ungrouped variables", "name": "b4", "description": ""}, "ac": {"definition": "random(0..2)", "templateType": "anything", "group": "Ungrouped variables", "name": "ac", "description": ""}, "rows": {"definition": "[\"Full fat\", \"Semi-skimmed\", \"Skimmed\"]", "templateType": "anything", "group": "Ungrouped variables", "name": "rows", "description": ""}, "br": {"definition": "random(0..2 except ar)", "templateType": "anything", "group": "Ungrouped variables", "name": "br", "description": ""}, "bc": {"definition": "random(0..2 except ac)", "templateType": "anything", "group": "Ungrouped variables", "name": "bc", "description": ""}, "cols": {"definition": "[\"Football\", \"Swimming\", \"Golf\"]", "templateType": "anything", "group": "Ungrouped variables", "name": "cols", "description": ""}, "a1": {"definition": "random(1..20)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "a3": {"definition": "random(1..20)", "templateType": "anything", "group": "Ungrouped variables", "name": "a3", "description": ""}, "a2": {"definition": "random(1..20)", "templateType": "anything", "group": "Ungrouped variables", "name": "a2", "description": ""}, "a5": {"definition": "100-(a1+a2+a3+a4)", "templateType": "anything", "group": "Ungrouped variables", "name": "a5", "description": ""}, "a4": {"definition": "random(1..20)", "templateType": "anything", "group": "Ungrouped variables", "name": "a4", "description": ""}, "b2": {"definition": "random(1..30)", "templateType": "anything", "group": "Ungrouped variables", "name": "b2", "description": ""}, "b3": {"definition": "random(1..30)", "templateType": "anything", "group": "Ungrouped variables", "name": "b3", "description": ""}, "values": {"definition": "matrix([a1,a2,a3],[a4,b1,b2],[a5,b3,b4])", "templateType": "anything", "group": "Ungrouped variables", "name": "values", "description": ""}, "ar": {"definition": "random(0..2)", "templateType": "anything", "group": "Ungrouped variables", "name": "ar", "description": ""}, "b1": {"definition": "random(1..30)", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "description": ""}}, "metadata": {"notes": "", "description": "

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

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "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/"}]}