// 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 \n

What is the probability that none of the suspects are chosen?

\n \n \n \n

Probability = [[0]]?

\n \n \n \n

Input 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.

\n

Suppose that all $\\var{suspects}$ suspects are in the line-up.

\n

Also 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:

\n

Added tags.

\n

Added an alternative solution to this question (Method 2).

\n

Checked calculation.

\n

22/07/2012:

\n

Added description.

\n

Checked the stats extension box.

\n

Perhaps the answer should be a decimal rather than a fraction - looks clumsy.

\n

31/07/2012:

\n

Question appears to be working correctly.

\n

20/12/2012:

\n

Could 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. 

\n

Checked calculation, OK. Added tested1 tag. 

\n

Improved display of numbers by texifying them.

\n

21/12/2012:

\n

Checked 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:

\n

Method 1.

\n

There are $\\var{men-suspects}$ of the $\\var{men}$ who are not suspects.

\n

The probability of picking the first who is not a suspect is therefore:

\n

\\[\\simplify[]{{men-suspects}/{men}}\\]

\n

The 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}}\\]

\n

Hence the probability of choosing two non-suspects will be .

\n

\\[\\simplify[]{{men -suspects} / {men}}\\times \\simplify[]{{men -suspects-1} / {men-1}}\\]

\n

Continuing 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}}\\]

\n

on reducing the fraction to its lowest form.

\n

Method 2.

\n

There are $\\var{men-suspects}$ of the $\\var{men}$ who are not suspects.

\n

Hence there are \\[{\\var{men-suspects}\\choose \\var{suspects}}=\\var{comb(men-suspects,suspects)}\\] ways of choosing $\\var{suspects}$ non-suspects.

\n

In total there are \\[{\\var{men}\\choose \\var{suspects}}=\\var{comb(men,suspects)}\\] ways of choosing $\\var{suspects}$ from all present.

\n

Hence 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/"}]}