// Numbas version: finer_feedback_settings {"name": "Clodagh's copy of BS3.3 Binomial Cookies", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Clodagh's copy of BS3.3 Binomial Cookies", "tags": ["Binomial Distribution", "binomial distribution", "Binomial distribution", "expectation", "expected number", "probabilities", "probability", "Probability", "rebelmaths", "sc", "standard deviation", "statistical distributions", "statistics"], "metadata": {"description": "
rebelmaths
\nApplication of the binomial distribution given probabilities of success of an event.
\nFinding probabilities using the binomial distribution.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "{pre} $\\var{thismany}${post}
\n{something} $\\var{number1}$ {else}
\n", "advice": "
a)
\n$X \\sim \\operatorname{bin}(\\var{number1},\\var{prob})$, so $n= \\var{number1},\\;\\;p=\\var{prob}$.
\n\nb)
\n1. \\[ \\begin{eqnarray*}\\operatorname{P}(X = \\var{thisnumber}) &=& \\dbinom{\\var{number1}}{\\var{thisnumber}}\\times\\var{prob}^{\\var{thisnumber}}\\times(1-\\var{prob})^{\\var{number1-thisnumber}}\\\\& =& \\var{comb(number1,thisnumber)} \\times\\var{prob}^{\\var{thisnumber}}\\times\\var{1-prob}^{\\var{number1-thisnumber}}\\\\&=&\\var{prob1}\\end{eqnarray*} \\] to 3 decimal places.
\n\n
2.
\n\\[ \\begin{eqnarray*}\\operatorname{P}(X \\leq \\var{thatnumber})& =& \\simplify[all,!collectNumbers]{P(X = 0) + P(X = 1) + {v}*P(X = 2)+ {v1}*P(X = 3)}\\\\& =& \\simplify[zeroFactor,zeroTerm,unitFactor]{{1 -prob} ^ {number1}+ {number1} *{prob} *{1 -prob} ^ {number1 -1} + {v} * ({number1} * {number1 -1}/2)* {prob} ^ 2 *( {1 -prob} ^ {number1 -2})+ {v1} * ({number1} * {number1 -1}*{number1-2}/(3*2))* {prob} ^ 3 *( {1 -prob} ^ {number1 -3})}\\\\& =& \\var{prob3}\\end{eqnarray*} \\]
\nto 3 decimal places.
\n", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"pre": {"name": "pre", "group": "Ungrouped variables", "definition": "' '", "description": "", "templateType": "anything", "can_override": false}, "descx1": {"name": "descx1", "group": "Ungrouped variables", "definition": "\"number of chocolate chip cookies in our sample:\"", "description": "", "templateType": "anything", "can_override": false}, "tprob3c": {"name": "tprob3c", "group": "Ungrouped variables", "definition": "if(thatnumber=1,(1-prob)^number1+number1*prob*(1-prob)^(number1-1),0)", "description": "", "templateType": "anything", "can_override": false}, "tprob3b": {"name": "tprob3b", "group": "Ungrouped variables", "definition": "if(thatnumber=3,(1-prob)^number1+number1*prob*(1-prob)^(number1-1)+number1*(number1-1)*prob^2*(1-prob)^(number1-2)/2+number1*(number1-1)*(number1-2)*prob^3*(1-prob)^(number1-3)/(3*2),0)", "description": "", "templateType": "anything", "can_override": false}, "tprob3a": {"name": "tprob3a", "group": "Ungrouped variables", "definition": "if(thatnumber=2,(1-prob)^number1+number1*prob*(1-prob)^(number1-1)+number1*(number1-1)*prob^2*(1-prob)^(number1-2)/2,0)", "description": "", "templateType": "anything", "can_override": false}, "something": {"name": "something", "group": "Ungrouped variables", "definition": "''", "description": "", "templateType": "anything", "can_override": false}, "thisnumber": {"name": "thisnumber", "group": "Ungrouped variables", "definition": "if(number1<6,random(2..3), if(number1<8,random(2..4),random(3..6)))", "description": "", "templateType": "anything", "can_override": false}, "things": {"name": "things", "group": "Ungrouped variables", "definition": "\"chocolate chip cookies.\"", "description": "", "templateType": "anything", "can_override": false}, "descx": {"name": "descx", "group": "Ungrouped variables", "definition": "\"the number of chocolate chip cookies\"", "description": "", "templateType": "anything", "can_override": false}, "tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.001", "description": "", "templateType": "anything", "can_override": false}, "prob": {"name": "prob", "group": "Ungrouped variables", "definition": "thismany/100", "description": "", "templateType": "anything", "can_override": false}, "thisaswell": {"name": "thisaswell", "group": "Ungrouped variables", "definition": "\"our selection contains no more than \"", "description": "", "templateType": "anything", "can_override": false}, "else": {"name": "else", "group": "Ungrouped variables", "definition": "\"biscuits are selected at random.\"", "description": "", "templateType": "anything", "can_override": false}, "v1": {"name": "v1", "group": "Ungrouped variables", "definition": "if(thatnumber=3,1,0)", "description": "", "templateType": "anything", "can_override": false}, "number1": {"name": "number1", "group": "Ungrouped variables", "definition": "random(5..12)*random([1,1,1,1,1,1,2,2,5])", "description": "", "templateType": "anything", "can_override": false}, "post": {"name": "post", "group": "Ungrouped variables", "definition": "\"% of biscuits made by a baker are chocolate chip cookies.\"", "description": "", "templateType": "anything", "can_override": false}, "prob2": {"name": "prob2", "group": "Ungrouped variables", "definition": "precround(tprob2,3)", "description": "", "templateType": "anything", "can_override": false}, "prob3": {"name": "prob3", "group": "Ungrouped variables", "definition": "precround(tprob3,3)", "description": "", "templateType": "anything", "can_override": false}, "prob1": {"name": "prob1", "group": "Ungrouped variables", "definition": "precround(tprob1,3)", "description": "", "templateType": "anything", "can_override": false}, "thatnumber": {"name": "thatnumber", "group": "Ungrouped variables", "definition": "random(1,2,3)", "description": "", "templateType": "anything", "can_override": false}, "thismany": {"name": "thismany", "group": "Ungrouped variables", "definition": "random(8..43)", "description": "", "templateType": "anything", "can_override": false}, "this": {"name": "this", "group": "Ungrouped variables", "definition": "\"our selection contains exactly \"", "description": "", "templateType": "anything", "can_override": false}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "if(thatnumber=1,0,1)", "description": "", "templateType": "anything", "can_override": false}, "tprob1": {"name": "tprob1", "group": "Ungrouped variables", "definition": "comb(number1,thisnumber)*prob^thisnumber*(1-prob)^(number1-thisnumber)", "description": "", "templateType": "anything", "can_override": false}, "tprob3": {"name": "tprob3", "group": "Ungrouped variables", "definition": "tprob3a+tprob3b+tprob3c", "description": "", "templateType": "anything", "can_override": false}, "tprob2": {"name": "tprob2", "group": "Ungrouped variables", "definition": "if(thatnumber=2,(1-prob)^number1+number1*prob*(1-prob)^(number1-1)+number1*(number1-1)*prob^2*(1-prob)^(number1-2)/2,(1-prob)^number1+number1*prob*(1-prob)^(number1-1))", "description": "", "templateType": "anything", "can_override": false}, "sd": {"name": "sd", "group": "Ungrouped variables", "definition": "precround(sqrt(number1*prob*(1-prob)),3)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["pre", "thatnumber", "this", "things", "prob1", "descx", "descx1", "thisnumber", "else", "thismany", "number1", "something", "tol", "v", "tprob1", "post", "tprob2", "prob2", "prob", "thisaswell", "sd", "v1", "tprob3a", "prob3", "tprob3b", "tprob3c", "tprob3"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "
Assuming a binomial distribution for {descX}, write down the values of $n$ and $p$.
\n$n=\\; $[[0]] $p=\\;$[[1]]
\n\n", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "number1", "maxValue": "number1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "prob", "maxValue": "prob", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Find the probability that {this} $\\var{thisnumber}$ {things}
\n$\\operatorname{P}(r=\\var{thisnumber})=$ [[0]] (to 3 decimal places).
\n\n
Find the probability that {thisaswell} {thatnumber} {things}
\n$\\operatorname{P}(r\\leq\\var{thatnumber})=$ [[1]] (to 3 decimal places).
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "prob1-tol", "maxValue": "prob1+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "prob3-tol", "maxValue": "prob3+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}]}]}], "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}]}