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?
 A: 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$.  
