// Numbas version: exam_results_page_options {"name": "Maria's copy of Binomial Distribution (Cycling)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "

Part (a)

\n

If 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}$

\n

where $p$ is the probability of success for each trial and $q$ is the probability of failure for each trial.

\n

The probability that a student cycles to college is $\\var{p}$, therefore $p=\\var{p}$ and $q=1-\\var{p}=\\var{q}$.

\n

We are interested in claculating the probability that none of the sample of $\\var{n}$ students cycle 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)

\n

We are interested in claculating the probability that at least $\\var{r}$ of the $\\var{n}$ students cycle to college. Let $X$ represent the number of students that cycle 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}$ 

\n

We 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

\n

Then 

\n

$P(X \\geq \\var{r}) = 1-\\var{qn}-\\var{pr1}-\\var{pr2}=\\var{answer2}$

", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "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...

\n

rebelmaths

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["p", "p_perc", "n", "q", "r", "pr0", "pr1", "pr2", "pr3", "answer1", "answer2", "qn", "r0", "n2"], "parts": [{"maxValue": "(q^n)+0.001", "minValue": "(q^n)-0.001", "showCorrectAnswer": true, "variableReplacements": [], "marks": "3", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "scripts": {}, "showFeedbackIcon": true, "prompt": "

Calculate the probability that none of the $\\var{n}$ students in the sample cycle to college.

", "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "correctAnswerFraction": false}, {"maxValue": "answer2 +0.001", "minValue": "answer2 -0.001", "showCorrectAnswer": true, "variableReplacements": [], "marks": "5", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "scripts": {}, "showFeedbackIcon": true, "prompt": "

Calculate the probability that at least $\\var{r}$ of the $\\var{n}$ students cycle to college.

", "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "correctAnswerFraction": false}], "extensions": [], "variables": {"n2": {"group": "Ungrouped variables", "name": "n2", "templateType": "anything", "definition": "n-2", "description": ""}, "qn": {"group": "Ungrouped variables", "name": "qn", "templateType": "anything", "definition": "q^n", "description": ""}, "pr3": {"group": "Ungrouped variables", "name": "pr3", "templateType": "anything", "definition": "((n*(n-1)*(n-2))/6)*(p^3)*(q^(n-3))", "description": "

probability that r = 3

"}, "r0": {"group": "Ungrouped variables", "name": "r0", "templateType": "anything", "definition": "0", "description": ""}, "p_perc": {"group": "Ungrouped variables", "name": "p_perc", "templateType": "anything", "definition": "p*100", "description": "

percentage of students that cycle to college

"}, "pr1": {"group": "Ungrouped variables", "name": "pr1", "templateType": "anything", "definition": "n*p*q^(n-1)", "description": "

probability that r = 1

"}, "answer1": {"group": "Ungrouped variables", "name": "answer1", "templateType": "anything", "definition": "if(r=2,pr0+pr1, pr0+pr1+pr2)", "description": ""}, "r": {"group": "Ungrouped variables", "name": "r", "templateType": "anything", "definition": "3", "description": "

more than r of the students cycle to college

"}, "n": {"group": "Ungrouped variables", "name": "n", "templateType": "anything", "definition": "random(6..12)", "description": "

sample size

"}, "answer2": {"group": "Ungrouped variables", "name": "answer2", "templateType": "anything", "definition": "1-answer1", "description": ""}, "p": {"group": "Ungrouped variables", "name": "p", "templateType": "anything", "definition": "random(0.1..0.4#0.05)", "description": "

the probability that an individual student cycles to college

"}, "q": {"group": "Ungrouped variables", "name": "q", "templateType": "anything", "definition": "1-p", "description": "

probability tha an individual does not cycle to college

"}, "pr2": {"group": "Ungrouped variables", "name": "pr2", "templateType": "anything", "definition": "((n*(n-1))/2)*(p^2)*q^(n-2)", "description": "

probability that r = 2

"}, "pr0": {"group": "Ungrouped variables", "name": "pr0", "templateType": "anything", "definition": "q^n", "description": "

probability that r = 0

"}}, "tags": ["Binomial", "binomial", "REBEL", "Rebel", "rebel", "rebelmaths"], "functions": {}, "preamble": {"css": "", "js": ""}, "statement": "

Please give your answer to at least 3 decimal places.

\n

It is estimated that $\\var{p_perc}$% of all CIT students cycle to college. A random sample of $\\var{n}$ CIT students is chosen.

\n

", "name": "Maria's copy of Binomial Distribution (Cycling)", "variable_groups": [], "rulesets": {}, "type": "question", "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"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": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}