// Numbas version: exam_results_page_options {"name": "Probability - draw without replacement", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.0001", "description": "", "name": "tol"}, "is": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(m=1,'is','are')", "description": "", "name": "is"}, "colour2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random('white','yellow','blue')", "description": "", "name": "colour2"}, "prob1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(prob,4)", "description": "", "name": "prob1"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..100)", "description": "", "name": "t"}, "k": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..8)", "description": "", "name": "k"}, "nochoices": {"templateType": "anything", "group": "Ungrouped variables", "definition": "comb(n,k)*comb(g-n,m-k)", "description": "", "name": "nochoices"}, "prob0": {"templateType": "anything", "group": "Ungrouped variables", "definition": "comb(g-n,m)/possiblechoices", "description": "", "name": "prob0"}, "atleastone": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(1-prob0,4)", "description": "", "name": "atleastone"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "g-k", "description": "", "name": "n"}, "returned": {"templateType": "anything", "group": "Ungrouped variables", "definition": "''", "description": "", "name": "returned"}, "possiblechoices": {"templateType": "anything", "group": "Ungrouped variables", "definition": "comb(g,m)", "description": "", "name": "possiblechoices"}, "colour1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random('black','red','green')", "description": "", "name": "colour1"}, "things": {"templateType": "anything", "group": "Ungrouped variables", "definition": "'balls'", "description": "", "name": "things"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "name": "m"}, "special": {"templateType": "anything", "group": "Ungrouped variables", "definition": "'coloured '+ colour1", "description": "", "name": "special"}, "caught1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "''", "description": "", "name": "caught1"}, "caught2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "'drawn'", "description": "", "name": "caught2"}, "later": {"templateType": "anything", "group": "Ungrouped variables", "definition": "'Next'", "description": "", "name": "later"}, "prob": {"templateType": "anything", "group": "Ungrouped variables", "definition": "nochoices/possiblechoices", "description": "", "name": "prob"}, "g": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(10..15)", "description": "", "name": "g"}, "indef": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(container='urn', 'n','')", "description": "", "name": "indef"}, "marked": {"templateType": "anything", "group": "Ungrouped variables", "definition": "'coloured '+ colour1+ ' the rest '+ colour2", "description": "", "name": "marked"}, "then": {"templateType": "anything", "group": "Ungrouped variables", "definition": "''", "description": "", "name": "then"}, "container": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random('urn','box','container')", "description": "", "name": "container"}}, "ungrouped_variables": ["is", "marked", "special", "atleastone", "container", "things", "caught2", "caught1", "tol", "prob", "indef", "then", "returned", "nochoices", "prob0", "prob1", "possiblechoices", "g", "k", "later", "m", "n", "colour2", "colour1", "t"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "name": "Probability - draw without replacement", "showQuestionGroupNames": false, "functions": {}, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "correctAnswerFraction": false, "minValue": "{atleastone-tol}", "maxValue": "{atleastone+tol}", "marks": 2}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "\n
A{indef} {container} contains $\\var{g}$ {things}. {Then} $\\var{n}$ of these are {caught1} {marked} {returned}.
\n{Later} $\\var{m}$ {things} {is} {caught2} without replacement.
\nWhat is the probability that at least one of the $\\var{m}$ is {special}?
\nInput your answer to $4$ decimal places.
\nProbability = [[0]]?
\n ", "marks": 0}], "statement": "\n \n \nAnswer the following question.
\n \n \n ", "tags": ["MAS1604", "Probability", "checked2015", "combinations", "cr1", "elementary probability", "number of selections", "sample space", "selection without replacement", "statistics", "tested1", "urn model", "without replacement"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "7/07/2012:
\nAdded tags.
\nIncluded more detail in Advice by showing number of combinations explicitly.
\nAnswer tolerance set as new variable tol=0.0001. Perhaps 3 dps and tol=0?
\nChecked calculation. OK.
\n22/07/2012:
\nAdded description.
\nChecked stats extension box.
\n31/07/2012:
\nQuestion appears to be working correctly.
\n20/12/2012:
\nChecked calculation again, OK. Added tested1 tag.
\nNote that there is scope for setting questions with different wording to that of urn models.
\n21/12/2012:
\nChecked rounding, OK. Added tag cr1.
", "licence": "Creative Commons Attribution 4.0 International", "description": "\n \t\tA box contains $n$ balls, $m$ of these are red the rest white.
\n \t\t$r$ are drawn without replacement.
\n \t\tWhat is the probability that at least one of the $r$ is red?
\n \t\t"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\nThe probability that at least one of the {things} is {special} is the same as 1 – probability that none of them are {special}.
\nThe number of selections without {things} {special} is
\n\\[ {\\var{g-n} \\choose \\var{m}}=\\var{comb(g-n,m)}\\] as all have to be selected from the $\\var{g-n}$ which are {colour2}.
\nThere are $\\displaystyle {\\var{g} \\choose \\var{m}}=\\var{comb(g,m)}$ ways of drawing $\\var{m}$ {things} from the $\\var{g}$.
\nHence the probability that none them are {special} is:
\n\\[ \\frac{{\\var{g-n} \\choose \\var{m}}}{{\\var{g} \\choose \\var{m}}}=\\frac{\\var{comb(g-n,m)}}{\\var{possiblechoices}}\\]
\nSo the probability we want is
\n\\[1- \\frac{\\var{comb(g-n,m)}}{\\var{possiblechoices}} = \\var{atleastone}\\] to 4 decimal places.
\n ", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}