# What is the probability that the two balls have different colors?

There are two urns: the one with 2 white and 3 black balls and the other one with 3 white and 3 black balls. We pick one urn at random and draw two balls out of it. What is the probability that the two balls have different colors?

I have tried like the following…

let, two urns are X and Y.

$X = \{W,W,B,B,B\}$

$Y = \{W,W,W,B,B,B\}$

Probability of selecting a pair $\{B,W\}$ from $X$ is,

$\frac{^3C_1 \cdot ^2C_1}{^5C_2} = \frac{3}{5}$

Probability of selecting a pair $\{B,W\}$ from $Y$ is,

$\frac{^3C_1 \cdot ^3C_1}{^6C_2} = \frac{3}{5}$

Probability of picking an urn at random is $\frac{1}{2}.$

If event $A$ = picking the pair $\{B,W\}$.

Then,

$P(A) = P(X).P(A|X) + P(Y).P(A|Y)$

$\Rightarrow P(A) = \frac{3}{10} + \frac{3}{10} = \frac{3}{5}$

Am I correct?

• What is indeed remarkable is that you find that the probability of getting two balls of different colors is the same regardless of which urn is chosen and this does not bother you at all. – Dilip Sarwate Oct 29 '16 at 2:01
• @DilipSarwate I actually had a hard time believing it myself. – dsaxton Oct 29 '16 at 2:11
• So weird, but it actually holds true for other pairs of sizes of urns. If you have an urn with the same number of balls of each colour, the probability of taking two different coloured balls is the same as when you take one ball out of the urn. – twalbaum Oct 30 '16 at 2:26

Yes, although once you realize the probability doesn't depend on which urn you draw from you can just stop there and declare that the answer.

Just for fun we can create a simulation in R to estimate the probability.

n = 100000
count = 0

for (i in 1:n) {
# generate a random urn (0's will be white balls and 1's black balls)
urn = c(rep(0, 2 + rbinom(n=1, size=1, prob=1/2)), rep(1, 3))
# draw two elements from the urn and check if their sum is one
count = count + as.numeric(sum(sample(urn, 2, replace=FALSE)) == 1)
}

# look at the proportion of successes
count / n


If you run this you should get an answer very close to $3/5$.