Birthday paradox
The conceptWhy 23 people in a room give a 50% chance of a shared birthday
With only 23 people, the chance that at least two share a birthday is about 50%. Most people guess you would need around 183, half of 365.
The trick is that a match can happen between any two people, not just between you and someone else. 23 people make 23 × 22 / 2 = 253 pairs, and each pair has a 1 in 365 chance of matching.
In general, with m possible values, you only need about √m random picks before a repeat becomes likely. For birthdays, √365 is about 19.
What it’s forEstimates the chance that at least two of n random picks from m equally likely values are the same.
p ≈ 1 − e^(−n(n−1) / 2m)
- p
- chance of at least one repeat
- n
- number of picks, e.g. people in the room
- m
- number of possible values, e.g. 365 birthdays
- n(n−1)/2
- number of pairs that could match
What it givesThe chance of a collision. It reaches 50% when n is about 1.18 × √m.
- n = 23, m = 365: 23 × 22 = 506, and 506 / 730 ≈ 0.693
- e^(−0.693) ≈ 0.5
- p ≈ 1 − 0.5 = 0.5, about a 50% chance