- Also called:
- birthday paradox
- Related Topics:
- probability theory
- birthday
- problem
birthday problem
-
What is the birthday problem in probability theory?
The birthday problem in probability theory poses the question: In a group of n people, what is the likelihood that at least one pair shares a birthday? Richard von Mises first published a version of this problem in 1939.
The solution considers the opposite outcome, that everyone has a unique birthday, and subtracts that probability from 1. The formula to calculate the probability ( P(A) ) that at least two people share a birthday is [ P(A) = 1 - \frac{365!}{365^n (365 - n)!} ] where n is the number of people in the group.
Surprisingly, with just 23 people, there's about a 50% chance of a shared birthday, and with 57 people, the probability rises to approximately 99%.
2 Britannica SourcesCreated from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles. -
Why do people find the birthday problem surprising?
The birthday problem is surprising because the probability of at least two people sharing a birthday in a group reaches 50% with only 23 people, and 99% with 57 people.
This is counterintuitive because it seems like the number of people needed should be much higher, possibly over half the days in a year (more than 183). The misconception arises from thinking about the chances of someone sharing your birthday, rather than any two people sharing a birthday. With 23 people, there are 253 possible pairs, increasing the likelihood of a shared birthday. The formula to determine the probability that at least two people have the same birthday is [ P(A)=1-\frac{365!}{365^n(365-n)!} ] where ( n ) is the number of people in the group.
2 Britannica SourcesCreated from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles. -
How do you calculate the probability that two people share a birthday in a group?
The birthday problem calculates the probability that at least two people in a group share the same birthday. The formula to calculate this probability, denoted as ( P(A) ), considers the opposite outcome, ( P(\text{not } A) ), where everyone has a unique birthday.
[
P(A) = 1 - P(\text{not } A)
]Assuming birthdays are uniformly distributed and excluding leap years, the formula expands to:
[
P(A) = 1 - \frac{365}{365} \times \frac{364}{365} \times \frac{363}{365} \times \dots \times \frac{365 - n + 1}{365}
]This can be simplified using factorials:
[
P(A) = 1 - \frac{365!}{365^n (365 - n)!}
]Interestingly, with just 23 people, the probability is about 50%, and with 57, it rises to approximately 99%.
2 Britannica SourcesCreated from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles. -
At what group size is it more likely than not that two people share a birthday?
In a group of 23 people, there is approximately a 50 percent chance that at least two people will share a birthday. With 57 people, the probability increases to around 99 percent.
The birthday problem is a probability question that determines the likelihood of two people sharing the same birthday in a group of n people. The formula to determine this probability, P(A), is:
[ P(A) = 1 - \frac{365!}{365^n (365 - n)!} ]
This formula calculates the probability by finding the complementary probability that everyone has a unique birthday and subtracting it from 1. The relatively small number of people needed for a high probability of a shared birthday is why the birthday problem is considered a paradox.
2 Britannica SourcesCreated from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles. -
How does the calculation change if there are 366 possible birthdays (including leap years)?
The birthday problem calculates the probability that at least one pair of people in a group share the same birthday. The formula to determine this probability, ( P(A) ), considers the complementary probability that everyone has a unique birthday, ( P(\text{not } A) ).
When leap years are included, the calculation changes to account for 366 possible birthdays instead of 365. The formula becomes:
[
P(A) = 1 - \frac{366}{366} \times \frac{365}{366} \times \frac{364}{366} \times \ldots \times \frac{366 - n + 1}{366}
]This can be simplified using factorials:
[
P(A) = 1 - \frac{\frac{366!}{(366 - n)!}}{366^n}
]Here, ( n ) is the number of people in the group. The probability ( P(A) ) represents the likelihood of at least two people sharing a birthday, accounting for the presence of leap years.
1 Britannica SourceCreated from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles. -
What real-life situations or fields use ideas from the birthday problem?
The birthday problem in probability theory calculates the likelihood that, in a group of n people, at least one pair shares a birthday. It arises in various real-world scenarios:
- Computer science In hash functions, it helps estimate the probability of collisions (two different inputs producing the same output).
- Cryptography It's used to assess the security of cryptographic hash functions against birthday attacks, where attackers seek collisions to compromise the system.
- Data analysis The problem helps detect anomalies or duplicates in large datasets, such as identifying potential errors in records with matching attributes.
- Genetics It can be applied to estimate the probability of shared genetic markers within a population.
1 Britannica SourceCreated from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.
birthday problem, question in probability theory that asks in a group containing a given number of n people, what is the probability that at least one pair of people share the same birthday. The problem is famous for its counterintuitive outcome, as only a small number of people are needed for a probable chance of a shared birthday—in a group of 23 people, there is an approximately 50 percent chance that two people will share a birthday. Although there is debate over who came up with the original birthday problem, a version was first published by Austrian mathematician Richard von Mises in 1939.
The birthday problem can be phrased in a variety of ways. In its most general form, it can be stated, “What is the probability that, in a group of n people, two of them share the same birthday?” The question can also be phrased with a specific probability in mind, often 50 percent, and ask the number of people that would be needed for there to reach that level of chance. “How many people would need to be in a room for there to be a 50 percent chance that at least two of them share the same birthday?”
The solution for the birthday problem, denoted as P(A), starts by considering the opposite outcome, P(not A). As complementary probabilities, 1 − P(not A) = P(A). Subtracting the solution’s opposite outcome—that everyone in the room has a unique birthday—from 1 provides the probability that at least two people share the same birthday. To maintain all unique birthdays in P(not A), the first person in the group can have any one of the 365 birthdays (365/365), the second person can have any one of the remaining 364 days (364/365), the third person can have any one of the remaining 363 days (363/365), and so on, assuming that birthdays are uniformly distributed, and leap years are excluded. The remaining members of the group would follow the same pattern all the way to the nth person, whose birthday could be on any of the remaining 365 – n + 1 days. When multiplied together, these values represent the probability of every member in the group having unique birthdays. P(A) = 1 − P(not A) The formula can be simplified into the expression below, with the numerator representing the total number of combinations of unique birthdays that could occur, while the denominator of 365n represents the total number of possible birthday combinations among n people.One can use factorials (that is, n! = 1 ⨉ 2 ⨉ 3 ⨉ … ⨉ n) to simplify the formula, as the numerator is equivalent to 365!/(365 − n)!
Substituting different values of n reveals that the approximate likelihood of at least two people sharing a birthday in a group of that size. The probability obviously reaches certainty when 366 or more people are in the room. But contrary to intuition, high probabilities are reached with relatively small numbers of individuals. In a group of n = 23 people, the probability equals 50.7 percent, and increasing the value to just n = 57 people leads to a probability of approximately 99 percent—an almost sure chance that at least two people were born on the same date.
The birthday problem is called a paradox, because the number of people required for a high likelihood of birthday overlap seems so low. One might think that surely the number must be 183, since that is more than half of the days in a year, but this plays into a common misconception that the birthday problem considers the number of people who specifically share the solver’s birthday, not just any pair of shared birthdays among the group. The misconception involves forgetting that everyone else in the room could share a birthday.
Take a room with 23 people in it. The first person has a possible 22 people they can pair with. The second person has 21 possible birthday pairs to test. (The second person has already been checked with the first person.) The sum of possible birthday pairs among 23 people is 22 + 21 + … + 2 + 1 = 253.
This misconception is related to the birthmate problem: “How many people would one need to ask for there to be a 50 percent chance that someone shares one’s birthday?” This birthmate problem has a considerably higher answer (253 people are needed to be asked for a 50 percent chance of someone having the same birthday as the solver) due to replacement in the sample. Unlike the birthday problem, those being asked in the birthmate problem do not need to have unique birthdays from one another—only from the solver. Others in the crowd can have overlapping birthdays amongst themselves, leading to the need for more than 183 people to reach a more than 50 percent chance of finding someone with an exact matching birthday. Since there are 253 possible pairs in a group in which there is a 50 percent chance of matching any birthday, by the same intuition, one needs 253 people to have a 50 percent chance of a pair with one specific birthday. Solutions to the birthmate problem can be calculated by the formula below using n as a given number of people.
The birthday problem is a simplification of real-world conditions. A lack of uniformity in birthday distribution complicates the true calculation, as children are more likely to be born on some dates than others. In the United States more children are born in the summer months. While this nonuniformity makes shared birthdays even more likely within a group, the inclusion of leap years reduces such a probability. However, scholars have calculated that the differences caused by these considerations are negligible.

" height="20" alt="HEW Logo">