// Numbas version: exam_results_page_options {"name": "binomial 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "binomial 1", "extensions": [], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "rulesets": {}, "ungrouped_variables": ["n1", "n2", "nck", "prob1", "n3", "p", "q"], "variables": {"n1": {"name": "n1", "group": "Ungrouped variables", "description": "", "definition": "random(2..6#1)", "templateType": "randrange"}, "q": {"name": "q", "group": "Ungrouped variables", "description": "", "definition": "1-{p}", "templateType": "anything"}, "p": {"name": "p", "group": "Ungrouped variables", "description": "", "definition": "{n1}/{n3}", "templateType": "anything"}, "nck": {"name": "nck", "group": "Ungrouped variables", "description": "", "definition": "comb({n3},{n2})", "templateType": "anything"}, "prob1": {"name": "prob1", "group": "Ungrouped variables", "description": "", "definition": "{nck}*({n1}/{n3})^{n2}*(1-{n1}/{n3})^({n3}-{n2})", "templateType": "anything"}, "n3": {"name": "n3", "group": "Ungrouped variables", "description": "", "definition": "random(60..120#5)", "templateType": "randrange"}, "n2": {"name": "n2", "group": "Ungrouped variables", "description": "", "definition": "random(1..9#1)", "templateType": "randrange"}}, "preamble": {"css": "", "js": ""}, "statement": "

The long-run number of defects in a standard box of \$$\\var{n3}\$$ resistors is \$$\\var{n1}\$$.

\n

There are \$$n=\\var{n3}\$$ resistors in a standard box. The probability that a defective resistor is chosen at random is given by \$$p=\\frac{\\var{n1}}{\\var{n3}}=\\var{p}\$$.

\n

The binomial distribution gives: \$$P(X=k)=\\binom{n}{k}p^k(1-p)^{n-k}\$$

\n

\$$P(X=\\var{n2})=\\binom{\\var{n3}}{\\var{n2}}(\\var{p})^{\\var{n2}}(\\var{q})^{\\simplify{{n3}-{n2}}}\$$

\n

\$$P(X=\\var{n2})=(\\var{nck})(\\simplify{{p}^{n2}})(\\simplify{{q}^{{n3}-{n2}}})\$$

\n

\$$P(X=\\var{n2})=\\var{prob1}\$$

\n

", "functions": {}, "variable_groups": [], "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"variableReplacementStrategy": "originalfirst", "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "gaps": [{"precisionType": "dp", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "variableReplacements": [], "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "correctAnswerFraction": false, "mustBeReduced": false, "showPrecisionHint": true, "correctAnswerStyle": "plain", "scripts": {}, "minValue": "{prob1}", "precisionMessage": "You have not given your answer to the correct precision.", "maxValue": "{prob1}", "allowFractions": false, "precision": "3", "strictPrecision": false, "marks": 1, "precisionPartialCredit": 0}], "type": "gapfill", "prompt": "

If a box is chosen at random what is the probability that there it will contain exactly \$$\\var{n2}\$$ defects? [[0]]

", "marks": 0}], "type": "question", "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}]}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}