# Probablity: 2 Urns

I'm trying to find the solution for this problem:

There are 2 urns: urn 1 has 2 red balls and 1 blue ball and urn 2 has 1 red ball and 2 blue balls. You're supposed to randomly select one urn and put your hand inside it to retrieve a ball.

What is the probability you chose urn2, if a blue ball was retrieved?

Though I have been unable to solve it, I have tried reasoning it out like this:

There are 6 total possibilities since there are 6 balls. There are 2 blue balls in urn 2. There are 2 urns. Therefore: (2 blue balls / 6 total balls) * 2 urns = 2/3

I would appreciate any help. Thanks.

• Your calculation gives the right answer in this case but it is not the right way to approach the problem. See my comment on Chris Taylor's answer. – Dilip Sarwate Dec 15 '11 at 0:21
• If urn 1 had two red balls and two blue balls instead, how would you calculate the answer using your approach? – Dilip Sarwate Dec 15 '11 at 0:28

Your reasoning is pretty good. Here's a more systematic way to see it.

The expression that you want to calculate is

$$\frac{\textrm{Probability of picking the 2nd urn and picking a blue ball}}{\textrm{Probability of picking a blue ball}}$$

Since there are equal numbers of balls in each urn, and each urn is equally likely to be picked, you can do this by counting. There are 3 ways that you can pick a blue ball. Of those 3 ways, 2 of them involve picking a blue ball from the 2nd urn. Since all possibilities are equally likely, the probability of the ball being from the 2nd urn, given that you chose a blue ball, is

$$\frac{\textrm{Number of ways to pick a blue ball from the 2nd urn}}{\textrm{Number of ways to pick a blue ball}} = \frac{2}{3}$$

Alternatively, you can apply Bayes' theorem. Letting $B$ be the event 'You pick a blue ball' and $2$ be the event 'you pick from the 2nd urn', then you have

$$P(B) = \frac{1}{2}\cdot \left( \frac{1}{3} + \frac{2}{3} \right) = \frac{1}{2}$$ $$P(2) = \frac{1}{2}$$ $$P(B|2) = \frac{2}{3}$$

and hence

$$P(2|B) = \frac{P(2)}{P(B)}\cdot P(B|2) = \frac{1/2}{1/2}\cdot\frac{2}{3} = \frac{2}{3}$$

• As a minor comment, in general, $P(B)$ should be calculated via the law of total probability as $$P(B) = \sum_i P(B\mid A_i)P(A_i) = \sum_i \frac{b_i}{r_i+b_i}P(A_i)$$ if there are multiple urns with the $i$-th urn containing $r_i$ red balls and $b_i$ blue balls, and $A_i$ is the event that the $i$-th urn is picked. In particular, if the urns contain different total numbers of balls. then it will not be true that $$P(B) = \frac{\text{total number of blue balls}}{\text{total number of balls}}$$ even if the urns are equally likely to be picked, as they are in this case. – Dilip Sarwate Dec 15 '11 at 0:17
• Good point Dilip - I edited my answer to show the steps involved in calculating P(B) more clearly. – Chris Taylor Dec 15 '11 at 0:29