How to actually calculate the probability to have extracted each one of $n$ balls at least once after $k$ turns?

249 Views Asked by At

I have a bowl of $n$ balls numbered $1$ to $n$. I will perform $k$ extractions (with immediate replacement into the bowl after extraction). I want to calculate the probability to have extracted each ball at least once after those $k$ turns.

With inclusion/exclusion principle from Probability to see all 6 numbers on a die after n throws for example, I arrived at:

$$P(n, k) = \sum_{i=1}^{n} (-1)^{n-i} \binom{n}{i} i^k \frac{1}{n^{k}}$$

But this takes forever to calculate for something like $n=50$, $k=1000$. Can I further simplify this equation? Is the equation even correct?

1

There are 1 best solutions below

0
On

Your formula is correct. It can't be further simplified, except perhaps by expressing it in terms of the Stirling numbers of the second kind:

$$ \def\stir#1#2{\left\{#1\atop#2\right\}} P(n,k)=\frac{k!}{n^k}\stir kn\;. $$

There are other ways to calculate this probability (for instance by keeping track of the probability distribution over the number of distinct balls seen and updating it $k$ times), but I'd be surprised if any of them took less than the $O(kn)$ steps that evaluating your equation takes.