I have a problem with an exercise:
If k people are at a party, what is the probability that at least two of them have the same birthday? Suppose that there are n=365 days in a year and all days are equally likely to be the birthday of a specific person. What is the probability for k=23?
And according to the solution sheet the right answer is:
$Pr=1-\frac{P_{365,k}}{365^k}$ and $Pr_{k=23} \approx 0.5073$
I think I understand the way of thinking behind this solution but my way of thinking was quite different:
Let's assume that $\#B$ is the number of pairs having the same birthday. The probability of NOT having the same birthday for a single pair is $p_b=1-\frac{1}{365}=\frac{364}{365}$ so for all the pairs we have:
$P(\#B \ge 1)=1-P(\#B =0)=1-(\frac{364}{365})^{C_{k,2}}$ where $C_{k,2}$ is the number of possible pairs. This seems quite different than the solution from the solution sheet and the exact result for $k=23$ seems also to be a little bit different because (according to Wolfram alpha) I get:
$Pr_{k=23} \approx 0.5004771$
What am I doing wrong? Or maybe the two solutions are equivalent and the difference in the results for $k=23$ is caused by some numerical approximations?
Thank you in advance for your help.
You are right that there are $\binom k2$ (or if you prefer $C_{k,2}$) possible pairs, and each pair has a $\frac{364}{365}$ probability of NOT having the same birthday.
But these events are not independent, and so we can't just multiply their probabilities!
For an example of how they're not independent: suppose you are given that A and B have the same birthday, and also that B and C have the same birthday. Then the probability that A and C have the same birthday is much higher than $\frac{1}{365}$...
Now, many of these events are quite close to independent (for example, any two of them are independent) and so multiplying their probabilities gets you quite close to the right answer. But it's still wrong.