// Numbas version: exam_results_page_options {"name": "Lois's copy of Single ball from box", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["m", "n", "colour", "AnswerNum"], "name": "Lois's copy of Single ball from box", "tags": ["probability", "Probability", "probability of single event"], "preamble": {"css": "", "js": ""}, "advice": "

For any event $A$ 

\n

Probability of $A$ = $\\frac{\\text{Number of outcomes for which A happens}} {\\text{Total number of outcomes (sample space)}}$.

\n

\n

Let $A$ represent the outcome that the ball selected is $\\var{colour}$, then $P(A) =\\frac{\\var{answernum}}{\\var{m}+\\var{n}}$.

\n

See https://www.mathsisfun.com/data/probability.html for more information about the topic of probability.

\n

", "rulesets": {}, "parts": [{"prompt": "

What is the probability that the ball is $\\var{colour}$?

\n

Give your answer as a fraction.

\n

[[0]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "variableReplacements": [], "maxValue": "{answernum}/({m}+{n})", "minValue": "{answernum}/({m}+{n})", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": [], "statement": "

A box contains $\\var{m} $ white balls and $\\var{n} $ black balls. A ball is drawn out of the box at random. 

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"colour": {"definition": "random('black', 'white')", "templateType": "anything", "group": "Ungrouped variables", "name": "colour", "description": "

The colour asked for in the question.

"}, "AnswerNum": {"definition": "if(colour = 'white',m,n)", "templateType": "anything", "group": "Ungrouped variables", "name": "AnswerNum", "description": ""}, "m": {"definition": "random(3..7)", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": "

The number of white balls in the box.

"}, "n": {"definition": "random(3..13)", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": "

The number of black balls in the box.

"}}, "metadata": {"description": "

A box contains $m$ white balls and $n$ black balls. A ball is drawn out of the box at random. What is the probability that the ball is black/white?

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}]}], "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}