// Numbas version: finer_feedback_settings {"name": "nuExam07 - Binomial Distribution", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"statement": "
Please give your answer to at least 3 decimal places.
\nIt is estimated that $\\var{p_perc}$% of all Lakes College students walk to college. A random sample of $\\var{n}$ Lakes College students is chosen.
\n", "ungrouped_variables": ["p", "p_perc", "n", "q", "r", "pr0", "pr1", "pr2", "pr3", "answer1", "answer2", "qn", "r0", "n2"], "preamble": {"css": "", "js": ""}, "advice": "Part (a)
\nIf a random variable $X$ follows a binomial distribution with parameters $n$ and $p$. The probability of $r$ successes out of $n$ trials is given by:
\n$P(X=r)=P(r,n)=C^n_{r}p^{r}q^{n-r}$
\nwhere $p$ is the probability of success for each trial and $q$ is the probability of failure for each trial.
\nThe probability that a student cycles to college is $\\var{p}$, therefore $p=\\var{p}$ and $q=1-\\var{p}=\\var{q}$.
\nWe are interested in claculating the probability that none of the sample of $\\var{n}$ students walk to college so $r=0$ and $n=\\var{n}$
\n$P(\\var{r0}, \\var{n})= C^\\var{n}_{\\var{r0}}$ $\\var{p}^\\var{r0}$ $\\var{q}^{\\var{n}-\\var{r0}}$
\n$P(\\var{r0}, \\var{n})= \\var{pr0}$
\n\n
Part (b)
\nWe are interested in claculating the probability that at least $\\var{r}$ of the $\\var{n}$ students walk to college. Let $X$ represent the number of students that walk to college. We need to calculate:
\n$P(X \\geq \\var{r}) = P(X= \\var{r}) + P(X= \\var{r+1})+...+ P(X=\\var{n})$
\n\n
Since $P(X=\\var{r0})+P(X=\\var{r0+1})+...+P(X=\\var{n})=\\var{r0+1}$
\nWe may write
\n$P(X \\geq \\var{r}) = 1-P(X= \\var{r0}) - P(X=\\var{r0+1})-...- P(X=\\var{r-1})$
\n\n
where
\n$P(X= \\var{r0})=P(\\var{r0}, \\var{n})= C^\\var{n}_{\\var{r0}}$ $\\var{p}^\\var{r0}$ $\\var{q}^{\\var{n}-\\var{r0}}=\\var{pr0}$
\n$P(X=1) =P(1, \\var{n})= C^\\var{n}_{1}$ $\\var{p}^{1}$ $\\var{q}^{\\var{n}-1}$ $=\\var{pr1}$
\n$P(X=2) = P(2, \\var{n})=$ $C^\\var{n}_{2}$ $\\var{p}^{2}$ $\\var{q}^{\\var{n}-2}$ $=\\var{pr2}$
\n\nThen
\n$P(X \\geq \\var{r}) = 1-\\var{qn}-\\var{pr1}-\\var{pr2}=\\var{answer2}$
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "rulesets": {}, "functions": {}, "variables": {"pr3": {"definition": "((n*(n-1)*(n-2))/6)*(p^3)*(q^(n-3))", "description": "probability that r = 3
", "templateType": "anything", "name": "pr3", "group": "Ungrouped variables"}, "r0": {"definition": "0", "description": "", "templateType": "anything", "name": "r0", "group": "Ungrouped variables"}, "answer1": {"definition": "if(r=2,pr0+pr1, pr0+pr1+pr2)", "description": "", "templateType": "anything", "name": "answer1", "group": "Ungrouped variables"}, "p": {"definition": "random(0.1..0.2#0.05)", "description": "the probability that an individual student cycles to college
", "templateType": "anything", "name": "p", "group": "Ungrouped variables"}, "r": {"definition": "3", "description": "more than r of the students cycle to college
", "templateType": "anything", "name": "r", "group": "Ungrouped variables"}, "pr1": {"definition": "n*p*q^(n-1)", "description": "probability that r = 1
", "templateType": "anything", "name": "pr1", "group": "Ungrouped variables"}, "pr2": {"definition": "((n*(n-1))/2)*(p^2)*q^(n-2)", "description": "probability that r = 2
", "templateType": "anything", "name": "pr2", "group": "Ungrouped variables"}, "n": {"definition": "random(6..12)", "description": "sample size
", "templateType": "anything", "name": "n", "group": "Ungrouped variables"}, "pr0": {"definition": "q^n", "description": "probability that r = 0
", "templateType": "anything", "name": "pr0", "group": "Ungrouped variables"}, "qn": {"definition": "q^n", "description": "", "templateType": "anything", "name": "qn", "group": "Ungrouped variables"}, "answer2": {"definition": "1-answer1", "description": "", "templateType": "anything", "name": "answer2", "group": "Ungrouped variables"}, "p_perc": {"definition": "p*100", "description": "percentage of students that cycle to college
", "templateType": "anything", "name": "p_perc", "group": "Ungrouped variables"}, "n2": {"definition": "n-2", "description": "", "templateType": "anything", "name": "n2", "group": "Ungrouped variables"}, "q": {"definition": "1-p", "description": "probability tha an individual does not cycle to college
", "templateType": "anything", "name": "q", "group": "Ungrouped variables"}}, "tags": [], "extensions": [], "name": "nuExam07 - Binomial Distribution", "metadata": {"description": "It is estimated that 30% of all CIT students cycle to college. If a random sample of eight CIT students is chosen, calculate the probability that...
\nrebelmaths
", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "mustBeReduced": false, "showCorrectAnswer": true, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "variableReplacements": [], "type": "numberentry", "customMarkingAlgorithm": "", "useCustomName": false, "showFeedbackIcon": true, "showFractionHint": true, "allowFractions": false, "marks": "3", "unitTests": [], "minValue": "(q^n)-0.001", "maxValue": "(q^n)+0.001", "customName": "", "prompt": "Calculate the probability that none of the $\\var{n}$ students in the sample walk to college.
"}, {"notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "mustBeReduced": false, "showCorrectAnswer": true, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "variableReplacements": [], "type": "numberentry", "customMarkingAlgorithm": "", "useCustomName": false, "showFeedbackIcon": true, "showFractionHint": true, "allowFractions": false, "marks": "5", "unitTests": [], "minValue": "answer2 -0.001", "maxValue": "answer2 +0.001", "customName": "", "prompt": "Calculate the probability that at least $\\var{r}$ of the $\\var{n}$ students walk to college.
"}], "type": "question", "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}