Mathematics have played main role in solving many of the problems. From space to bottom of the earth no field has become successful without the use of brilliant concepts presented by mathematics. It has actually made logical reasoning very easy.

Image for post
Image for post

As the future is always based on some uncertainty. You can never be 100% sure about what would happen next. In this case we can only predict. Predicting is also one of the gift of mathematics. Probability and statistics have taken over the world today. Among many major problems, one problem is about birthday paradox. It states that how many minimum people should there be in a room to make sure that two of them share the same birthday.

To understand this let’s first consider this scenario:
Suppose you are celebrating your birthday with your friends in a crowded restaurant. The waiter came up to you and present you with the bill that you have to pay as it is your treat. As it can be clearly seen from your table that a birthday is being celebrated here, the waiter came up with some creativity. He tell you that if you answer his simple question you get 50% discount on your bill. You happily accepted. The waiter asked you that you have to give the answer within 2 seconds only. The question is “there is 50% chance that one person present in this place right now share your birth date. Now you have to calculate the number of people here within 2 seconds only
Since it’s really difficult to calculate exact number of people in a crowded place within 2 seconds. You start looking around but 2 seconds have passed and sadly you lose the offer.
Now the question arises what you should have said that could have solved this birthday paradox. The problem had been solved using concepts of probability. There should be at least 23 people in the room to ensure that 2 people share the same birthday. Now let’s see how:
To solve this let’s consider the reverse scenario i-e how many people must be there in a room to ensure that none share the same birth date. There are 365 days in a year (assumption: this problem is exclusive of leap year i-e feb 29)
Suppose two people walk inside room. To make sure that first person has unique birth date we compare them both by:
364/365 = 0.9973
Now the third person walks in and he/she should avoid 2 birthdays. For this purpose:
0.9973 * 363/365 = 0.9918
When the fourth person walks in:
0.9918 * 362/365 = 0.9836
In this manner we have to avoid one more birthday as one more person walks in. By the time the 23 rd person walks in the situation is like:

0.5243 * 343/365 = 0.4927
Which means the probability that no person in the room has birthday twin has dropped below 50%. Which means that now the probability that two people might share the same birthday is:
1–0.4927 = 0.5073 = 50.73%
You see how a simple formula from probability has solved a complex problem very gracefully.
So next time someone asks you this question don’t be afraid to respond in less than 2 seconds!!

Written By : M. Usman & Mauizah N.

Written by

M.Sc. Student in RWTH Aachen University, Germany | Software Engineer at IconPro GmbH | https://stackoverflow.com/users/9180179/usman

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store