We are in Beta and we are offering 50% off! Use code BETATESTER at checkout.
You can access a significantly larger sample of the platform's content for free by logging in with your Gmail account. Sign in now to explore.

Red and blue balls

Probability theory Easy Seen in real interview

Assume that there are 100 balls, 70 red and 30 blue.

  1. If you pick 5 with replacement, what’s the probability that all 5 are red?

  2. If you pick 5 without replacement, what’s the probability that all 5 are red?

  3. If you pick 10 without replacement, what’s the probability that 5 are red and 5 are blue?

This question tests combinations with and without permutations.

  1. Since we have repetition, we can essentially estimate the probability through a binomial distribution \(Bin(5,7/10)\):

\[ \Pr(5 \text{ red with repetition}) = \binom{5}{5} (7/10)^5 \approx 0.17 \]

  1. To get all 5 red, initially, we have 70 options, then 69, then 68, etc. To get any 5 balls, the combinations are 100, then 99, then 98. etc. So we can estimate this probability as:

\[ \Pr(5 \text{ red without repetition}) = \frac{70 * 69 * 68 * 67 * 66}{100 * 99 * 98 * 97 * 96} \]

Alternatively, we can use the binomial coefficient as follows:

\[ \Pr(5 \text{ red without repetition}) = \frac{\binom{70}{5}}{\binom{100}{5}} = \frac{\frac{70!}{5!65!}}{\frac{100!}{5! 95!}} = \frac{70 * 69 * 68 * 67 * 66}{100 * 99 * 98 * 97 * 96} \approx 0.16 \]

You can read the second equation as the number of ways I can choose 5 out of 70 reds over the number of ways that I can choose 5 out of 100 balls.

  1. Similar to b, we can estimate this as follows:

\[ \Pr(5 \text{ red without repitition}) = \frac{\binom{70}{5} \binom{30}{5}}{\binom{100}{10}} \approx 0.004 \]

Topics

Counting, Combinations, Repetition, Binomial
Similar questions

Provide feedback