// Numbas version: exam_results_page_options {"name": "Calculate probability of either of two events occurring based on frequency", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["p1", "p3", "p2", "p4", "ptotal", "ans1", "ans2", "ans3"], "name": "Calculate probability of either of two events occurring based on frequency", "tags": ["checked2015", "MAS1403"], "advice": "", "rulesets": {}, "parts": [{"variableReplacements": [], "prompt": "

Calculate the probability that a person selected at random plays Go. Write your answer as a fraction.

", "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{ans1}", "marks": "1.5", "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"variableReplacements": [], "prompt": "

Calculate the probability that a randomly selected person plays Chess or Go. Give your answer as a fraction.

", "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{ans2}", "marks": "3", "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"variableReplacements": [], "prompt": "

Calculate the probability that a randomly selected person plays Chess but not Go.

", "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{ans3}", "marks": "4.5", "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "statement": "

Out of $\\var{ptotal}$ people, $\\var{p1}$ play Go, $\\var{p2}$ play Chess, $\\var{p3}$ play both, and $\\var{p4}$ play neither.

\n

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"p2": {"definition": "random(30..50)", "templateType": "anything", "group": "Ungrouped variables", "name": "p2", "description": ""}, "p3": {"definition": "random(10..25)", "templateType": "anything", "group": "Ungrouped variables", "name": "p3", "description": ""}, "p1": {"definition": "random(40..70)", "templateType": "anything", "group": "Ungrouped variables", "name": "p1", "description": ""}, "p4": {"definition": "random(10..40)", "templateType": "anything", "group": "Ungrouped variables", "name": "p4", "description": ""}, "ptotal": {"definition": "p1+p2-p3+p4", "templateType": "anything", "group": "Ungrouped variables", "name": "ptotal", "description": ""}, "ans1": {"definition": "p1/ptotal", "templateType": "anything", "group": "Ungrouped variables", "name": "ans1", "description": ""}, "ans2": {"definition": "1-(p4/ptotal)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans2", "description": ""}, "ans3": {"definition": "(p2-p3)/ptotal", "templateType": "anything", "group": "Ungrouped variables", "name": "ans3", "description": ""}}, "metadata": {"notes": "

29/12/2012:

\n

Easily adapted to other application examples using the string variables supplied, hence the tag sc included.

\n

Perhaps could include a Show steps for the probability law used?

\n

", "description": "

Example showing how to calculate the probability of A or B using the law $p(A \\;\\textrm{or}\\; B)=p(A)+p(B)-p(A\\;\\textrm{and}\\;B)$. 

\n

Easily adapted to other applications.

", "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/"}]}