# Drawing balls from an urn with balls from 3 different colors

We have an urn with $$5$$ red, $$6$$ blue and $$8$$ green balls. Select $$3$$ balls randomly. What is the probability that they are all of different colors? Repeat under the assumption that whenever a ball is selected, its color is noted, and it is then replaced in the urn before the next selection.

### $$\underline{Attempt:}$$

First, we consider when we draw all balls at the same time. The size of the sample space is $${19 \choose 3}$$. Now if we want the three balls to have different colors: we can have either $$RBG, BRG, GBR, GRB, RGB, BGR,$$ that all the possible permutations of red, blue and green : $$3! = 6$$ Now, there are $${5 \choose 1}$$ ways to pick the red balls, $${6 \choose 1 }$$ and $${8 \choose 1}$$ to pick blue and green. Thus,

$$P (\text{different color} ) = \frac{ 6 \times 5 \times 6 \times 8 }{ {19 \choose 3 } }$$

Now, with replacement, the size of the sample space is $$19 \times 19 \times 19 = 19^3$$. Thus by same argument as above we have

$$P( \text{different} ) = \frac{ 6 \times 5 \times 6 \times 8 }{19^3}$$

Is this correct?

• The question asks for the probability that they are all the same color so $RRR$ $BBB$ or $GGG$
– Remy
Apr 17 '18 at 7:04
• mistake, I fixed it Apr 17 '18 at 7:06

When dealing without replacement, the result is just

$$\frac{{5 \choose 1}\cdot{6 \choose 1}\cdot{8 \choose 1}}{19 \choose 3}\approx0.2477$$

The denominator $${19 \choose 3}=\frac{19!}{\color{blue}{3!}\cdot16!}$$ serves to account for different orderings so you don't need to multiply by $3!$

Note that your result is greater than one and a probability must be between $0$ and $1$.

When working with replacement, this becomes a multinomial distribution. Letting $X_1$, $X_2$, and $X_3$ denote the number of red, blue, and green balls selected, respectively, we have

$$\mathsf P(X_1=X_2=X_3=1)=\frac{3!}{1!\cdot1!\cdot1!}\cdot\frac{5}{19}\cdot\frac{6}{19}\cdot\frac{8}{19}\approx0.2099$$

R Simulation Without Replacement:

> urn = c(rep("red",5),rep("blue",6),rep("green",8))
> u = replicate(10^6, length(unique(sample(urn,3,repl=F))))
> mean(u == 3)
[1] 0.247378


R Simulation With Replacement:

> urn = c(rep("red",5),rep("blue",6),rep("green",8))
> u = replicate(10^6, length(unique(sample(urn,3,repl=T))))
> mean(u == 3)
[1] 0.210267

• I am still confused how the denominator takes care of the ordering in the first part. Apr 17 '18 at 7:33
• I have edited my answer. The highlighted part shows why.
– Remy
Apr 17 '18 at 7:34
• @remy, +1 for the R simulation!