Help please!!! 40% of the population likes bananas. 60% of the population likes apples. Out of a sample size of 9 people, what is the probability that at least 2 like bananas? What about at least 3 bananas? 4? What is the math for each? I hope I can take it from there. Thank you.
Probability of at least two, three and four events happening out of 9 samples?
217 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 3 best solutions below
On
The number $X$ of people liking bananas out of 9 people has $X \sim \mathsf{Binom}(n=0, p=.4)$ The formula for $$P(X = k) = {9 \choose k}(.4)^k(.6)^{n-k},$$ for $k = 0, 1, \dots 9.$
Using R (or other) statistical software, one can make a table of the PDF $P(X = k)$ or the CDF $P(X \le k).$ You can get answers to all parts of your question from such a table. Maybe there is an appendix in the back of your text that shows tables for various binomial distributions. [Ignore line numbers in brackets.]
k = 0:9; PDF = dbinom(k, 9, .4); CDF = pbinom(k, 9, .4)
cbind(k, PDF, CDF)
k PDF CDF
[1,] 0 0.010077696 0.01007770
[2,] 1 0.060466176 0.07054387
[3,] 2 0.161243136 0.23178701
[4,] 3 0.250822656 0.48260966
[5,] 4 0.250822656 0.73343232
[6,] 5 0.167215104 0.90064742
[7,] 6 0.074317824 0.97496525
[8,] 7 0.021233664 0.99619891
[9,] 8 0.003538944 0.99973786
[10,] 9 0.000262144 1.00000000
On
looks very suspiciously like a question from homework.
Whereas this problem can be considered as $ \mathcal{Binomial(n, p)}$, it's simpler to start purely from a probability point of view.
Let's say probability of randomly selected someone from the population liking bananas is $p = 0.4$ and that for apples $q = 0.6$.
at least 2 out of 9 people like banana
To know above, we only need to work out the complement situation where 0 or only 1 people like banana.
None of the 9 people like banana: $p^0q^9$
1 of the 9 people like banana: $p^1q^8$. But there are 9 different ways of choosing the person who likes banana, so we need to multiply by 9. This is known as binomial coefficient $\binom{n}{k} = \binom{9}{1} = \frac{9!}{1!(9 - 1)!}$
So, the probability of at least 2 out of 9 like banana is therefore the rest of situations: $$\begin{align} t &= 1 - p^0q^9 - 9 p^1q^8\\ &= 1 - 0.011 - 0.0605\\ &= 0.9294 \end{align}$$
at least 3 out of 9 people like banana
similarly.
$$\begin{align} t &= 1 - \binom{9}{0}p^0q^9 - \binom{9}{1}p^1q^8 - \binom{9}{2}p^2q^7\\ &= 1 - 0.011 - 0.0605 - 0.1612\\ &= 0.768 \end{align}$$
relation to Binomial distribution
Notice that we only needed to further subtract the probability of 2 people liking bananas. This probability is from a Binomial probability mass function at k=2, parameterised by n and p. $$\begin{align} \mathcal{Binomial(k=2;\ n=9,\ p=0.4)} &=\binom{9}{2}p^2(1-p)^7\\ &= 0.1612 \end{align}$$
It means the cumulative distribution function CDF, by definition, is we really need here so that $$\begin{align} t &=1-\mathcal{CDF_{binomial}(k=2;\ n=9,\ p=0.4)}\\ &=1 - \sum_{k=0}^{2} \mathcal{Binomial(k;\ n=9,\ p=0.4)}\\ &= 1 - (\binom{9}{0}p^0q^9 + \binom{9}{1}p^1q^8 + \binom{9}{2}p^2q^7)\\ &= 1 - (0.011 + 0.0605 + 0.1612)\\ &= 0.768 \end{align}$$
hope it now makes sense and you can quite easily work from here.

You are absolutely right. We make fewer calculations by subtracting the likelihood of getting a sample in which $0$ or $1$ or $2$ etc people like bananas then the other way around.
At least Two Bananas:
In total we have $512$ possible combinations of "events," events described as the discovery an individual in our samples feeling towards bananas
For no one in sample liking bananas we have one possible combination of preferences, whose "weight" is basically null, or $1$, and the likelihood of $.6$ event occurring nine times.
$$\binom{9}{0}(.4^0)(.6^9) = 1 \cdot 1 \cdot 0.010077696 = 0.010077696$$
For one person in sample liking bananas we have $9$ possible combinations of preferences. We need a $.4$ probability "event" to occur once, so we add $.4^1$ to our model. We also need a $.6$ probability event to occur all the other times, so we take $9$ subtract one and raise $.6$ to the difference, which is $8$
$$\binom{9}{1}(.4^1)(.6^{9-1}) = 9 \cdot 0.4 \cdot 0.01679616 = 0.060466176$$
We can then take $1$ which would be certainty and subtract the likelihood of getting a sampling in which $0$ people have a preference for bananas and subtracting the likelihood of getting a sampling in which $1$ person has a preference for bananas.
$$1 - 0.010077696 - 0.01679616 = 0.929456128$$
$0.929456128 \cdot 100 = 92.95\%$ that our sample contains at least two people with a preference for bananas.
I realize that we don't like links but here is a distribution calc and table that helped me verify:
http://www.statisticshowto.com/calculators/binomial-distribution-calculator/
http://www.statisticshowto.com/calculators/binomial-distribution-calculator/