// Numbas version: finer_feedback_settings {"name": "SP03 Calculating probability from a Contingency Table", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "SP03 Calculating probability from a Contingency Table", "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Complete the two way table.

", "advice": "\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\n\n\n
FootballRugbyTennisTotal
Year 7$\\var{f7}$$\\var{r7}$$\\var{total7}-(\\var{f7}+\\var{r7}) = \\var{total7}-\\var{f7+r7} = \\var{t7}$$\\var{total7}$
Year 8$\\var{totalf}-\\var{f7} = \\var{f8}$$\\var{r8}$$\\var{t8}$$\\var{total}-\\var{total7} = \\var{total8}$
Total$\\var{totalf}$$\\var{r7}+\\var{r8}=\\var{totalr}$$\\var{t7}+\\var{t8}=\\var{totalt}$$\\var{total}$
\n

\n

Use this link to find some resources which will help you revise this topic.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"f7": {"name": "f7", "group": "Ungrouped variables", "definition": "random(5 .. 20#1)", "description": "

number of year 7's playing football

", "templateType": "randrange", "can_override": false}, "r7": {"name": "r7", "group": "Ungrouped variables", "definition": "random(5 .. 20#1)", "description": "

Number of year 7's playing rugby 

", "templateType": "randrange", "can_override": false}, "t7": {"name": "t7", "group": "Ungrouped variables", "definition": "random(5 .. 20#1)", "description": "

Number of year 7's playing tennis

", "templateType": "randrange", "can_override": false}, "Total7": {"name": "Total7", "group": "Ungrouped variables", "definition": "f7+r7+t7", "description": "", "templateType": "anything", "can_override": false}, "f8": {"name": "f8", "group": "Ungrouped variables", "definition": "random(5 .. 20#1)", "description": "

Number of year 8's play8ng football

", "templateType": "randrange", "can_override": false}, "r8": {"name": "r8", "group": "Ungrouped variables", "definition": "random(5 .. 20#1)", "description": "

Number of year 8's playing rugby 

", "templateType": "randrange", "can_override": false}, "t8": {"name": "t8", "group": "Ungrouped variables", "definition": "random(5 .. 20#1)", "description": "

Number of year 8's playing tennis

", "templateType": "randrange", "can_override": false}, "total8": {"name": "total8", "group": "Ungrouped variables", "definition": "f8+r8+t8", "description": "

Total number of year 8 students 

", "templateType": "anything", "can_override": false}, "totalf": {"name": "totalf", "group": "Ungrouped variables", "definition": "f7+f8", "description": "

Total number of students playing football

", "templateType": "anything", "can_override": false}, "totalr": {"name": "totalr", "group": "Ungrouped variables", "definition": "r7+r8", "description": "

Total number of students playing rugby

", "templateType": "anything", "can_override": false}, "totalt": {"name": "totalt", "group": "Ungrouped variables", "definition": "t7+t8", "description": "

Total number of students playing tennis

", "templateType": "anything", "can_override": false}, "total78": {"name": "total78", "group": "Ungrouped variables", "definition": "total7+total8", "description": "

Total number of students in year 7 and year 8 

", "templateType": "anything", "can_override": false}, "totalfrt": {"name": "totalfrt", "group": "Ungrouped variables", "definition": "totalf+totalr+totalt", "description": "

Total number of students playing a sport

", "templateType": "anything", "can_override": false}, "total": {"name": "total", "group": "Ungrouped variables", "definition": "if(total78=totalfrt,totalfrt,0)", "description": "

Total number of students 

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["f7", "r7", "t7", "Total7", "f8", "r8", "t8", "total8", "totalf", "totalr", "totalt", "total78", "totalfrt", "total"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "\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\n\n\n
FootballRugbyTennisTotal
Year 7{f7}{r7}[[2]]{total7}
Year 8[[0]]{r8}{t8}[[4]]
Total{totalf}[[1]][[3]]{total}
\n

", "gaps": [{"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, "minValue": "f8", "maxValue": "f8", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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, "minValue": "totalr", "maxValue": "totalr", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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, "minValue": "t7", "maxValue": "t7", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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, "minValue": "totalt", "maxValue": "totalt", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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, "minValue": "total8", "maxValue": "total8", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4679/"}, {"name": "Megan Oliver", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/23526/"}], "resources": []}]}], "contributors": [{"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4679/"}, {"name": "Megan Oliver", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/23526/"}]}