# Birthday Problem: Expected Number of Birthdays

For a group of $$130$$ people, assuming that each person is equally likely to have a birthday on each of $$365$$ days in the year, compute a) the expected number of days of the year that are birthdays of exactly $$3$$ people and b) the expected number of distinct birthdays.

I can't figure out what I'm doing wrong. I let $$X$$ denote the number of people that share a given birthday, so $$X \sim \text{Binomial}\left(130,\frac {1}{365}\right)$$. I then found $$P(X=3) = \binom{130}{3}\cdot\left(\frac {1}{365}\right)^3\cdot\left(\frac {364}{365}\right)^{127}\approx0.005189.$$ I then let $$Y$$ denote the number of days of the year that are birthdays of $$3$$ people. So $$Y \sim \text{Binomial}(365,0.005189)$$, which gives $$E(Y) = 365\cdot0.005189\approx1.89$$. However this is incorrect and I can't figure out what's wrong with my approach. I approached (b) in the same way.

• Does this answer your question? probability question ("birthday paradox") – sampleuser Mar 31 '20 at 21:46
• @sampleuser: That's the standard birthday problem; it doesn't answer the present question how many days are expected to be the birthday of exactly $3$ people. – joriki Apr 1 '20 at 0:35

## 2 Answers

A Hint for question $$a)$$:

By linearity of expectation, this is just $$365$$ times the probability that exactly $$k$$ people are born on a given day, which is

$$\binom nk\left(\frac{1}{365}\right)^k\left(\frac{364}{365}\right)^{n-k}=\binom nk\frac{364^{n-k}}{365^n}$$

so the expected number of such days is

$$\binom nk\frac{364^{n-k}}{365^{n-1}}$$

Now just do the maths with thy $$k$$ and $$n$$.

• Got it, that makes sense. However, can you explain if there is something wrong with the method I used? – Dmlawton Mar 31 '20 at 22:27
• @DanielMotoc Are you familiar with the so called "Birthday problem"? Sometimes called Birthday paradox. If not, check it: en.wikipedia.org/wiki/Birthday_problem - This is the method to compute the firs part of the problem! – Turing Mar 31 '20 at 22:37

There are two errors in your calculation, but neither changes the result appreciably.

The second binomial distribution in your approach is wrong because the events of exactly three people sharing given birthdays are not independent: If three people share some birthday, that makes it less likely that three people share some other birthday. Thus $$Y$$ is not binomially distributed, since the binomial distribution arises for independent Bernoulli trials.

But since you’re not actually using the distribution but only its expectation, the result is correct because the linearity of expectation doesn’t require independence. The correct way to frame the argument is given in Mycroft’s answer. (The linearity of expectation is such a powerful tool precisely because it doesn’t require independence and can thus be used to easily calculate expectations in situations like these where the full distribution is complicated).

Another minor error is that $$P(X=3)\approx0.005193$$, so you seem to have made a rounding error somewhere. This translates to the final result, which is approximately $$1.8953$$, so rounded to two digits it would be $$1.90$$, not $$1.89$$. (I don’t know whether this was why you thought that your result is incorrect.)