# Expectation of number of trials before success in an urn problem without replacement

An urn contains b blue balls ,r red balls and y yellow balls. Balls (red and yellow) are removed at random without replacement until the first blue ball is drawn. What is the expectation of the total number of balls drawn?

Number the red and yellow balls from $1$ to $n$, where $n=r+y$. Don't bother to number the blue balls.

Let $X_i=1$ if the $i$-th numbered ball is drawn before any blue ball, and let $X_i=0$ otherwise. Then the total number of draws is $1+(X_1+\cdots+X_n)$. It follows that the expected number of draws is $$1+E(X_1+\cdots+X_n).$$ By the linearity of expectation, this is $$1+E(X_1)+\cdots +E(X_n).$$ All the $X_i$ have the same expectation. so let us find $E(X_1)$.

The probability that ball with label $1$ comes before any blue ball is $\frac{1}{b+1}$. This is because all orderings of ball $1$ and the blue balls are equally likely. So $E(X_1)=\frac{1}{b+1}$.

It follows that the number of draws has mean $$1+\frac{n}{b+1}.$$

Remark: We used the powerful tool of indicator random variables. One can alternately find the probability distribution of the number of draws, and then find the mean by using the standard formula, and a manipulation of binomial coefficients. That is substantially more messy. It is useful to know that in many cases the expectation of a random variable $Y$ can be computed without explicit knowledge of the probability distribution function of $Y$.

• Thank you André. I would like to know if you meant n=r+y instead? Commented Jan 14, 2013 at 17:46
• @user56962: Indeed I do! Thanks for noticing. Fixed. Commented Jan 14, 2013 at 17:48
• A total of 6 objects hide the following values: 5 cents, 10 cents, 25 cents, 50 cents, 1 chain-reaction object to discover 2 objects and 1 chain-reaction object to discover ALL objects. The player is awarded 3 picks (or untill ALL object is selected, awarding all numeric values). The chain-reaction object randomly pick 2 additional objects. What is the expectation of the total number of objects picked? Commented Jan 24, 2013 at 18:46