# Generalisation To The Birthday Problem

1. Apr 12, 2013

### Swn Gwyrdd

It was my mate's birthday yesterday and he noticed that several other people we know also had their birthdays on the same day. We began discussing the Birthday Problem and attempted solutions for more than 2 people and tried to generalise it, but we couldn't find a satisfactory solution for an arbitrary number of people. So:

For a person A and a set of people S with cardinality n, assuming there are 365 days in a year (i.e ignore leap years) and that birthdays follow a discrete uniform distribution, what is the probability that exactly m people in S have the same birthday as A?

I've read through the ideas discussed here: https://www.physicsforums.com/showthread.php?t=664296 but can't see how to extend it to an arbitrary number of people.

I've also seen similar problems such as section 2.4 in: http://www.math.ucdavis.edu/~tracy/courses/math135A/UsefullCourseMaterial/birthday.pdf
where the probability that at least 1 set of 3 people share a birthday is calculated. Notice that this solution is undefined if |S|>365 so there are several subtleties to the problem.

Any ideas?

Note: It's been the best part of a decade since I've studied probability.

2. Apr 12, 2013

### CompuChip

Note that there is an important difference to the 'regular' birthday problem: that assumes we are interested in 2 or more people having their birthday onthe same, arbitrary day of the year.
In this case, you are given a specific day of the year - i.e. A's birthday - and you are wondering about the probability that m other people were also born on that day. If birthdays are distributed uniformly, then this is a binomial distribution, giving
$$P(n, m) = \binom{n}{m} p^m (1 - p)^{n - m}$$
where $p = \frac{1}{365}$ is the probability that any of the persons share their birthday with A.

3. Apr 12, 2013

### D H

Staff Emeritus
That is the underlying distribution, but that is not the right answer to the question. A couple of examples to see that this is wrong:
• Let m=0. Plugging in your equation yields a fairly high probability. For example, its 0.76 for n=100. But since we already know that at least one person has a birthday on the day in question, the probability that zero people have a birthday on that day is identically zero.
• Suppose the set S contains just one person, A. The probability that exactly one person in the set S has the same birthday as A is identically 1, not 1/365 (which is what your binomial distribution yields).

The fact that we know that at least one person (A) has a birthday on that specific day needs to be taken into account. What's needed to answer the question is a conditional probability, the probability that m people in the set have a birthday on a specific day of the year given that at least one person in the set has a birthday on that day.

I could spell out the answer, but I think it's better to treat this as if it were a homework problem and see if the OP can now arrive at the right result.

4. Apr 12, 2013

### CompuChip

Ah, I considered the question as A not belonging to the set, i.e. what is the probability that out of n other people, m also have the same birthday.
Thanks for the excellent hints though, I'll let the OP figure them out :)

5. Apr 12, 2013

### Swn Gwyrdd

Thanks for the replies. I was originally assuming that A$\notin$S in which case it does follow CompuChip's distribution. Even if A$\in$S it follows the distribution with n$\rightarrow$n-1 if A's birthday is independent from the others.

So for the case m=0 this is the probability that exactly no other people in S share A's birthday which is:

$$P(n, 0) = \binom{n - 1}{0} p^0 (1 - p)^{n - 1 - 0} = (1 - p)^{n-1}$$

This seems to work to me, so I can't get what you're hinting at with the conditional probability since I can't see any way in which the birthdays are dependent.