(Joint pmf) drawing balls from a urn with replacement and adding

probabilitystatistics

The question is the following:

Suppose an urn initially contains one red ball, one blue ball, and one
green ball. At each draw, a ball is randomly selected from the urn,
replaced, and an additional ball of the same color as the drawn ball
is added to the urn. We need to find the joint probability mass
function of the random vector $(X, Y, Z)$ where $X, Y,$ are Z are the number
of times a red, blue, green ball was drawn, respectively.

The solution first find out the probability that a total number of x, y, and z draws of red, blue, green balls of a particular sequence of n draws is $$\frac{2x!y!z!}{(n+2)!}$$ But to find the joint pmf, we need to multiply the probability above with $\frac{n!}{x!y!z!}$
I'm confused about what is the purpose of multiplying $\frac{n!}{x!y!z!}$, $P(X,Y,Z)=\frac{n!}{x!y!z!}*\frac{2x!y!z!}{(n+2)!}$ is obvious the correct answer but how can I get this equation?

Best Answer

Suppose we wish to compute the probability of drawing $x$ red, $y$ blue, and $z$ green balls in a specific order. As per the conditions, starting with 1 of each color and adding a ball of the last chosen color after each selection, convince yourself the probability of this event is simply

$$\small \left(\frac{1}{3}\cdot \frac{2}{4}\cdot...\cdot\frac{x}{x+2}\right)\cdot \left(\frac{1}{x+3}\cdot \frac{2}{x+4}\cdot...\cdot\frac{y}{x+y+2}\right) \left(\frac{1}{x+y+3}\cdot \frac{2}{x+y+4}\cdot...\cdot\frac{z}{x+y+z+2}\right),$$

and letting $n=x+y+z$ denote the total draws, this is simply

$$\frac{2x!y!z!}{(n+2)!}.\qquad [1]$$

Now, to find the probability of drawing $x$ red, $y$ blue, and $z$ green in any order, we need to count all the different orderings in which we could have drawn these balls, i.e. count the number of ways to rearrange the following sequence of length $n$:

$$\underbrace{R...R}_{x \text{ of these}}\quad \underbrace{B...B}_{y \text{ of these}}\quad \underbrace{G...G}_{z \text{ of these}}.$$

There are $\frac{n!}{x!y!z!}$ such permutations because there are $n!$ ways to arrange a list of $n$ distinct items, but to avoid overcounting, we must divide out the ways to rearrange the indistinguishable duplicates of each color (there are $x!$ ways to rearrange the $R$s etc.).

So multiplying the number of permutations by the probability in $[1]$ gives us the probability of drawing our $x$ red, $y$ blue, and $z$ green balls in any order, as desired:

$$\frac{n!}{x!y!z!}\frac{2x!y!z!}{(n+2)!}=\frac{n!2}{(n+2)!}. $$

Note that when order doesn't matter, this probability doesn't depend on how many balls of each color we draw; it only depends on our total draws.