How large a group of people must we have before the probability of two people having the same birthday is more than a half?

Suppose we have a group of n people.There are 364 days in every 3 out of 4 years, and 365 days in 1 out of 4 years. The probability of any two randomly selected people having the same birthday is then {jatex options:inline}\frac{3}{4} \times \frac{1}{364} + \frac{1}{4} \times \frac{1}{365}{/jatex}

In a group of {jatex options:inline}n{/jatex} people there are {jatex options:inline}\frac{n(n-1)}{2}{/jatex} pairings so the probability of any two people from this group having the same birthday is {jatex options:inline}\frac{n(n-1)}{2}( \frac{3}{4} \times \frac{1}{364} + \frac{1}{4} \times \frac{1}{365}){/jatex}

We require that this be more than a half, so solve

{jatex options:inline}\frac{n(n-1)}{2}( \frac{3}{4} \times \frac{1}{364} + \frac{1}{4} \times \frac{1}{365}) \gt \frac{1}{2}{/jatex}

This simplifies to {jatex options:inline}5836n^2-5836n-2125760=0{/jatex}

The solution to this equation are {jatex options:inline}n=19.59, \: -18.59{/jatex} to 2 decimal places.

Obviously we take the first of these and round it up, taking {jatex options:inline}n=20{/jatex}.