Twenty-three people are in a room. What is the chance that at least two of them share a birthday? With 365 days to choose from, a match sounds unlikely, yet in the standard model the probability is a little more than one half. This page states that model, counts the 253 pairs of people who could match, and finds the exact probability by computing the chance that all the birthdays differ and subtracting it from one.
Key terms
Birthday problem
Definition The birthday problem asks for the probability that at least two of people share a birthday, meaning the same month and day. The matching people are not named in advance, so a match between any two of them counts. The standard model ignores February 29 and makes two assumptions. Each person’s birthday is one of the remaining days, each with probability , and the birthdays of different people are independent, so knowing some of them does not change the chances for the others. In this model, for every ,
where the product multiplies the fractions , and so on, one for each person. For the product contains the factor , so a shared birthday is certain, as it must be with more people than days. For the probability is about , and is the smallest group for which it is more than one half. The word paradox in its popular name refers to the surprise, not to a contradiction. Real groups differ from the model, since births are not spread exactly evenly over the year, some people are born on February 29, and twins share a birthday. For people whose birthdays are independent and follow one common uneven pattern over the days, the unevenness cannot make a match less likely than in the model. The lesson Birthday and Collision Problems in the probability course treats the same question for any number of equally likely categories.
In plain words The question is whether any two people match, not whether someone matches you. A group of contains pairs, and each pair is one more chance for a match.
Example For people the probability that all birthdays differ is about , so a shared birthday has probability about , or percent. A match is only slightly more likely than no match, so a group of without a shared birthday is an ordinary outcome, not evidence against the calculation. The probability grows steadily with the group, about percent for people, percent for and percent for . The narrower question of whether at least one of the other people shares one particular person’s birthday has probability
about percent, because it looks at only of the pairs.
Number of pairs
Definition A group of people contains
different pairs, for every whole number . The symbol is read ” choose ”. To see the formula, count ordered pairs first. There are choices for the first person and for the second, and each pair has been counted twice, once in each order. Adding people one at a time gives the same count, since the th person to arrive forms new pairs, one with each person already present, and .
In plain words The number of pairs grows much faster than the number of people. Doubling a group of two or more people more than quadruples its number of pairs.
Example A group of people has
pairs. One particular person belongs to only of them, and the other pairs do not involve that person. The many pairs explain why a match is likely, but they do not give its probability directly. Each pair matches with probability , and adding these gives , which is too large. In one room several pairs can match at once. For example, three people born on the same day form three matching pairs, and the sum counts such a room three times, once for each matching pair, where the probability of at least one match counts it once.
Complement rule
Definition The complement of an event is the event that does not happen, written . Every outcome lies in exactly one of and , so
The complement of the event that at least two of people share a birthday is the event that all birthdays are different.
In plain words When an event can happen in many overlapping ways, it is often easier to find the chance that it does not happen at all and subtract that from one.
Example A shared birthday can mean one matching pair, several matching pairs, or three or more people on one day, and counting all these directly is hard. The complement, that all birthdays are different, is a single condition. Its probability is about , so
Multiplication rule
Definition For events and with , the multiplication rule states that
where is the event that both happen and is the conditional probability of given , the probability of once is known to have happened. For events with , using the rule repeatedly gives
When the events are independent, every conditional probability equals the plain probability , and the right side is simply .
In plain words To find the chance that a whole chain of steps succeeds, multiply the chance that the first step succeeds by the chance that the second succeeds given that the first did, and so on. Each factor is worked out as if all the earlier steps have already succeeded.
Example Let be the event that person has a birthday different from everyone before. Given that the first birthdays are all different, they occupy days, and because birthdays are independent and equally likely, person avoids those days with probability . The factors therefore run from for the first person, who cannot match anyone, down to for person , who must avoid occupied days, and
The condition in each factor matters. The third person has safe days only when the first two birthdays differ. If they were equal, the room would already contain a match and would not belong to the event being counted.
Check yourself
- In the same model, find the probability that at least two of three people share a birthday. Compare it with , the sum of the match probabilities of the three pairs.
Show the answer
By the multiplication rule the three birthdays are all different with probability
By the complement rule a shared birthday has probability
which is about . The sum is about , slightly larger. The sum counts the rooms in which all three people share one birthday three times instead of once. Those rooms have probability , and counting them two extra times accounts for the difference of .
- Change the number of days. Suppose each person’s birth month is one of months, each with probability , independently of everyone else. What is the smallest group in which a shared birth month is more likely than not?
Show the answer
The same argument with in place of gives, for people,
so a shared month has probability , about . For people the extra factor gives
so a shared month has probability , about . The smallest such group has people, who form pairs. Real months have different lengths, so this equal chance model is again a simplification.
- Now ask the narrower question. In the 365-day model, how many other people are needed before the probability that at least one of them shares your birthday is more than one half?
Show the answer
Each other person misses your birthday with probability , independently of the others, so with other people
This is more than one half exactly when is less than one half. Taking natural logarithms, that means
So other people are needed. Checking directly, others give about and others give about . A common guess is about half of , but others give only about . Some of them are likely to share birthdays with one another, and then together they cover fewer than different days. By contrast, people are enough for a match between any two of them, and those people already form pairs, the same number of comparisons that your question needs.