# Calculating probability that at least 2 people will have a birthday in the same day

I am trying to calculate the probability that at least 2 people having birthday the same day from a group that consists of: a) 20 or b)45 people.

I am also very interested in learning the mathematical notion, how to write it up correctly and not just calculate it.

I saw that other posts are talking about leap years and more advanced applications, so i just want to stick with the basics to better understand it.

So to calculate the probability of at least 2 people having a birthday in the same day is the same as if we were calculating the complement of "nobody has a birthday in the same day."

So $$S=20$$, then $$P$$(At least 2 people have a birth on the same day)$$=1-P$$(nobody has a birthday in the same day) = $$1 - \frac{365!}{(365-20)! \cdot365^{20}}$$. is this correct?

If you can, please explain to me how to write it correctly mathematically, not just how to calculate it.

Thank you very much for your assistance.

EDIT: if someone can help to show how it can be done using binomial notation it might be very interesting for me and i assume that for others as well, to select some out off the total etc... if you can offer different ways to do this, it will aid me a lot by learning how to approach a problem using various techniques and think outside of the box.

thank you very much again

• All explained here: en.wikipedia.org/wiki/Birthday_problem Jan 6, 2020 at 21:44
• Yes. It is correct, to answer your question. Jan 6, 2020 at 21:49

Let's compute the probability of the opposite, i.e. all having different birthdays. Then, in a group of $$n$$ people, you have $$365$$ choices for the first one and $$365-1=364$$ for the second one (since the only birthday not allowed is the one you just picked for the first one), $$363$$ for the third one, etc.
Without constraints, you would have $$365^n$$ possibilities, so the probability for $$n$$ people is $$\begin{split} p &= \frac{365}{365} \times \frac{365-1}{365} \times \frac{365-2}{365} \times \ldots \times \frac{365-n+1}{365} \\ &= \frac{365 \times \ldots \times (365-n+1)}{365^n} \frac{1 \times \ldots \times (365-n)}{1 \times \ldots \times (365-n)} \\ &= \frac{365!}{(365-n)! 365^n} \end{split}$$