[Math] Expected Value Of Number of Removals From Urn

probabilitystatistics

Here's the question: "An urn contains b blue balls and r red balls. You repeatedly and independently remove balls from urn (without returning them) until the first blue ball is drawn. All balls currently in the urn have an equal probability of being selected each time a ball is removed. Define the random variable X as the number of balls that are drawn (number of red balls that are removed plus the first blue ball that is removed). Find E[X], the expected value of random variable X."

I'm having trouble finding a closed form expression for the expected value. Here's the work I've done:

Here's the work I've done so far

Best Answer

You are on the right path in solving the problem, however, there is a nice technique for evading the calculations, which is finding the expected value using indicator functions.

First, number the red balls from $1$ to $r$ and define $X_i$ to be the function indicating whether ball number $i$ is drawn before the first blue ball or not. So $X_i$ is $1$ if the i'th ball is drawn before the first blue ball and zero otherwise.

Now, it is easy to see that $X$ is the sum of indicators, i.e. $$X = 1 + \sum_{i=1}^r X_i $$

so the expected value of both sides are equal, and using the expected of the sum property and the symmetry between $\mathbb{E}[X_i]'s$, we get:

$$\mathbb{E}[X] = 1 + \sum_{i=1}^r \mathbb{E} [X_i] = 1 + r\mathbb{E}[X_1] = 1 + r\mathbb{P}[X_1] $$

the problem now boils down to finding the probability that the first red ball is drawn before the first blue ball, which is just $\frac{1}{b+1}$, since out of b+1 different ways of putting 1 red ball and b blue balls next to each other, only the one which the first red ball comes first is valid. you can then arrange other red balls where ever you want.

Finally, the expected value is given by:

$$\mathbb{E}[X] = 1 + \frac{r}{b+1} $$