Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem which boils down to an extension of the Birthday Problem. If the probability $\bar{p}$ of 2 out of $n$ people having a bithday within $1$ day of each other in $k$ days is:

$$ \bar{p}(k;n)=\frac{n!\binom{k}{n}}{k^{n}} $$

What is the probability that 2 birthdays occur within $m$ days?

My intuition tells me it is along the lines of:

$$ \bar{p}(k;n,m)=1\times(1-\frac{1}{k-m+1})\times(1-\frac{2}{k-m+1})\times\cdots\times(1-\frac{n-m}{k-m+1}) $$

but my math background is weak enough for me to severely doubt myself.

share|cite|improve this question
up vote 0 down vote accepted

The solution can be found in the wiki article

I don't have the derivation of that formula.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.