[Math] A box contains 5 yellow and 3 red balls, from which 4 balls are drawn one at a time, at random, without replacement.

probability distributionsstatistics

A box contains 5 yellow and 3 red balls, from which 4 balls are drawn one at a time, at random, without replacement. Let $X$ be the number of yellow balls on the first two draws and $Y$ the number of yellow balls on all 4 draws.

Find the joint probability function, $f(x,y)$.

The solution is

${5 \choose x}$$3 \choose 2-x$$5-x \choose y-x$$1+x \choose 2+x-y$
/ $8 \choose 2$$6 \choose 2$

I have no idea how they got solution.
Any hints are appreciated.

Thanks!

Best Answer

We can consider each ball to be identifiable, although we are mainly interested in whether the ball is yellow.

We start with $8$ balls. The first draw chooses $2$ of them. There are $\binom 82$ possible pairs of balls that we can draw on the first draw.

For each possible pair of balls that we draw first, there is a set of $6$ balls remaining to draw from. There are $\binom 62$ possible pairs of balls that can be drawn from this set of $6.$

So, $\binom 82$ possible first pairs, and for each of these, $\binom 62$ possible second pairs, a total of $\binom 82 \binom 62$ equally likely outcomes of the two draws.

We now count how many of those outcomes had $x$ yellow balls in the first pair and $y$ yellow balls among all four balls drawn.

The first draw choose $x$ balls from among the $5$ yellow balls, which can happen in $\binom 5x$ different ways, and the remaining $2-x$ balls from the other $3$ balls, which can happen in $\binom 3{2-x}$ ways.

After drawing those $x$ yellow balls and $2-x$ red balls, we have $5-x$ yellow balls and $1+x$ red balls remaining. We draw $y-x$ yellow balls from the set of $5-x,$ which can happen in $\binom{5-x}{y-x}$ ways. Notice that we now have identified $x + (2-x) + (y-x)$ of the $4$ balls that are drawn; $4 - (x + (2-x) + (y-x)) = 2 + x - y,$ so that is the number of red balls that must be drawn on the second draw. There are $\binom{1+x}{2 + x - y}$ ways to draw that number of red balls from the remaining $1+x$ red balls.

Note that for each way to choose the first $x$ yellow balls, there are the same number of ways to choose the first $2-x$ red balls, and then the same number of ways to choose the next $y-x$ yellow balls, and finally for every way we can get to this point there are the same number of ways to choose the last $2+x-y$ red balls. (Note that we are not choosing from the same set of balls in each case in the last two enumerations of choices, but in each case the number of ways we can get the desired outcome is the same.) The total number of ways to draw $x$ yellow balls on the first draw and $y$ yellow balls total is therefore the product of all the numbers of options we had for each choice: $$ \binom 5x \binom 3{2-x} \binom{5-x}{y-x} \binom{1+x}{2 + x - y}.$$ That is the number of "successful" $(x,y)$ outcomes among the $\binom 82 \binom 62$ equally likely outcomes, so we divide by $\binom 82 \binom 62$ to get the probability.