Probability and the Birthday Problem

Probability mathematics assesses the likelihood of something happening. Its origins can be traced to a 1654 letter between mathematicians Pierre de Fermat and Blaise Pascal about the odds in a game of chance. From this modest beginning, probability grew into a discipline with applications across the biological, physical, and social sciences.

Let’s begin with an easy example. Suppose we have one die with six faces, numbered 1 through 6. If we roll the die, each face is equally likely to appear. So the probability of rolling a 3 is one out of six, or 1/6.

Suppose we now have two dice which we roll. How many possible outcomes are there? There are six possible outcomes for the roll of one die, and six possible outcomes for the roll of the second die. So there are a total of 36 possible outcomes, which look like:

Die 1: 1,1,1,1,1,1 2,2,2,2,2,2 3,3,3,3,3,3 4,4,4,4,4,4 5,5,5,5,5,5 6,6,6,6,6,6
Die 2: 1,2,3,4,5,6 1,2,3,4,5,6 1,2,3,4,5,6 1,2,3,4,5,6 1,2,3,4,5,6 1,2,3,4,5,6

The roll 3,3 appears one time out of 36 outcomes, so its probability is 1/36. What about the outcome of one 1 and one 2? Ah-ha, you say, I’m trying to trick you! That roll can appear as 1,2 or as 2,1. So the probability of one 1 and one 2 is 2/36 = 1/18.

Now let’s use our imaginations. Suppose we have r dice, where each die has 365 sides, numbered sequentially 1 through 365. What’s the probability when we roll the r dice that no two have the same number showing?

This is equivalent to a famous probability challenge, known as the birthday problem: Given r people in a room, what is the probability that they all have different birthdays? Most people guess that this outcome is very unlikely. We’re going to see when this guess is wrong.

If there is just one person in the room, then the likelihood that that person has a birthday different than everyone else in the room (no one) is 1. We get 1 because there are 365 possible choices for the date that might be that person’s birthday, and we can choose any one of them. So there are 365 choices out of 365 days, or 365/365 = 1.

Now suppose there are two people in the room. The first person, as we’ve already seen, can have a birthday on any date out of the 365 days of the year. That leaves 364 other dates on which the second person can have her birthday and not share the first person’s birthday. So the probability of the two people having different birthdays is: (365/365) * (364/365) = .997

How likely is it that three people have three different birthdays? Now the third person has 363 choices for a date out of 365 days in the year. So the probability that three people all have different birthdays is (365/365) * (364/365) * (363/365) = .992

Now you see the pattern. In general, the probability that r people have r different birthdays is:

(365/365) * (364/365) * (363/365) * … * (365-r+1)/365

Now here’s the interesting bit. When r gets to 23, the odds become less than ½ that everybody in the room has a different birthday. In other words, at r= 23, it becomes more likely that there are shared birthdays! Here’s how the probabilities progress:

r Probability of different birthdays
1 1.000
2 0.997
3 0.992
4 0.984
5 0.973
6 0.960
7 0.944
8 0.926
9 0.905
10 0.883
11 0.859
12 0.833
13 0.806
14 0.777
15 0.747
16 0.716
17 0.685
18 0.653
19 0.621
20 0.589
21 0.556
22 0.524
23 0.493

Wow, look at us! We’ve solved the birthday problem!

Fake psychics have been known to use such mathematical principles to “demonstrate” their powers. People are amazed when two people in a large audience share a birthday, as “magically” predicted. In fact, it’s just math.

What we’ve learned is that probability problems all rely on the simple counting and reasoning skills we learned in school. We considered dice rolls and the birthday problem this week. Next week, we’ll look at probability puzzles involving playing cards and game shows.