1

In a bag, there is 1 black, 2 red, 2 blue, 2 green, 2 yellow, 2 orange, and 8 white balls. A "pull" refers to taking 1 ball out of the bag, noting its colour, then replacing it.

What is the expected number of pulls needed so that you will have pulled at least one ball of each colour?

  • Expectation = Population (19 balls) / Sample – Joseph Eck Jul 04 '19 at 11:46
  • 2
    What have you tried? Where do you get stuck? If you don’t know how to start, can you solve a simplified version of the question first? – Steve Kass Jul 04 '19 at 11:46
  • 1
    Suppose you have drawn all but a single color. Can you compute the expected number of draws it will take to get that last color? – lulu Jul 04 '19 at 11:46
  • Would it be 1/(the average probability of drawing each colour)? – battletwink69 Jul 04 '19 at 11:50
  • Right. So, now work recursively. It's fairly messy, but perfectly doable. – lulu Jul 04 '19 at 11:53
  • I'm not sure I understand the next step. Working backwards, I seem to get as the expectation at each step to be 7/1 + 7/2 + 7/3 + ... + 7/1 = 18.15, which cannot be correct. – battletwink69 Jul 04 '19 at 12:04
  • I think this is a variation on the Coupon Collector's Problem: https://en.wikipedia.org/wiki/Coupon_collector%27s_problem – Matti P. Jul 04 '19 at 12:07
  • You have to consider the possible states of the game. At any point, you will have seen some colors but not others. Thus a state can be described by a binary $7-$vector. The vector $(1,0,1,1,0,1,0)$ for example would mean that you had seen black, blue, green, and orange. Write down the possible transitions between states and solve the linear system. Not a bad computation if you can program it. – lulu Jul 04 '19 at 12:13
  • Using the formula described in the Coupon Collector's Problem, I also get the result 18.15. But how can it take an average of 18.15 pulls if there exists a ball with a rate of 1/19? – battletwink69 Jul 04 '19 at 12:14
  • The straight Coupon Collector problem does not apply. That formula assumes you have an equal chance of drawing any coupon which is not the situation you have. Of course, people have studied variants of the problem. – lulu Jul 04 '19 at 12:31

1 Answers1

0

One approach starts with finding the exponential generating function of the probability that we have a complete set of colors after $n$ draws. If you are not familiar with generating functions, you might find it useful to read the answers to this question: How Can I Learn About Generating Functions?

Let's say that $p_n$ is the probability that we have a complete set of colors after $n$ draws (not necessarily the least such $n$). Then the exponential generating function of $p_n$ is $$g(x) = \left( \frac{1}{19} x + \frac{1}{2!} \frac{1}{19^2} x^2 + \frac{1}{3!} \frac{1}{19^3} x^3 + \dots \right) \cdot \\ \left( \frac{1}{19} 2x + \frac{1}{2!} \frac{2^2}{19^2} x^2 + \frac{1}{3!} \frac{2^3}{19^3} x^3 + \dots \right)^5 \cdot \\ \left( \frac{1}{19} 8x + \frac{1}{2!} \frac{8^2}{19^2} x^2 + \frac{1}{3!} \frac{8^3}{19^3} x^3 + \dots \right) $$ so $$g(x) = (e^{x/19}-1)(e^{2x/19}-1)^5 (e^{8x/19}-1)$$

If we would like to know the exponential generating function of $q_n = 1 - p_n$, which is the probability that we do not have a complete set of colors after $n$ draws, its EGF is simply $$h(x) = e^x - g(x)$$ Suppose $T$ is the number of the first draw when we have a complete set of colors. Then $$E(T) = \sum_{n=0}^{\infty} P(T>n)$$ (an identity which is true for any discrete random variable $T$ which takes on only non-negative values), so $$E(T) = \sum_{n=0}^{\infty} q_n$$ Now we can take advantage of $h(x) = \sum_{n=0}^{\infty} \frac{1}{n!} q_n x^n$ and the identity $n! = \int_{0}^{\infty} x^n e^{-x} \; dx$ to show $$E(T) = \int_0^{\infty} e^{-x} h(x) \; dx$$ Evaluation of the integral results in $E(T) = \boxed{28.7176}$.

awkward
  • 14,736
  • Thank you very much for your comprehensive answer, I now understand the method fully. I also want you to know how much I appreciate people like you, who don't intentionally withhold information under the presumption that I'm a student trying to learn, or that solving the problem myself is the best way to learn. So, cheers for taking the time to help me for free dude. – battletwink69 Jul 05 '19 at 11:31