2
$\begingroup$

Probability that a given day do not have any birthday among N people is: (364/365)^N

However, what will be the probability that there exist at least one day in a year that have no birthday?

This question popped into head while watching atleast someone celebrating their birthday every day. Upon some exploration, understood how the above equation works for one day. But I am clueless how to approach about at least one day in a year.

$\endgroup$
2
  • 3
    $\begingroup$ You want $1-365^{-N} X_N$, where $X_N$ is the number of surjective maps $\{1,\cdots, N\}\to \{1,\cdots, 365\}$. This is $X_N=365!\left\{\begin{matrix} N\\ 365\end{matrix}\right\}$, where $\left\{\begin{matrix} n\\ k\end{matrix}\right\}$ is the Stirling number of the second kind. $\endgroup$ Commented Aug 4, 2022 at 21:09
  • $\begingroup$ This is so counter-intuitive ... one would guess that with 365 people probability should be much bigger. Brings to mind another problem - how many people you need in a room so that with probability of at least 0.5 two of them were born on the same day of the year. The answer is around 23. $\endgroup$
    – Salcio
    Commented Aug 13, 2022 at 13:06

1 Answer 1

2
$\begingroup$

As 1mdlrjcmed said in a deleted answer, this is more the coupon collector's problem than the birthday problem. The expected number until you first see all days is $365H_{365} \approx 2364.646$ using harmonic numbers.

As Sassatelli Giulio said in a comment, you can in theory calculate your probability of a free day using Stirling numbers of the second kind, and you are looking for $1 - \frac{365!\, S_2(N,365)}{365^N}$.

I would suggest instead using recursion, where $p(N, m)$ is the probability of $m$ days taken with $N$ people. You want $1-p(N,365)$ and you can use $$p(N,m) = \frac{m}{365}p(N-1,m)+\frac{366-m}{365}p(N-1,m-1)$$ starting with $p(0,0)=1$ and $p(N,0)=p(0,m)=0$ when $N$ or $m$ are non-zero.

Clearly you will get $1-p(N,365)=1$ when $N<365$. You will get

  • about $1-1.5\times 10^{-157}$ when $N=365$,
  • about $0.99$ when $N=1606$
  • about $0.9$ when $N=1853$
  • about $0.5$ when $N=2287$
  • about $0.1$ when $N=2971$
  • about $0.01$ when $N=3827$

which if graphed looks like this

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .