# Probability of all ball colors drawn with replacement?

Suppose there are $x$ colors of balls, $1$ ball for each color ($x$ total balls), you draw a ball $n$ times with replacement (putting back the ball you'd just drawn). What is probability that you draw each color of balls at least once?

My guess was: $$P(x,n)= \frac{C(n-1,n-x)}{C(x+n-1,n)}$$ I thought it was correct because $P(x,n<x)=0$ and $\lim_{n \to \infty} P(x,n)=1$. But $P(10,10) \neq \frac{10!}{10^{10}}$, which I think is the probability at $x=n=10$.

• Welcome to MathSE. Please read this tutorial on how to typeset mathematics on this site. – N. F. Taussig Sep 16 '17 at 10:13
• I would've thought that the denominator would be $x^n$? – iamwhoiam Sep 16 '17 at 10:41
• You need inclusion - exclusion principle. The number of ways in which one color is missing is $(x-1)^n$, two colors missing is $(x-2)^n$ and so on. Thus the probability is $\left(x^n - \binom{x}{1}(x-1)^n + \cdots \right)/x^n$ – user348749 Sep 16 '17 at 11:44
• This is the "Coupon Collector's Problem": en.wikipedia.org/wiki/Coupon_collector%27s_problem – awkward Sep 16 '17 at 12:30
• @Muralidharan: I personally get a negative value when plugging in x=n=10, would you look into it? – Germaniac Sep 17 '17 at 0:56