Birthday problem

Topic of Random experiments and probability, part of Probability

Birthday problem

Type Topic
Taught in Random experiments and probability
Part Probability
Worked examples 1

With n people and 365 equally likely, independent birthdays, the probability that at least two share a birthday is 1-\prod_{k=0}^{n-1}(365-k)/365. It first exceeds 1/2 at n=23: there are \binom{23}{2}=253 pairs, each a chance of a match.

Examples

The birthday problem

A group has n people. Ignore leap days and assume each birthday is equally likely to be any of 365 days, independently.

Question. What is the probability that at least two people share a birthday?

Solution. The birthday count is the second row of the table against the first. The probability that all birthdays differ is

\frac{365\times 364\times\cdots\times(365-n+1)}{365^n},

provided n\le 365, and zero otherwise. The numerator is the number of injective assignments of days, and the denominator is the number of assignments with replacement. The probability of a shared birthday is one minus this. It passes one half at n=23, where it is 0.507, and reaches 0.891 at n=40 and 0.970 at n=50.

The surprise comes from counting the wrong thing. 23 people seem few against 365 days, but they form \binom{23}{2}=253 pairs, and any one of those pairs can match.

Used in

See also

Sample space · Event · Probability measure · Properties of a probability · Equally likely outcomes · Four ways of counting draws · Conditional probability · Product rule

Glossary and index