Location: TB Homepage > Puzzles > Game theory and probability > Matching birthdays spoiler

Matching birthdays

Matching birthdays

If we have a group of people, how large does the group have to be before there's a better than evens chance that two of them have the same birthday? "Birthday" here means "day of the year", we assume that all birthdays are equally likely, and we ignore leap years. Call two people with the same birthday a "match". We can ask several such questions:

Q: 1. How many people do we need for the probability of a match to be better than evens?

Q: 2. If we ask the birthdays of a sequence of people, what's the expected number until we find the first match?

Q: 3. If we pick a particular birthday, how many people do we need for the probability that someone is a match with the chosen date to be better than evens?

Q: 4. If we pick a particular birthday and then ask the birthdays of a sequence of people, what's the expected number until we find someone who's a match with the chosen date?

NB Many people (including a professional mathematician in a discussion on Radio 4) confuse Question 1 with Question 2, but they're different questions with different answers.

More generally, consider various other random choices such as thinking of a playing card or picking a lottery ticket, say that we have a match if there are two people that make the same choice, and ask the same questions.

[TB, 24 Jan 2002 and 20 Dec 2018]

A: Let n be the number of possible choices.

 n Question 1 Question 2 Question 3 Question 4
# people # people (2dp) # people # people
Cards in a pack 52 9 9.72 36 52
Birthdays 365 23 24.62 253 365
  1,000 38 40.30 693 1,000
4-digit PINs 10,000 119 126.00 6,932 10,000
  1,000,000 1,178 1,253.98 693,147 1,000,000
UK National Lottery tickets 45,057,474 7,904 8,413.52 31,231,461 45,057,474
Euromillions tickets 139,838,160 13,924 14,821.51 96,928,426 139,838,160
  1,000,000,000 37,234 39,633.94 693,147,200 1,000,000,000

The answers to Question 1, e.g. 23 for birthdays, are much lower than many people expect. Many people's first guess is that this answer is n / 2, i.e. 183 for birthdays, but in fact this is not the answer to any of these four questions. The answer to Question 3 is ln(2) n, approximately, and the answer to Question 4 is just n.

Back to puzzles


This page is maintained by Thomas Bending, and was last modified on 30 December 2018.
Comments, criticisms and suggestions are welcome. Copyright © Thomas Bending 2018.