# Probability. Balls from boxes.

We have two boxes. There are 13 white and 22 black balls in the first box and 11 white and 4 black in the second one. Then we randomly take 10 balls from the first box and 5 from the second. Then from this sample we randomly choose 2 balls.

So, we need to calculate the probability that these two balls were taken from different boxes, provided that they are both white. I did the following: Assume we took $$n$$ white balls from the first box $$\Rightarrow$$ $$(10 - n)$$ black, and $$m$$ white balls from the second box $$\Rightarrow$$ $$(5 - m)$$ black balls from the second one.

Then, denote the event $$A(n, m) =$$ (two balls were taken from different boxes), and the event $$B(n, m) =$$ (two balls both are white). And following the conditional probability formula we can calculate that $$P(A(n, m)|B(n, m)) = \frac{P(A(n, m)B(n, m))}{P(B(n, m))} = \frac{\frac{n}{15} \frac{m}{14} + \frac{m}{15} \frac{n}{14}}{\frac{n+m}{15} \frac{n+m-1}{14}} = \frac{2nm}{(n+m)(n+m-1)}$$.

And after that we need to sum such expressions for all possible $$m$$ and $$n$$ multiplying by the probability that we take $$n$$ white balls from the first box and $$m$$ white balls from the second one.

Eventually, I have that the answer is $$\sum_{n=0..10}\sum_{m=1..5} \frac{2nm}{(n+m)(n+m-1)} * \frac{\binom{13}{n} \binom{22}{10-n}}{\binom{35}{10}} \frac{\binom{11}{m} \binom{4}{5-m}}{\binom{5}{15}} \approx 0.552$$. But this ugly sum seems not to be calculated without calculator. Could you please tell me if there is a more beautiful and simple solution?

Let $E_{2,0}$ denote the event that the two balls are taken from the first box.

Let $E_{1,1}$ denote the event that the two balls are taken from different boxes.

Let $E_{0,2}$ denote the event that the two balls are taken from the second box.

Let $W$ denote the event that both balls taken are white.

To be found is $P(E_{1,1}\mid W)$ and by definition we have:$$P(E_{1,1}\mid W)P(W)=P(W\mid E_{1,1})P(E_{1,1})\tag1$$

and: $$P(W)=P(W\mid E_{2,0})P(E_{2,0})+P(W\mid E_{1,1})P(E_{1,1})+P(W\mid E_{0,2})P(E_{0,2})\tag2$$

We find:

• $P(E_{2,0})=\frac{10}{15}\frac{9}{14}$
• $P(E_{1,1})=2\frac{10}{15}\frac{5}{14}$
• $P(E_{0,2})=\frac5{15}\frac4{14}$.

and:

• $P(W\mid E_{2,0})=\frac{13}{35}\frac{12}{34}$
• $P(W\mid E_{1,1})=\frac{13}{35}\frac{11}{15}$
• $P(W\mid E_{0,2})=\frac{11}{15}\frac{10}{14}$

By calculation of e.g. $P(W\mid E_{2,0})$ it is irrelevant that the two balls are taken from $10$ balls out of the first box that are set apart. You might as well take two balls from the $35$ balls in the first box.

• You are welcome. – drhab Dec 3 '17 at 14:00