I am trying to calculate the probability of at least 2 people sharing a birthday in a group of 4 people. I understand that calculating it as 1-P(no shared birthdays) is simpler, but I would like to understand the counting method by doing it directly.
My attempt for $n=4$ is
P = P(2 people) + P(3 people) + P(4 people) = $\frac{1}{365}\binom{4}{2}+\frac{1}{365^2}\binom{4}{3}+\frac{1}{365^3}\binom{4}{4}=0.0164$...
but this does not match up with
P = $1-\frac{364}{365}\frac{363}{365}\frac{362}{365}=0.163...$
What am I doing wrong in the direct calculation?
There are four sharing cases:
You might want to consider whether the last is like the first (no more than two people share any particular day) or the second (there are two days on which birthdays fall) or the third (all four share a birthday with somebody),
but in any case if you add these up, you get the same as you would have got with $1-\dfrac{364 \times363\times 362}{365^3} \approx 0.01635591$