Assume people are selected at random, and that their birthdays are uniformly and independently distributed over the 365 days of the year excluding Feb. 29.

Think instead about the probability, among n people, that none of them share a birthday. For a set of one person, the odds that he/she shares a birthday with no one else in the set is 1. Adding a 2nd person, the person can have 364 of 365 possible birthdays. Adding the 3rd, he/she can have any of 363 b'days, etc. So the desired expression for the odds

- that no one shares a b'day is
- 365 * 364 * ... * 365 - n + 1 / 365 ^ n

and subtract that from 1 to get the odds that two people share a birthday.

For n = 22, this gives a probability of .476, and n = 23 gives .507.

references

M. Klamkin and D. Newman, Extensions of the birthday surprise, J. Comb. Th. 3 (1967), 279-282.

see Coupon

see Line