The birthday problem poses the following problem:
Calculate the probability that at least two people share a birthday out of $k$ people, assuming $365$ days in a year.
My attempt was to fix two people's birthdays to match. There are $k(k - 1)$ ways to do this. For the remaining $k - 2$ people, any birthday is fine, so there are $k(k - 1)365^{k - 2}$ ways to do dole out the birthdays where there is a match. I divided that by $365^k$, all the ways the birthdays can be distributed, and figured that would be the probability.
However, I am wrong. The answer is $1 - \frac{365(364)\cdots(365 - k + 1)}{365^k}$ from counting the complement. Where am I going wrong? Thanks.