|

What’s the probability that in a room of n people, at least two have the same birthday? It’s higher than you think.

Let $$p(n)$$ be the probability of at least two people having the same birthday. We’ll find $$\overline{p}(n)$$, the probability that no two people share the same birthday. $$p(n) = 1 - \overline{p}(n)$$.

\begin{aligned} \overline{p}(n) &= 1 \cdot (1 - \frac{1}{365}) \cdot (1 - \frac{2}{365}) \cdot \cdots \cdot (1 - \frac{n - 1}{365}) \ &= \frac{365 \cdot 364 \cdot \cdots \cdot (365 - n + 1)}{365n}\ &= \frac{365!}{365n(365 - n)!}\ &= \frac{n! \cdot {365 \choose n}}{365n} \end{aligned}

So $$p(n) = 1 - \frac{n! \cdot {365 \choose n}}{365n}$$. The table below shows that we have more than a 50% chance when there are just 23 people. When n = 100, it’s almost certain to have two people sharing the same birthday.

n p(n)
10 11.7%
20 41.1%
23 50.7%
30 70.6%
50 97.0%
57 99.0%
100 99.99997%
200 99.9999999999999999999999999998%
300 (100 − (6×10−80))%
350 (100 − (3×10−129))%
365 (100 − (1.45×10−155))%
366 100%