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

Calculate probability of selecting coloured counters from a bag.

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

A bag contains:

$\\var{srn}$ small, red tokens, 
$\\var{sbn}$ small, blue tokens, 
$\\var{brn}$ large, red tokens, and 
$\\var{bbn}$ large, blue tokens.

", "advice": "

part a)

\n

A probability is a fraction.  You can give your answer as a fraction, decimal or percentage as these are all equivalent.

The formula for probability is:

\n

\\[ P(A) = \\frac{\\text{number of possibilities for A}}{\\text{number of total possible outcomes}} \\]

\n

For this question the total possible outcomes are $\\var{srn}+\\var{sbn}+\\var{brn}+\\var{bbn} = \\var{total}$.

Therefore

\n

\\[ P(\\text{A large red token}) = \\frac{\\var{brn}}{\\var{total}} = \\var[fractionnumbers]{brn/total}\\]

\n

part b)

\n

For this question we need to know the total number of small tokens, i.e. $\\var{srn}+\\var{sbn} = \\var{srn+sbn}$.

Therefore

\n

\\[ P(\\text{A small token}) = \\frac{\\var{srn+sbn}}{\\var{total}} = \\var[fractionnumbers]{(srn+sbn)/total}\\]

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"srn": {"name": "srn", "group": "Ungrouped variables", "definition": "random(1..20)", "description": "", "templateType": "anything", "can_override": false}, "brn": {"name": "brn", "group": "Ungrouped variables", "definition": "random(1..20)", "description": "", "templateType": "anything", "can_override": false}, "sbn": {"name": "sbn", "group": "Ungrouped variables", "definition": "random(1..20)", "description": "", "templateType": "anything", "can_override": false}, "bbn": {"name": "bbn", "group": "Ungrouped variables", "definition": "random(1..20)", "description": "", "templateType": "anything", "can_override": false}, "total": {"name": "total", "group": "Ungrouped variables", "definition": "brn+bbn+srn+sbn", "description": "", "templateType": "anything", "can_override": false}, "ans1": {"name": "ans1", "group": "Ungrouped variables", "definition": "precround(brn/total,2)", "description": "", "templateType": "anything", "can_override": false}, "ans2": {"name": "ans2", "group": "Ungrouped variables", "definition": "precround((srn+sbn)/total,2)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["srn", "brn", "sbn", "bbn", "total", "ans1", "ans2"], "variable_groups": [{"name": "Unnamed group", "variables": []}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"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, "prompt": "

You take a token at random.

What is the probability that it is a large, red token?

Give your answer as a fraction, or a decimal correct to 2dp.

", "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ans1", "maxValue": "ans1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "{brn}/{total}", "maxValue": "{brn}/{total}", "correctAnswerFraction": true, "allowFractions": true, "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, "prompt": "

You take a token at random.

What is the probability that it is a small token?

Give your answer as a fraction, or a decimal correct to 2dp.

", "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ans2", "maxValue": "ans2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "{{srn}+{sbn}}/{total}", "maxValue": "{{srn}+{sbn}}/{total}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}]}]}], "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}]}