Chance that a group of $n$ people collectively have a missing birthday.

76 Views Asked by At

Suppose there is a city with $n$ residents, what is the probability that there is some day in the year at which none of them have their birthday?

In other words, suppose we divide $n$ balls into $k=365$ (no leap year exceptions) boxes, what is the probability that there is some empty box?

From some references similar to this one I derived that this probability can be approximated by: $$1 - \frac{k! S(n, k)}{k^n}.$$ Where $S(n,k)$ denote the Stirling number of the second kind. This formula is close to some brute force approximations so I figured it is correct. However, with $n=5000$ and $k=365$ the probability came out negative, which does not seem right.

Does anyone know the true probability for this problem and/or a way to calculate it? Or can anyone give me a hint to where I went wrong?

1

There are 1 best solutions below

0
On

@MikeEarnest was totally right!!

I computed the value for $S(n,k)$ using the method from the link I provided, however they do not provide the correct method for computing Stirling numbers.

Using a correct method to calculate Stirling numbers of the second kind I indeed get positive probabilities. I assume that these probabilities are correct since they are close to my brute forced answers.

In conclusion, the formula I gave above is correct.