The Birthday Problem
In 1939, a mathematician named Richard von Mises proposed what we call today the birthday problem. He asked: How many people must be in a room before the probability that two share a birthday is at least 50%? He only considered the month and day, and not the year, of a person s birthday. 2
This question is only interested in whether or not there is a match; if there are 3 or more people with the same birthday, or more than 1 pair of people with the same birthday, that does not matter. 3
Is there a match in our class? Let s check by having each person say their birthday and see if there is a match. Does this particular experiment give us an idea of the probability of having a match? 4
In order to get an idea about this problem, we either need to find a way to calculate the theoretical probability, or gather some experimental data. There is a formula for the theoretical probability (which we will see); however, we will focus on experimental data. 5
The course website has an excel spreadsheet which simulates the problem. However, there is a website which does the same thing, and is a little easier to use. Its address is www.mste.uiuc.edu/reese/birthday/ 6
To start, we make the assumption that each day is just as likely as another to be a birthday. We also ignore leap years. The probability of a given day is a person s birthday is then 1/365, since there are 365 possible birthdays. 7
Ignoring leap years simplifies the problem, and shouldn t affect the probabilities very much. The assumption that each day is just as likely to be a birthday is probably a fair assumption. I do not know how accurate it is. I suspect it does not affect the answer to the birthday problem very much. 8
We will use the webpage to estimate some probabilities. First of all, if you enter a number to represent the number of people in a room, it will randomly select that many birthdays, check to see if there is a match, and calculate an experimental probability. This is one trial. The website can do one trial at a time or 100 trials by one click of a button. 9
If it runs multiple trials, it calculates the experimental probability by taking the number of trials in which there is a birthday match and divides it by the total number of trials. So, an experimental probability of.5 means that half of all the trials had matches. 10
Before starting, what do you think the probability is that two players on an NFL team have the same birthday? NFL teams have aroung 60-70 players. You can find team rosters at nfl.com. 11
Before starting, what do you think the probability is that two players on an NFL team have the same birthday? NFL teams have aroung 60-70 players. You can find team rosters at nfl.com. Two years ago I had a class check each team. They found that there was a birthday match on every team! 12
We will first do some simulations for rooms of 20, 30, and 60 people to get an idea about the answer to the birthday problem. 13
I ran simulations over the weekend to get the data in the following table. This data will not be exactly the same as what we get today; that is the nature of experimental data. However, if the number of trials is large for this problem, then we should get similar data today. 14
The simulations from the website, by running 1000 trials for each number, indicates that the probabilities of a birthday match among a group of m people are approximately as follows. m approximate probability of a match 20 0.41 30 0.68 60 0.99 15
This data indicates that the number needed to have a probability of 50% of a match is somewhere between 20 and 30. 16
By doing some more simulations, we have estimates for the probability of a match among m people in the following table. m approximate probability of a match 22 0.46 23 0.48 24 0.53 25 0.56 17
This indicates that to have a probability of 50% that two people in a room will have the same birthday, the room needs 23 or 24 people. This is far smaller than what most people s intuition would say. 18
What are the theoretical probabilities for the birthday problem?
While the theoretical probability is not so easy to determine, we will see the formula and some ideas about how to find it. First, it turns out to be more direct to calculate, for a group of people, what is the probability that there is NO birthday match. If we find this probability, then subtracting it from 1 gives the probability of a match. 20
If there are 2 people, the probability that the second person doesn t have the same birthday as the first is 364/365. This is because of the 365 possible birthdays, 364 of the days represent not sharing the birthday of the first person. 21
If there are 3 people, and assuming the first two do not share a birthday, then the probability that the third person doesn t share a birthday with the first two is 363/365. This is because of the 365 possible birthdays, 363 are neither the birthday of the first or the second person. 22
If we recall the formula for conditional probability, then the probability that there is not a common birthday among three people is probability of no common birthday = probability of no common birthday among the first two * probability the third doesn t share a birthday given the first two do not share a birthday. 23
This is equal to 364/365 * 363/365. If one continues with this type of reasoning, for m people, the probability that there is not a common birthday is 364/365 * 363/365 * 362/365 *... * (365-m+1)/365 24
If the room has m people, this formula can be written as 365Pm / 365 m The term 365Pm is related to binomial coefficients. If your calculator has an ncr button, then it also has an npr button. By using this formula, we obtain the following theoretical probabilities for a given number of people. 25
n probability of a common birthday 20 41.1% 21 44.4% 22 47.6% 23 50.7% 24 53.8% 25 56.9% 30 70.6% 40 89.1% 50 97% 60 99.4% 100 99.99997% 26
What this shows is that the probability of a match is about 50% for a room of 23 people. It also shows that it is extremely likely that there is a match in a room of 60 people, and that it is practically impossible not to have a match in a room of 100 people. 27