Two people in a class share a birthday: solved step by step
Problem. What is the chance that at least two people in a group share a birthday? Assume 365 equally likely birthdays, ignore 29 February and twins, and treat each person's birthday as independent of the others.
Step by step
Count the opposite event instead: all n people have different birthdays. It is easier to calculate, and the chance of at least one shared birthday is 1 − (chance all are different).
The first person can have any birthday, so the chance is 365/365 = 1. The second person must avoid that date, which has probability 364/365. The third must avoid two dates, so 363/365.
Multiply these chances: P(all different) = (365/365) × (364/365) × ... × ((365 − n + 1)/365).
For n = 23 the last factor is 343/365. The whole product is about 0.493.
So the chance that at least two of 23 people share a birthday is 1 − 0.493 = 0.507, or 50.7%.
For a class of 30 the same product is about 0.294, so the chance of a shared birthday is about 70.6%.
For 50 people the chance rises to about 97.0%.
For 70 people it reaches about 99.9%.
Answer: With 23 people the chance that two share a birthday is 1 − 0.493 = 50.7%; it is about 70.6% for 30 people and 99.9% for 70 people.
Real birthdays are not perfectly uniform (some months are more common) and 29 February exists, so actual probabilities differ slightly from this model.
Stuck on your own course?
boredprof takes your lecture slides and teaches the whole course out loud, drawing every step like this, and you can stop it and ask anything. Join the waitlist to lock in the founding price.