Okay…I think I’m going about this right.
I oriented myself by starting a small list. In a group of two people, there are two relevant possibilities: the two people could be born on two different days, or they could both be born on the same day. In the first, and obviously most likely, instance, it doesn’t matter what day the first person was born, he could be born any day of the year (365/365), and the second person could be born any day except the the first person’s birthday (364/365). In the second case, the second person has to be born on the first person’s birthday (1./365).
2 people: Chances of all different birthdays: (365/365)(364/365). Chances of two of the same birthday: (365/365)(1./365)
To illustrate the pattern to myself a bit better I went on to a second iteration, the case of three people present. They could have all different birthdays, or two people could share a birthday, or they could all have the same birthday. The first option follows my previous example: (365/365)(364/365)(363/365). The second option is more complex, but I think what I’m doing is right. Two people have the same birthday, but one has a different one. So the one person could be any day (365/365), the second has to be a different day (364/365), and the third has to be the same as one of those two days (2./365). Finally, if all three have the same birthday, it matches up with the first example as well: (365/365)(1./365)(1./365). The chance that any two people present is the sum of the last two situations.
3 people: Chances of all different birthdays: (365/365)(364/365)(363/365). Chances of two of the same birthday: (365/365)(364/365)(⅔65) + (365/365)(1./365)(1./365)
So I could calculated the chances that two people will have the same birthday, but it’d be a lot harder than calculating the chances of a group having all different birthdays, which I can see now is straightforward. It is (365!/(365-x)!)/365^x where x is the number of people we’re looking for. This can also be represented as a permutation: 365Px/365^x Since of course, when the chances are 50% that at least two people will share a birthday, the chances are also 50% that nobody will have the same birthday as it is the only other option, so I can get away with only paying attention to the side that is easier to calculate.
Honestly the best way to find x here that I can think of is a bit of guess and check. Wolfram alpha tells me that for x=23 we have a probability of about 49.27% but for x=22 we have a probability of about 52.43%. This is for the probability that it won’t happen, so to have chances over 50% that it will, we need 23 people. Quite a bit lower than I would have expected; it certainly went against my intuition!
Please jump in if you’ve spotted any errors.