Imagine you are in a class with about 30 kids. Someone says, “I bet you 10 dollars 2 people here share a birthday.”
Skeptical, you decide to do some quick mental math. There are 365 days in a year and only 30 kids in the room. 30/365 is less than 10%, so you confidently take them up on their bet.
Then you start asking people.
By the time the 18th kid answers, someone interrupts: “December 4th? That’s my birthday too.” It feels like a coincidence. The math proves it's not.
Turns out that if you pick 23 random people, there is around 50% that at least 2 of them share a birthday. With 50 people, the number is greater than 97%. But why is this? Before we can start calculating, we need to clarify some givens. We know that there are 365 possible birthdays and that everyone's birthday is independent. However, we also need to assume some things to simplify the experiment. We assume that there are no leap days and that the sample of people is truly random, meaning that each day has an equal chance. Now we can figure this counterintuitive problem, referred to as the birthday paradox in classic mathematics, out.
Now then, how do we actually go about this? Well, we quickly see that it is very hard to calculate the probability of 2 people having the same birthday, so we instead attempt to calculate the probability that 2 people do not have the same birthday and then subtract it from 1.
The first person we pick can have any birthday, so 365 out of 365 options. The next person must have a different birthday, so 364/365 options. The person after that must have a different birthday from the other 2, so 363/365. This pattern continues until you run out of people.
So for n people:
P(all different)= 365/365364/365...(365-n+1)/365
A table for certain values of n is shown below:
n | Probability of one shared birthday
10 | 11.7%
20 | 41.1%
23 | 50.7%
30 | 70.6%
50 | 97.0%
So, why is our intuition so off here? Well, when most people see this problem, they probably compare the number of people in the group and the 365 days of the year and inadvertently try to match a person to a single date. In reality, the birthday paradox is about any pair of people matching. When we look at the total number of distinct pairs in a group of n people, it becomes much more apparent why the probability is much higher than it seems.
In a group of n people, the number of distinct pairs are:
nC2= n(n-1)/2
For n = 23, there are 253 pairs. Each one of these has a chance of having the same birthday.
Shared birthdays
50.7% chance of a match0 people share a birthday in this group
So, why not try it? The next time you are in a big room, try asking around to see if any two people share a birthday. If the group is large enough, chances are someone does!
