The probability of getting at least 5 balls of the same color from a uniformly distributed set of size 126 with red, blue and white balls

1.8k Views Asked by At

I am trying to calculate the following problem:

  • I have a uniformly distributed set consisting of red, blue and white balls. This set contains a total of 126 balls, thus there are 42 (${126 \over 3}$) balls of each color.
  • I will draw 7 balls.

What is the probability of me getting at least 5 balls of the same color?

What I'm trying to do is:

Calculate the odds of me drawing 5, 6 and 7 of each ball color and then adding them together. Something like this:

$$ P(5 \geqslant \text{Same colored balls}) = P(5 \geqslant \text{Red balls}) + P(5 \geqslant \text{Blue balls}) + P(5 \geqslant \text{White balls}) \\ P(5 \geqslant \text{Red balls}) = P(5\text{ Red balls}) + P(6 \text { Red balls}) + P(7 \text{ Red balls}) \\ P(X \text{ Red balls}) = \binom{7}{X} * {1 \over 42}^X * {41 \over 42}^{7-X} \\ P(X \geqslant \text{ Red balls}) = \sum_{Y=X}^{7} \binom{7}{Y} * {1 \over 42}^Y * {41 \over 42}^{7-Y} $$

Calculating this gives me:

$$ P(5 \geqslant \text{Red balls}) = \sum_{Y=5}^{7} \binom{7}{Y} * {1 \over 42}^Y * {41 \over 42}^{7-Y} \approx 1.5 * 10^{-7} \\ P(5 \geqslant \text{Red balls}) + P(5 \geqslant \text{Blue balls}) + P(5 \geqslant \text{White balls}) \approx 4.5 * 10^{-7} $$

Is this correct? My probability is a bit rusty.

My actual problem relates to calculating probability in to many hash collision using open addressing if someone is interested in that.

Thanks in advance.

1

There are 1 best solutions below

7
On BEST ANSWER

I interpret the problem as saying we are drawing without replacement. Imagine all the balls have ID numbers.

There are $\binom{126}{7}$ equally likely ways to draw a "hand" of $7$ balls. How many have $5$ red? The reds can be chosen in $\binom{42}{5}$ ways, and the other $2$ in $\binom{84}{2}$ ways, for a total of $\binom{42}{5}\binom{84}{2}$. We have similar expressions for the probability of $6$ red, $7$ red. So the probability of $5$ or more red is $$\frac{\binom{42}{5}\binom{84}{2}+\binom{42}{6}\binom{84}{1}+\binom{42}{7}\binom{84}{0}}{\binom{126}{7}}.$$

For the probability of $5$ or more of the same colour, multiply by $3$.

Remark: If we are drawing with replacement, then for example the probability of $5$ red is $\binom{7}{5}(42/126)^5(84/126)^2$, with similar expressions for the probability of $6$ red, $7$ red.

Since $7$ is quite a bit smaller than $42$, the answer we get by assuming replacement is quite close to the answer we get by assuming no replacement. And if we had for example $900$ balls, and drew $7$, then the probabilities with replacement and without are for all practical purposes the same.