Probability of k different balls from urn An urn has $m$ balls, and I pick $n$ out, one at a time with replacement. I know from Expected number of unique items when drawing with replacement how to find the expected number of different balls picked. How would I find the probability that I picked exactly $k$ different balls?

First we need to know how many sets of $k$ different balls there are. That would be $$\binom{m}{k}\mathrm{.}$$
Next we need to find the number of ways to partition the set of $n$ elements into $k$ ordered nonempty subsets. This is given by the Stirling number of the second kind $S(n,k)$ times $k!$. Assume that the balls were numbered $1$ through $m$ in advance. To the first subset we assign the ball with the smallest number, to the second we assign the next smallest, etc. So the number of choices is
$$\binom{m}{k}k!S(n,k)=\frac{m!}{(m-k)!}S(n,k)$$
Divide this by $m^n$ to get the probability.
