How many people must there be in a room before the probability that someone has the same birthday as you do is at least 12? How many people must there be before the probability that at least two people have a birthday on July 4 is greater than 12?
The probability of a single individual having the same birthday as me is 1365 so the complementary event has probability 1−1365=364365. The probability that none of k individuals have the same birthday as me is 364k365k. This probability exceeds 12 when k≥log364365(12)≈253. So there must must be 253+1 people (counting myself) in a room before the probability that someone has the same birthday as me.
It is simpler to calculate the probability that 0 or 1 people have a birthday on July 4 and then take the complement. So the probability that k out of n people have a birthday on July 4 is {n \choose k} \frac{364^{n-k}}{365}. So when k = 0 we have \frac{364}{365}^n and when k = 1 we have \frac{n364^{n-1}}{365^n}. Solving this normally would be pretty obnoxious, so I opted to write a quick python script to determine that the first value of n for when the sum of these two values exceeds \frac{1}{2} is n = 613.
x = 1
result = 1
while result > .5:
result = (((364/365)**x) * (1 + x/364))
print(str(x) + ": " + str(result))
x += 1