# What is probability that a sample covers all classes?

Suppose:

1. there are $n$ distinct classes in a population (i.e. each member of the population is a member of exactly one class),
2. (For simplicity) the classes are all equally sized and the probability of selecting (with replacement) a member from any one class is $1/n$.
3. $x$ samples are taken (with replacement) where $x \ge n$.

What is the probability $p(x,n)$ that each class is represented by at least one of the samples?

What I've tried: special case $$p(n,n) = \frac{n!}{n^n}.$$ e.g. $$p(6,6) = \frac{6!}{6^6} = \frac{6}{6} \times \frac{5}{6} \times ... \times \frac{2}{6} \times \frac{1}{6}.$$

The 6 distinct classes could be the faces 1,2, .. , 6 on a fair die. $p(6,6)$ is the probability that when the die is rolled 6 times, no faces come up twice. Any face is OK for the first roll, then 5 faces, then 4, ...