# An urn contains 1 green ball, 1 red ball, 1 yellow ball and 1 white ball

Exercise 1.38 An urn contains $1$ green ball, $1$ red ball, $1$ yellow ball and $1$ white ball. I draw $3$ balls with replacement. What is the probability that exactly two balls are of the same color?

So initially I was thinking we'd do $\frac{4}{4}\times\frac{3}{4}\times\frac{2}{4}$ since first draw can be any ball, second must be a different ball, and the third must be one of the initial two, however that's definitely incorrect.

So initially I was thinking we'd do (4/4)(3/4)(2/4) since first draw can be any ball, second must be a different ball, and the third must be one of the initial two, however that's definitely incorrect.

Yes, you've not considered the probability that the first two balls are the same colour and the third different. $+(4/4)(1/4)(3/4)$

Alternatively: count the ways to select two colours for pair and singleton, then arrange them.

$$\dfrac{\binom{4}{1}\binom{3}{1}\binom{3}{2}}{4^3}=\dfrac{4\cdot 3\cdot 2+4\cdot 1\cdot 3}{4^3} =\dfrac{9}{4^2}$$

Hint:

The total number of ways of picking $3$ balls WR is clearly $4^3$.

Now, you want exactly two balls of the same color and one ball of a different color. Well, you get to choose out of the $4$ possible colors for picking one of the two same colored balls. As soon as you've done that, you have only three choices left for the different colored ball and the other same colored ball is fixed. What you're left to calculate is the number of permutations possible. Then you're done. Can you calculate this yourself?

Probability of getting exactly $2$ green balls is $P(G).P(G).P(R,Y or W)=(1/4)(1/4)(3/4)=3/64$. Now, multiply it by $3$ as green balls may also appear in first and third or second and third draw. Then, P(exactly $2$ green balls)$=9/64$. Similarly, for red, yellow and white balls and then required probability is $9/64+9/64+9/64+9/64=9/16$.