# Drawing a second ball from a randomly selected box

Suppose I have 3 boxes. Box $i$ has $b_i$ black balls and $w_i$ white balls (all the boxes contain the same number of balls).

A box is selected randomly out of the three, and a ball is selected randomly.

Given that the randomly selected ball is white, and given that the ball is not returned to the box, what is the probability to draw a second white ball from the same box?

I want to solve this using only conditional probability.

My attempt:

The probability to draw a first white ball ($W_1$) is given by the law of total probability: $$P(W_1) = P(A_1)P(W_1|A_1) + P(A_2)P(W_1|A_2) + P(A_3)P(W_1|A_3) = \frac{1}{3}\left(\frac{w_1}{w_1+b_1} + \frac{w_2}{w_2+b_2} + \frac{w_3}{w_3+b_3}\right)$$

For the second white ball, $W_2$, its probability is given by $$P(W_2|W_1) = \frac{P(W_2\cap W_1)}{P(W_1)}$$

but I am having troubles calculating $P(W_1\cap W_2)$

Try $$P(W_2\cap W_1)=\frac{1}{9}\left(\frac{w_1}{w_1+b_1}\frac{w_1-1}{w_1+b_1-1} + \frac{w_2}{w_2+b_2}\frac{w_2-1}{w_2+b_2-1} + \frac{w_3-1}{w_3+b_3-1}\frac{w_3}{w_3+b_3}\right)$$

• This was my intuitive answer, but how do I show this mathematically using only conditional probabilities? Commented Mar 2, 2016 at 17:30
• If you consider a single box, then the probability of getting two white balls (without replacement) is given by $$P(W_1\cap W_2)=\frac{w_1}{w_1+b_1}\frac{w_1-1}{w_1+b_1-1}$$ This is the hypergeometric distribution and it is actually a conditional probability, in the sense that $$P(W_2 | W_1)=\frac{w_1-1}{w_1+b_1-1}$$ is exactly the probability of the second ball being white, given that the first has already chosen to be white. Commented Mar 2, 2016 at 17:36
• With a leading factor of $\frac19$, this answer is obviously wrong. Simply set $w_1$, $w_2$, and $w_3$ all greater than $1$ and set $b_1=b_2=b_3=0$. Then a correct answer would say that with probability $1$ the second ball will be white (because both balls are always white), but this answer says the probability is $\frac13$. Commented Mar 2, 2016 at 20:25
• The problem's statement says that: "Given that the randomly selected ball is white, and given that the ball is not returned to the box, what is the probability to draw a second white ball from the same box?" The $\frac{1}{3}$ produced from the formula in my answer represents the probability that two white balls are choosen from the same box. The rest $\frac{2}{3}$ corresponds to the events "two white balls are chosen but each comes from a different box". Sorry in advance if I'm missing something obvious. Commented Mar 2, 2016 at 20:35
• OK, we just disagree on how we read the question. I saw the statement say one time that you randomly select a box, so I assumed we select a random box once. Then it says to draw a ball, so we draw a ball. Then there is a question about a second ball. Since there was no mention of randomizing the selection of boxes again, I assume we don't. The question is phrased poorly, though, I grant you that. Commented Mar 2, 2016 at 20:42

It's fairly obvious what the final result will be. Calculating it two ways gives you an opportunity to check how well you apply Bayes's Theorem, at least in principle, though it's not clear that this particular problem is a particularly good test of that ability.

In order to compute the probability of two white balls, you could use \begin{align} P(W_1 \cap W_2) & = P(W_1 \cap W_2 \mid A_1) P(A_1)\\ &\qquad {} + P(W_1 \cap W_2 \mid A_2) P(A_2) \\ &\qquad {} + P(W_1 \cap W_2 \mid A_3) P(A_3). \end{align}

The probability $P(W_1 \cap W_2 \mid A_1)$ is the probability that both balls will be white if you pull two balls from a box containing $b_1$ black balls and $w_1$ white balls.

One way to look at this is that there are There are $\binom{b_1 + w_1}{2}$ equally likely pairs of balls to draw, of which $\binom{w_1}{2}$ pairs are two white balls, so $$P(W_1 \cap W_2 \mid A_1) = \frac{\binom{w_1}{2}}{\binom{b_1 + w_1}{2}} = \frac{w_1 (w_1 - 1)}{(b_1 + w_1)(b_1 + w_1 - 1)},$$ which is the same result you get by using the "obvious" values of $P(W_2 \mid A_1 \cap W_1)$ and $P(W_1 \mid A_1)$ in $$P(W_2 \cap W_1 \mid A_1) = P(W_2 \mid W_1 \cap A_1) P(W_1 \mid A_1).$$ (The "obvious" values are $P(W_2 \mid A_1 \cap W_1) = \frac{w_1 - 1}{b_1 + w_1 - 1}$ and $P(W_1 \mid A_1) = \frac{w_1}{b_1 + w_1}$, as already indicated in other answers.)

• Shouldn't I divide the result by $P(W_1)$? Since $P(W_2|W_1) = \frac{P(W_1\cap W_2)}{P(W_1)}$ Commented Mar 2, 2016 at 18:31
• Yes, that formula is correct. Since you already know how to do that part correctly, I concentrated only on getting the value of $P(W_1 \cap W_2)$ in order to put it in that formula. Commented Mar 2, 2016 at 18:45
• @David K: shouldn't it be $P^2(A_i)$ in your first formula ? So your first formula, should read: $$P(W_1\cap W_2) = P(A_1)P(W_1|A_1)P(A_1)P(W_2|A_1,W_1) + P(A_2)P(W_1|A_2) P(A_2)P(W_2|A_2,W_1)+ P(A_3)P(W_1|A_3)P(A_3)P(W_2|A_3,W_1)$$ Commented Mar 2, 2016 at 20:19
• @KonstantinosKanak0glou No. That seems to be where you went wrong in your answer. Commented Mar 2, 2016 at 20:23
• mmm let us see: after you choose the box from which the first ball is drawn, then you choose the ball. Then -according to what I understand from the statement of the problem- you choose again one out of the three boxes. So, isn't it necessary to multiply with the $\frac{1}{3}$ again ? Commented Mar 2, 2016 at 20:27