# Compute the probability of an event that selects red ball only?

I have $n_1$ red balls and $n_2$ blue balls in a box.

Randomly select $k$ balls from the box. What is probability selects red balls only?

My solution is:

Let $X$ be event that select red ball only. $R$ is number of selected red ball. The probability of the event $X$ is

$$P(X)=\sum_{i=1}^{n_1} P(R=i)=\sum_{i=1}^{n_1} \frac{\binom{n_1}{i}}{ \binom{n_1+n_2}{i}}$$

Is my solution correct? Thank all

• The obvious answer is no, it's not correct, because the probability should depend on $k$. (In particular, for $k=1$, the probability is $n_1/(n_1 + n_2)$, but for $k = n_1+1$ the probability is zero!) And your formula doesn't depend in any way on the value of $k$, so it can't possibly be right. Oct 10, 2016 at 4:10
• @DavidK: Thank you. I edited my question to adapt with your issue. Now it is more clear Oct 10, 2016 at 4:16
• @user3051460: it is not a wise thing to keep changing a question after it has received answers. This edit, completely changes the question. It should be better posted as a new question. Oct 10, 2016 at 4:18
• After the edit, even the question doesn't make sense now. If $P(k)=0.1k^1+0.2k^2+0.7k^{n_1}$ then $P(1)=0.1(1^1)+0.2(1^2)+0.7(1^{n_1})=0.1+0.2+0.7=1$. How do we find that the probability of $k=1$ is $0.1$? And if $k$ is random, how can the answer (which is a probability, therefore not random) just be a multiple of $P(k)$? Oct 10, 2016 at 4:25
• $P(k)$ just polynomial to said probability of select $k$. I updated a new question at math.stackexchange.com/questions/1961753/… Oct 10, 2016 at 4:29

The probability of the event:

selecting $k$ balls, out of a box containing $n_1$ red and $n_2$ blue balls, such that all $k$ of them are red,

is given by ($k\leq n_1$): $$P=\frac{\binom{n_1}{k}\binom{n_2}{0}}{\binom{n_1+n_2}{k}}=\frac{\binom{n_1}{k}}{\binom{n_1+n_2}{k}}$$ this is called the hypergeometric distribution.

• Thank you. If $k$ is various from $1$ to $k_2$, it will be sum. is it right? Do you think my explaination about $X$ and $R$ are correct ? Oct 10, 2016 at 3:54
• Hmm, I do not think I agree with your interpretation of $X$. It describes a different event in a different sample space. Oct 10, 2016 at 4:02
• How can I write a full solution and explain it in mathematical? Oct 10, 2016 at 4:07
• A full solution on the question posed in your first sentence is contained in my post above (study the cited link as well). If you feel you have some extra question related to it, you should better post it as a new question. Oct 10, 2016 at 4:10
• I means I want to define $X$, $R$ Oct 10, 2016 at 4:11

There are $\binom{n_1}{k} \binom{n_2}{0}$ ways to choose $k$ red balls (first term) and $0$ blue balls (second term). There are $\binom{n_1+n_2}{k}$ ways to choose $k$ balls from the box.

Your solution can't be right since your binomial coefficients are all zero (except for one term which is 1/0 which is undefined).

• Thank you. I was wrong when typing binominal Oct 10, 2016 at 3:57