First, flip the problem. Find the odds that no one shares a birthday. Finding the probability of a match directly is tricky. There are many ways you can get a birthday match in a group. It is easier to calculate the probability that everyone's birthday is different. Either there is a birthday or there isn't, so the probability of a match and the probability of no match must add up to 100%. That means:
Start small. Calculate the probability that just one pair of people have different birthdays.
Person A's birthday will only be one day of the year. That leaves only 364 possible birthdays for Person B. That means the probabilty of different birthdays for Person A and Person B, or any pair of people is:
Person A's birthday will only be one day of the year. That leaves only 364 possible birthdays for Person B. That means the probabilty of different birthdays for Person A and Person B, or any pair of people is:
Bring in Person C. Two birthdays are already accounted for by Person A and Person B.
If you multiply each term together, you will get the probability that no one shares a birthday.
And so on....
Is there any way that I could mathematically express the numerators in each case (two people and three people) with factorials?
Let's think about it for the first case (Person A and Person B):
How did we get the (363!) ? . 365-2 is 363, right? We only wanted the first two terms, so we want to divide by a factorial that's two less. If we needed the first three terms, we want to divide by a factorial that's three less. We can conclude:
We want:
After some trial and error, you will discover that in order to have a greater than 50% chance for two people in a group to have the same birthday, you would only need a group of at least 23 people.