Dr. Math FAQ || Classic Problems || Formulas || Search Dr. Math || Dr. Math Home
|Suppose you flip a coin and bet that it will come up tails.
Since you are equally likely to get heads or tails, the probability of tails
is 50%. This means that if you try this bet often, you should win about
half the time.
What if somebody offered to bet that at least two people in your math class had the same birthday? Would you take the bet?
This question is more complicated than flipping a coin, because the chance of finding two people with the same birthday depends on the number of people you ask. If there were only one other person in your math class, you might be surprised to find out that she had the same birthday as you. If there were a pair of people with the same birthday in a class of 366 people, would you still be surprised?
How large must a class be to make the probability of finding two people with the same birthday at least 50%?
Let's forget about leap year when we solve this problem (no February 29 birthdays!) This way, we can assume that a year is always 365 days long.
Also, let's assume that a person has an equal chance of being born on any day of the year, even though some birthdays may be slightly more likely than others. That will simpify the math, without changing the result signficantly.
We'll start by figuring out the probability that two people have the same birthday.
The chance that the second person has the same birthday is 1/365. To find the probability
that both people have this birthday, we have to multiply their separate probabilities.
Now, what about three people?
Things are getting complicated fast. Four or five people would be even messier. Is there a simpler way?
To solve the birthday problem, we need to use one of the basic rules of probability: the sum of the probability that an event will happen and the probability that the event won't happen is always 1. (In other words, the chance that anything might or might not happen is always 100%.) If we can work out the probability that no two people will have the same birthday, we can use this rule to find the probability that two people will share a birthday:
P(two people share birthday) + P(no two people share birthday) = 1
P(two people share birthday) = 1 - P(no two people share birthday).
So, what is the probability that no two people will share a birthday?
Again, the first person can have any birthday. The second person's birthday has to be different. There are 364 different days to choose from, so the chance that two people have different birthdays is 364/365. That leaves 363 birthdays out of 365 open for the third person.
To find the probability that both the second person and the third person will have different birthdays, we have to multiply:
(365/365) * (364/365) * (363/365) = 132 132/133 225,
If we want to know the probability that four people will all have different birthdays, we multiply again:
(364/365) * (363/365) * (362/365) = 47 831 784/ 48 627 125,
We can keep on going the same way as long as we want. A formula
for the probability that
If you know permutation notation, you can write this formula as
That's the same as
We've made some progress, but we still haven't answered the original question: how large must a class be to make the probability of finding two people with the same birthday at least 50%?
We know that the probability of finding at least two people with the same birthday is
1 minus the probability that everybody has a different birthday, and we know how to find the
probability that everybody has a different birthday for any number of people. The easiest
way to find the right class size is to use a calculator to try different numbers in the
formula. It turns out that the smallest class where the chance of finding two people with
the same birthday is more than 50% is... a class of
From the Dr. Math archives:
From the Web:
For a general review of probability:
- Ursula Whitcher, for the Math Forum
Math Forum Home || Math Library || Quick Reference || Math Forum Search