Expected samples to observe all unique observations

71 Views Asked by At

Suppose I have a bag with: $6$ red balls $4$ blue balls $1$ black ball

If I sample one ball from the bag at a time, with replacement, what is the expected number of samples required before I observe at least one red, blue, and black ball. A similar scenario was described here: Expected time to roll all 1 through 6 on a die However, this scenario assumes the probability of sampling a given side of a die is the same, which is not the case here.

2

There are 2 best solutions below

2
On

For this situation, the possible states may be described as $S_{a,b,c}$ according to which colors have been seen. Here, the triple $(a,b,c)$ considers the colors (red, blue, black) and assigns a $1$ if you have seen the color and a $0$ other wise. Thus $S_{1,0,1}$ refers to the state in which you have seen red and black but not blue. Of course you start in $S_{0,0,0}$ and end in $S_{1,1,1}$.

Warning: What follows should be substantially correct but the arithmetic is messy and error prone, so it should be checked carefully.

We will proceed by backwards induction. Clearly $E\left[S_{1,1,1}\right]=0$.

It is easy to see that $$E\left[S_{1,1,0}\right]=11\quad E\left[S_{1,0,1}\right]=\frac {11}4\quad E\left[S_{0,1,1}\right]=\frac {11}6$$

Let's compute $E\left[S_{1,0,0}\right]$:

From state $S_{1,0,0}$ we see that we stay in that state with probability $\frac 6{11}$, we move to $S_{1,1,0}$ with probability $\frac 4{11}$ and we move to $S_{1,0,1}$ with probability $\frac 1{11}$. It follows that $$E\left[S_{1,0,0}\right]=1+\frac 6{11}\times E\left[S_{1,0,0}\right]+\frac 4{11}\times E\left[S_{1,1,0}\right]+\frac 1{11}\times E\left[S_{1,0,1}\right]$$ $$\implies E\left[S_{1,0,0}\right]=\frac {231}{20}$$

Similarly: $$E\left[S_{0,1,0}\right]=1 +\frac 6{11}\times E\left[S_{1,1,0}\right]+\frac 4{11}\times E\left[S_{0,1,0}\right]+\frac 1{11}\times E\left[S_{0,1,1}\right]$$ $$\implies E\left[S_{0,1,0}\right]=\frac {473}{42}$$

And: $$E\left[S_{0,0,1}\right]=1+\frac 6{11}\times E\left[S_{1,0,1}\right]+\frac 4{11}\times E\left[S_{0,1,1}\right]+\frac 1{11}\times E\left[S_{0,0,1}\right]$$ $$\implies E\left[S_{0,0,1}\right]=\frac {209}{60}$$

Finally we get the desired answer by noting that $$E=E\left[S_{0,0,0}\right]=1+\frac 6{11}\times E\left[S_{1,0,0}\right]+\frac 4{11}\times E\left[S_{0,1,0}\right]+\frac 1{11}\times E\left[S_{0,0,1}\right]=\frac {4919}{420}\approx \boxed {11.7119}$$

0
On

I want to follow up with an additional solution I found on another page which solves my problem. They provide a general functional form for the coupon collector problem.

An explanation is provided here: Expected number of rolling a pair of dice to generate all possible sums