2

A tunnel has 6 red, 3 green, 10 blue balls lined up in a random sequence. Balls starts falling from one end one by one in each second. What the expected time of first blue ball falling?

I tried thinking in terms of linearity of expectation, but couldn't formulate it.

I tried calculating it in this way:

$$1* \frac{10}{19} + 2*(1-\frac{10}{19})*\frac{10}{18} + 3* (1-\frac{10}{19})*(1-\frac{10}{18})*(\frac{10}{17}) + 4*....$$

Can someone provide a better way to do it? Would be great if it is uses linearity of expectation.

Thank you.

cheems
  • 275

4 Answers4

2

Here's a method to solve the problem. I am not sure how to use linearity, but this seems straightforward.

Suppose you have $b$ blue balls and $r$ other balls. The $$\mathbb P(1\text{st blue ball in the $n$th step})=\mathbb P(\text{other balls in the first $n-1$ steps})\mathbb P(\text{blue ball in the $n$th step})$$

Now \begin{align*} P(\text{other balls in the first $n-1$ steps})&=\left(\frac{r}{b+r}\right)\left(\frac{r-1}{b+r-1}\right)\cdots\left(\frac{r-n+2}{b+r-n+2}\right)\\&=\frac{r!}{(r-n+1)!}\frac{(b+r-n+1)!}{(b+r)!} \end{align*}

and

$$\mathbb P(\text{blue ball in the $n$th step})=\frac{b}{b+r-n+1}$$

Putting things together, we have

$$P(\text{blue ball in the $n$th step})=b\frac{r!}{(r-n+1)!}\frac{(b+r-n)!}{(b+r)!}=b\frac{^rP_{n-1}}{^{b+r}P_n}$$

Let the expectation be written in the notation $$\mathbb E(b,r):=\mathbb E[\text{step when $1$st blue ball}]$$

Then $$\mathbb E(b,r)=\sum_{n=1}^{r+1}nb\frac{^rP_{n-1}}{^{b+r}P_n}=b\sum_{i=1}^{r+1}\frac{\binom{r}{n-1}}{\binom{b+r}{n}}=b\frac{b+r+1}{b(b+1)}=\frac{b+r+1}{b+1}=1+\frac{r}{b+1}$$

where I shamelessly plugged in the value Wolfram tells me for the sum (I will try and see how to derive the sum).

For your case, this reduces to $\mathbb E(10,9)=1+\frac{9}{11}=\frac{20}{11}$.


Sorry I couldn't edit the answer quicker, I had to run to attend a talk. The answer was extremely suggestive, and was at the back of my mind the whole talk. The $1$ clearly comes from the step of taking out the blue ball. Then what of the term $\frac{r}{b+1}$? It can be written in the form $$\frac{r}{b+1}=\sum_{i=1}^r\frac{1}{b+1}$$ so the burning question was, is there a random variable whose expectation is $\frac{1}{b+1}$? But that looked like a probability, so I was thinking maybe some indicator random variable could work since probabilities and expectations are the same for them. Then, we need to find a indicator random variable $I_j$ such that $\mathbb P(I_j=1)=\frac{1}{b+1}$ and $1\le j\le r$. Once you notice that $b+1$ is the number of blue balls and a red ball, things fall into place instantly.

Enough for motivations, let's get our hands dirty. Tag all the red balls with numbers from $1$ to $r$. Let $$I_j=\begin{cases}1,\ \text{if the red ball numbered $j$ is drawn before any blue ball}\\0,\ \text{otherwise}\end{cases}$$

Then what is $\mathbb P(I_j=1)$? I claim it's just $\frac{1}{b+1}$. Why? Suppose you draw the red ball labelled $j$. It could have been drawn before the first blue ball, after the first blue ball, after the second blue ball etc. Out of this, only the first case is favourable, and there are a total of $b+1$ cases. Thus the reuslt. Then $$\mathbb E[I_j=1]=\frac{1}{b+1}$$

Let $X$ be the random variable that counts the number of steps when the first blue ball appeared. We require $\mathbb E[X]$. Note that $X-1=\sum_{j=1}^r I_j$ since the indicator variables are exactly $1$ when there has not been a blue ball yet and a red ball has been pulled, and we need excatly $X-1$ red balls. Hence $$\mathbb E[X]=\mathbb E\left[1+\sum_{j=1}^rI_j\right]=1+\sum_{j=1}^r\mathbb E[I_j]=1+\frac{r}{b+1}$$

and we are done.

HackR
  • 1,760
  • +1, But I was looking for less calculative and answer similar to @true blue anil – cheems Oct 20 '22 at 10:17
  • @cheems Sorry I was away for a while, but I edited the answer to add some things. It seems like the same method as anil's now that I read that answer. – HackR Oct 20 '22 at 12:45
2

Consider the 9 non-red balls as "other" balls, and consider the $i^{th}$ "other" ball in conjunction with all the blue balls

Let X_i be an indicator variable that equals 1 if an "other" ball comes before the first blue ball, and 0 otherwise.

Since all "other" balls are equally likely to be before the first blue ball, $P(X_i) = \frac 1{11}$

The expectation of an indicator variable is just the probability of the event it indicates, so ,$E(X_i) = \frac 1{11}$,

And by linearity of expectation which applies even if the variables are not independent, E(X) =$\frac 9{11}$

So the first blue ball is expected to come at $1+\frac9{11}$

1

Given $r$ red, $b$ blue, $g$ green balls let the expected time of first blue ball falling be $E(r,b,g)$. Then,

$E(r,b,g) = \frac{b}{r+b+g}(1) + \frac{r}{r+b+g}(1+E(r-1,b,g)) + \frac{g}{r+b+g}(1+E(r,b,g-1))$.

There, is no need to differentiate between red and green balls, we only care about blue ball. Given $b$ blue balls $m$ balls not blue the expected time of first blue ball $E(m,b)$ is,

$E(m,b) = \frac{b}{m+b} + \frac{m}{m+b}(1+E(m-1,b))$

Simulating $E(6,10,3)$ or $E(9,10)$ gives $1.818$

gorgon
  • 11
0

You can ignore the distinction between red and green, and instead say there are $10$ blue balls and $9$ other balls before, between or after the blue balls (i.e. $11$ equally likely gaps for the other balls).

Since there are $11$ gaps and $9$ other balls to put in them, the expected number of other balls in any particular gap, including the one before the first blue ball, is $\frac{9}{11}$. The actual distribution in a particular gap is binomial with parameters $n=9$ and $p=\frac1{11}$, but you do not need this.

Add the first blue ball itself and its expected location is $1+\frac9{11}=\frac{20}{11}$.

Henry
  • 157,058