
Originally Posted by
schwartz92
Problem:
Each box of cereal contains one of $\displaystyle n$ different coupons (uniformly at random). Calculate the expectation of the number of boxes bought until at least one of each coupon is obtained.
Solution (from a textbook)
When we have exactly $\displaystyle i-1$ coupons, the probability of obtaining a new one is $\displaystyle p_i=1-\frac{i-1}{n}$. Hence, $\displaystyle X_i=1/p_i=\frac{n}{n-i+1}$, and $\displaystyle E[X]=E\left[\displaystyle\sum_{i=1}^nX_i\right]$.
By linearity of expectations, then, $\displaystyle E[X]=\displaystyle\sum_{i=1}^nE[X_i] = \displaystyle\sum_{i=1}^n\frac{n}{n-i+1}$
And the final step of the solution from the textbook is:
$\displaystyle E[X]=\ldots= \displaystyle\sum_{i=1}^n\frac{n}{n-i+1}=n\,\displaystyle\sum_{i=1}^n\frac{1}{i}$
How do I obtain this last expression? I haven't been able to figure this one out on my own. Not really a statistics question though, feel free to redirect me to another subforum..