// Numbas version: finer_feedback_settings {"name": "Probability of not choosing any from a subset", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"noguilty": {"templateType": "anything", "group": "Ungrouped variables", "definition": "comb(men-guilty,suspects-guilty)", "description": "", "name": "noguilty"}, "p4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(suspects=3,1,ns-3)", "description": "", "name": "p4"}, "ns": {"templateType": "anything", "group": "Ungrouped variables", "definition": "men-suspects", "description": "", "name": "ns"}, "is": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(guilty=1,'is','are')", "description": "", "name": "is"}, "overallnumber": {"templateType": "anything", "group": "Ungrouped variables", "definition": "comb(men,suspects)", "description": "", "name": "overallnumber"}, "is2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(suspects-guilty=1,'is','are')", "description": "", "name": "is2"}, "t3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(suspects=5,1,0)", "description": "", "name": "t3"}, "nguilty": {"templateType": "anything", "group": "Ungrouped variables", "definition": "comb(men-suspects,suspects)", "description": "", "name": "nguilty"}, "p": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(guilty=1,'man','men')", "description": "", "name": "p"}, "q5": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(suspects<5,1,men-4)", "description": "", "name": "q5"}, "guilty": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(suspects>2,suspects-random(1,2),suspects-1)", "description": "", "name": "guilty"}, "ans3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(nguilty/overallnumber,3)", "description": "", "name": "ans3"}, "suspects": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(3,4,5)", "description": "", "name": "suspects"}, "q6": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(suspects<6,1,men-5)", "description": "", "name": "q6"}, "t2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(suspects=4,1,0)", "description": "", "name": "t2"}, "t4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(suspects=6,1,0)", "description": "", "name": "t4"}, "singpl": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(suspects-guilty=1,'man','men')", "description": "", "name": "singpl"}, "test": {"templateType": "anything", "group": "Ungrouped variables", "definition": "nguilty/overallnumber", "description": "", "name": "test"}, "t1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(suspects=3,1,0)", "description": "", "name": "t1"}, "q4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(suspects=3,1,men-3)", "description": "", "name": "q4"}, "men": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(12..20)", "description": "", "name": "men"}, "p5": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(suspects<5,1,ns-4)", "description": "", "name": "p5"}, "p6": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(suspects<6,1,ns-5)", "description": "", "name": "p6"}}, "ungrouped_variables": ["guilty", "is", "ans3", "suspects", "noguilty", "q5", "q4", "q6", "is2", "test", "ns", "men", "singpl", "p6", "p4", "p5", "t4", "nguilty", "t2", "t3", "t1", "p", "overallnumber"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Probability of not choosing any from a subset", "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"answer": "{nguilty}/{overallnumber}", "musthave": {"showStrings": false, "message": "
Input your answer as a fraction
", "strings": ["/"], "partialCredit": 0}, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answersimplification": "std", "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "Input your answer as a fraction, not a decimal.
", "strings": ["."], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "showCorrectAnswer": true, "marks": 2, "vsetrangepoints": 5}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "\n \n \nWhat is the probability that none of the suspects are chosen?
\n \n \n \nProbability = [[0]]?
\n \n \n \nInput your answer as a fraction and not as a decimal.
\n \n ", "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "A line-up of $\\var{men}$ men is conducted in order that a witness can identify $\\var{suspects}$ suspects.
\nSuppose that all $\\var{suspects}$ suspects are in the line-up.
\nAlso suppose that the witness does not recognise any of the suspects but simply chooses $\\var{suspects}$ men at random.
", "tags": ["MAS1604", "Probability", "checked2015", "choosing", "combinations", "counting", "cr1", "query", "sample space", "selecting", "selection", "statistics", "tested1", "ways of choosing"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "7/07/2012:
\nAdded tags.
\nAdded an alternative solution to this question (Method 2).
\nChecked calculation.
\n22/07/2012:
\nAdded description.
\nChecked the stats extension box.
\nPerhaps the answer should be a decimal rather than a fraction - looks clumsy.
\n31/07/2012:
\nQuestion appears to be working correctly.
\n20/12/2012:
\nCould have a variant of this question by using 'scenario' string variables. Added sc tag for this. Also query the above point about a decimal solution rather than a fraction.
\nChecked calculation, OK. Added tested1 tag.
\nImproved display of numbers by texifying them.
\n21/12/2012:
\nChecked rounding, OK. Added tag cr1.
", "licence": "Creative Commons Attribution 4.0 International", "description": "Given subset $T \\subset S$ of $m$ objects in $n$ find the probability of choosing without replacement $r\\lt n-m$ from $S$ and not choosing any element in $T$.
"}, "advice": "We can work out the probability in two ways:
\nMethod 1.
\nThere are $\\var{men-suspects}$ of the $\\var{men}$ who are not suspects.
\nThe probability of picking the first who is not a suspect is therefore:
\n\\[\\simplify[]{{men-suspects}/{men}}\\]
\nThe second choice of a non-suspect will be from $\\var{men-suspects-1}$ non-suspects in $\\var{men-1}$ with probability:
\n\\[\\simplify[]{{men-suspects-1}/{men-1}}\\]
\nHence the probability of choosing two non-suspects will be .
\n\\[\\simplify[]{{men -suspects} / {men}}\\times \\simplify[]{{men -suspects-1} / {men-1}}\\]
\nContinuing in this way we see that the probability of choosing $\\var{suspects}$ non-suspects is:
\n\\[\\simplify[zeroFactor,unitFactor,zeroTerm]{{t1} * ({men -suspects} / {men}) * ({men -suspects -1} / {men -1}) * ({men -suspects -2} / {men -2}) + {t2} * ({men -suspects} / {men}) * ({men -suspects -1} / {men -1}) * ({men -suspects -2} / {men -2}) * ({ns -3} / {men -3}) + {t3} * ({men -suspects} / {men}) * ({men -suspects -1} / {men -1}) * ({men -suspects -2} / {men -2}) * ({ns -3} / {men -3}) * ({ns -4} / {men -4}) + {t4} * ({men -suspects} / {men}) * ({men -suspects -1} / {men -1}) * ({men -suspects -2} / {men -2}) * ({ns -3} / {men -3}) * ({ns -4} / {men -4}) * ({ns -5} / {men -5})}=\\simplify[std]{{nguilty}/{overallnumber}}\\]
\non reducing the fraction to its lowest form.
\nMethod 2.
\nThere are $\\var{men-suspects}$ of the $\\var{men}$ who are not suspects.
\nHence there are \\[{\\var{men-suspects}\\choose \\var{suspects}}=\\var{comb(men-suspects,suspects)}\\] ways of choosing $\\var{suspects}$ non-suspects.
\nIn total there are \\[{\\var{men}\\choose \\var{suspects}}=\\var{comb(men,suspects)}\\] ways of choosing $\\var{suspects}$ from all present.
\nHence the probability is \\[\\frac{\\var{comb(men-suspects,suspects)}}{\\var{comb(men,suspects)}}= \\simplify[std]{{nguilty}/{overallnumber}} \\]
", "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/"}]}