The birthday problem is as such: In a class of
n people, what are the chances that one of them share the same birthday as any other?
At first, this seems like a tough question. However, using a formula the answer is actually extremely easy to find out.
First, to have a 100% chance that two of them share the same birthday, one can use the Pidgeon Hole principle. You will find that if you have 366 people, at least 2 of them will share the same birthday (excluding February 29).
However, it is surprising because to achieve 99% that two of them share the same birthday, only 57 people are needed. It is even more surprising that to achieve 50%, only 23 people are needed!
To calculate the formula, we must first calculate the chances of each person not sharing a birthday. The first person will definitely not share his birthday with any one as his birthday is the only birthday known. The next person will have a 364/365 chance of not sharing his birthday, because he there is a chance he might share it with the first person. The next person would have a 363/365 chance of not sharing it with the first two and it goes on and on...
Therefore, in a group of 23 people, the chances of one of them sharing a birthday with another would be :
1-[(365/365)*(364/365)*(363/365)...(343/365)]
=1-[(1/365)23 * (365 * 364 * 363 * ... * 343)]
=1-0.49270276
=0.507297%