Question People are arriving at a party one at a time. While waiting for more people to arrive they entertain themselves by comparing their birthdays. Let X be the number of people needed to obtain a birthday match, i.e., before person X arrives there are no two people with the same birthday, but when person X arrives there is a match. Find the PMF of X.
Attempt Method 1: If k equals the number of people at which there is a match, then choosing one out of k-1 people who share the same birthday with the kth person. There are k-1 ways to do this and each person has a probability of 1/365 to have the same birthday as the kth person, thus P(X=K) = (K-1)/365
In this method, I am considering each case to be disjoint i.e.if one of the k-1 people has the same birthday as the last person then the other k-2 people can not have the same birthday.
Method 2: In this my answer = ((k-1)/365)((364/365)^(k-2)) I have obtained the first term (k-1)/365 by choosing a person from k-1 and multiplying that by the probability of having the same birthday as the kth person And the second term (364/365)^k-2, is the probability of k-2 people not having a similar birthday to kth person.
Doubt: In method 2, I have not accounted for the fact that those k-2 people could have the same birthday, how do i do that? What is the correct approach towards this question? I would also like to know the basic fallacy in my thinking? Thanks!
Neither of those are correct. The best way to approach this problem is to instead work out $P(X>k)$, i.e. the probability that the first $k$ people all have different birthdays (hint: what is the probability that person $k$ has a different birthday from the first $k-1$, assuming the first $k-1$ have different birthdays?).
Then you can get what you want because $P(X=k)=P(X>k-1)-P(X>k)$.