Number of collected coupons until duplicate?

38 Views Asked by At

I'm trying to determine the expected number of coupons drawn until you get a duplicate.

So far I've derived the probability of getting a duplicate on the ${k^{th}}$ draw of ${N}$. You have $k-1$ draws that are unique times where the product of those probabilities is $\frac{N!}{(N-k+1)!N^{k-1}}$, which is then multiplied by the probability of getting a coupon in the first $k-1$ draws which is $\frac{k-1}{N}$. This leads to the following, which is the probability of getting at least one matching pair:

$$\frac{(k-1)N!}{(N-k+1)!N^{k}}$$

To find the expected value, we multiply each probability by $k$ and sum them, where there are $N+1$ possibilities in the case where each coupon is unique so you have to draw one more coupon. This leads to the following sum:

$$E(k)=\sum_{k=1}^{N+1}\frac{k(k-1)N!}{(N-k+1)!N^k}$$

At this point I'm not sure how further I can simplify this. With Stirling's approximation I've gotten it in a form shown below:

$$E(k)\approx\sum_{k=1}^{N+1}\frac{k(k-1)N^{N-k}e^{1-k}}{{(N-k+1)}^{N-k+1}}$$

I'm not sure if this is valid for low/high numbers of draws. I would like to calculate this numerically in MATLAB for $N\approx30$, though the factorials in the 2nd equation make it difficult. Any suggestions for simplification/approximation?