TITLE: Expected number of unique items when drawing with replacement
QUESTION [16 upvotes]: Having a set of size M, I'm drawing M items with replacement. What is expected number of unique items that got picked?
Thanks,
Jarek

REPLY [13 votes]: Thanks for great answer Mike!
I just would like to add that if someone is interested in percent of picked items, then
$$
\frac{M - \frac{(M-1)^M}{M^{M-1}}}{M} = \frac{M - M\left(\frac{M-1}{M} \right)^M}{M} = 1 - \left(1 - \frac{1}{M} \right )^M
$$
For large M it is approximately 
$$
1 - \frac{1}{e} \simeq 0.632120559 \dots
$$ 
because
$$
\lim_{M\to\infty}\left(1 - \frac{1}{M} \right )^M = \frac{1}{e}
$$