[Math] Picking balls from a bag until there are three of same color

probability

A bag contains $20$ balls:

  • $3$ Blue
  • $4$ Purple
  • $5$ Orange
  • $8$ Green

You are allowed to pick balls until you have three the same colour eg (3 – 9 picks ) No balls are replaced until a new round is begun. What is the probability of getting each colour on each round.

$3$ Blue,
$3$ Purple,
$3$ Orange,
$3$ Green.


Clarification: Each "round" you pick until you have three the same, this can take of course between 3 – 9 picks. From picking three the same in three picks to picking 2 the same during your first 8 picks in any order and the 9th would give you a 3 of a kind. I want to work out the total expected probability for each round eg 5% chance of blue 10% purple 25% orange 60% green If someone can help work out one colour I should be able to do the other 3.

I seem to be struggling with the fact that, until the $3$rd ball, the order isn't important.

What I did for 1 of the 27 ways of getting blue for example was
$$\frac{\binom{3}{3}\binom{4}{2}\binom{5}{2}\binom{8}{2}}{\binom{20}{9} \binom{9}{1}} = 0.001111376$$

Best Answer

There may be a more elegant way than this, but here's one way.

First, write down all of the color distributions that are not terminating, but could terminate on the next draw. This means that you need to have drawn at least one color twice. I'll designate the colors $1-4$ and not worry about order:

  • $2$ balls: $11$
  • $3$ balls: $112$
  • $4$ balls: $1122, 1123$
  • $5$ balls: $11223, 11234$
  • $6$ balls: $112233, 112234$
  • $7$ balls: $1122334$
  • $8$ balls: $11223344$

Next, for each of these color distributions, calculate the number of ways to arrange the digits. This can be done with multinomials. For example, the number of ways to arrange $11223$ is $$\frac{5!}{2!2!1!} = 30.$$

Next, observe that, for a given set of colors, the probability of drawing those colors is independent of the order. For example,

$$BBGGP = \frac{3}{20} \frac{2}{19} \frac{8}{18} \frac{7}{17} \frac{4}{16},$$

but

$$PGBGB = \frac{4}{20} \frac{8}{19} \frac{3}{18} \frac{7}{17} \frac{2}{16},$$

which is exactly the same value. All that happened was that the numerators got rearranged.

Now comes the somewhat tedious part, which is to calculate the individual probabilities for each substitution of colors. We can at least be a little smart about it, and calculate the numerator part for each color:

$$B = 3, BB = 6, P = 4, PP = 12, O = 5, OO=20, G = 8, GG = 56.$$

Let's do the case for drawing three blue balls, and drawing the blue on the fifth ball. We assign $BB$ to $11$ in the combination, and then write down all the others: $$BBPP, BBOO, BBGG, BBPO, BBPG, BBOG.$$

(The first three are $1122$ types, and the last three are $1123$ types.)

To calculate the probability of getting each one of these, we multiply the probability of getting them in the stated order with the number of ways to rearrange them. So,

$$P(BBPP) = \frac{6 \cdot 12}{20 \cdot 19 \cdot 18 \cdot 17}\cdot \frac{4!}{2!2!}.$$

Now, to find the probability of ending on the next turn with blue, given that you have two blues and two purples (drawn in any order), multiply by $1/16$.

Then it's just a lot of rinse/repeat. Do the same calculation for the rest of the four-ball colors. Then do all of the other numbers of balls, for all of the applicable color combinations each time.

And that's just the first part of a four-part problem!

You can possibly reuse some of the calculations you did before if you keep track.

Related Question