2.5 The Birthday Problem
This is a famous problem in probability, which we address here in stages. We introduce a simple version, and make it more complex in steps until we can tackle the general problem.
Two People on April 3
Two People
Example 2 Two people meet on the street, and we ask what is the probability that they both have the same birthday?
Show solution
How is this different than the previous question, where we specified which birthday they had? Our intuition immediately suggests that this probability must be higher than the previous one, because there are more possibilities - rather than April 3, they could be born on January 1 or May 3 or any other day. Using our notation we have the following definitions:
Note
In all of these examples we are not considering leap days, which occur approximately once every four years. These extra days do not change any of the qualitative results, and really only serve as a small extra correction to any analysis. However, it does add a fair amount of bookkeeping with very little increase in enlightenment, so we choose to avoid this problem in our examples.
and the probability we are looking for is
In this situation we can note that these are exclusive statements. For example, it can't be true that both and are true - you can't have more than one birthday. Thus, the Sum Rule (Equation 1.10 on page 1.10) reduces to the Limited Sum Rule (Equation 1.11). Further, each term in that rule is the same
so we have
Another way to think of this is to imagine that person 1 randomly “chooses” their birthday, , and person 2 randomly “chooses” their birthday, , and then they compare to see if the days are the same, or . In general, we can think of the problem broken up in this way:
Note
Here we find another example of the general requirement that equivalent states of knowledge give rise to equivalent probability assignments. In this case it means that if there is more than one way to arrive at a conclusion, they each must give the same answer. We can then choose the way that is easiest to calculate, simply out of convenience.
In this way, we get
which is extremely unlikely (see Table 1.1 on page 51), but not nearly as unlikely as them both having the same April 3 birthday.
Three People
Example 3 What is the probability that three random people have the same birthday?
Show solution
Going through the same logic, we have
which is even more extremely unlikely (see Table 1.1 on page 51) than the previous two-person example. It is interesting to note that this is the same answer we received when we asked for the probability of two people with a specific birthday. One can think of the three people having the same, unspecified, birthday in the following way if it helps. The first person's birthday specifies the necessary birthday for the other two, so it is the same as the case where we specify a single birthday for two people.
Two People...Out of Three
Usually, we don't have a situation where we have random people meeting and all agreeing on birthdays. What we have is a group of people talking, and two people in the group end up saying “Hey, my birthday is April 3 too!” This is quite a bit different, and leads to some unintuitive consequences. Let's go through the situation with three people, and we ask the question
Example 4 What is the probability that at least two have the same birthday?
Show solution
Writing this out we get (somewhat messily)
Note
Writing the possibilities out like this is quite tedious, and can lead to errors. Directly after this calculation we find an equivalent, and much easier, way of writing the same calculation. However, it is important to note that all ways of writing the same information must lead to the same answer.
The term can be broken up like
Applying the product rule we get
Note
I'm sure you're wishing for the easier way about now...it's coming in Example 2.12.
Noting that there are 3 ways of getting a specific 2 the same, we obtain for this single term
Note
These 3 ways are “person 1 and 2 match”, “person 1 and 3 match”, “person 2 and 3 match.”
Putting it all together we have
Example 5 What is the probability that at least two have the same birthday? A clever shortcut.
A clever way of rethinking this problem, which significantly reduces the calculations, is found by asking the following question: in a group of people, what is the probability that none of the people have the same birthday? This can be approached in a step-wise fashion. Person 1 “chooses” a birthday, out of 365 they have all 365 possibilities. Person 2 “chooses” their birthday, with probability of not being the same as Person 1. Person 3 now has 363 “choices” out of 365 to avoid both other birthdays, etc... So the probability of using this process and getting to Person 3 and not have any overlapping birthdays is simply
Now, if we're interested in the probability that at least two are the same, then this is the exact opposite of the probability that none are the same. Using the Negation Rule (Equation 1.7 on page 41) we have
which leads to
Two People...Out of Thirty
Example 6 When you have a group of 30 people, like students in a classroom, and you ask what the probability of finding two in the room with the same birthday, would your intuition say it is greater or less than 50%?
Show solution
Many people find that their intuition suggests reasonably strongly that it would be less than 50%. We can now do this problem quite easily, and we find that our intuition does not match. Following the same procedure as with 3 people, we imagine each person “choosing” their birthday with a dwindling selection as we go on to avoid “choosing” one that has already been taken. The probability that no one in the room has the same birthday as any other is
Note
We've often used our intuition to verify the result, but now we've reached a state where the problems get subtle enough that our intuition fails. It is good to use ones' intuition on the “easy” problems, but now that we've established the process we can tackle problems where our intuition is not good enough to confirm a result.
So the probability of having at least 2 people in the room having the same birthday is
which is 71%! Compare this likely outcome to the extremely rare outcome of having two random people having matched birthdays, from page 58. See Figure 2.2 to see a plot of this unintuitive observation.
Adapted from Statistical Inference for Everyone, by Brian Blais (Bryant University), licensed under CC BY-SA 4.0 (dual-licensed under the GNU FDL 1.2 or later; this adaptation uses the CC BY-SA grant). Changes were made; this adaptation is distributed under the same license. License: CC-BY-SA-4.0.