# Birthday puzzle

A few days back, I called up an old friend Anamika to wish her happy birthday and she told me that she was out having lunch with her neighbor who also has the exact same birthday!! That got me thinking about what is the probability of such a coincidence happening. Here is a puzzle from that thought process.

If you are mathematically oriented, try solving it. If not, take a guess and see how it compares with the right answer. My guess is that the guess is going to be much larger than the actual number.

Simply put, what is the minimum size of a class where the probability that there is at least one birthday that is shared by two students is more than 50%?

Put in details, if you have two students in a class, the chance they will have the exact some birthday is 1/365. If a third student comes in, there is a higher probability of two of them having the same birthday. If a fourth student comes in, the probability increases further. At what size of the class do you have a 50-50 chance of a birthday being repeated?

Arup Dharon180

Rajib RoyonTagging Anamika

Rajib RoyonArup, it is actually much lesser than that…

Prodipto ChatterjeeonChobbis hochhchhe toh. Oto calculator chalate parbo na. Permutation-er thakurda

Arup DharonWow

Lance BraswellonReal world application: http://rstudio-pubs-static.s3.amazonaws.com/2809_9480d6eccbb34d9593b4a22da0e3fbdb.html

Madhu Kotaon23?

Bob HartonThisis an exercise I had to do in CS class .. years ago

Prodipto ChatterjeeonYou are an atoll. Coral (things) do build up around you 🙂 birthday wish to probability

Anamika ChatterjeeonOk, I have seen this problem before and the answer is 23. Adding to the odds and since my birthday started this, I have always had a classmate who shared my birthday, a different one in school, high school and college. In my previous house, a neighbor’s daughter had the same birthday and my neighbor now ( who is mentioned in the problem) celebrates with me. To round it off, my cousin’s wife is also born on the same date. How likely is that!

Shiva ShenoyonI have never come across a single person in my life who shares the same birthday as me. I guess that makes me special 😉

Rajib RoyonShiva, remember Raja and Giridhar from our i2 days? Both of them share your birthday. I know 3 more here in Atlanta if you want to know them 🙂

Shiva ShenoyonRajib Thanks for bursting my bubble! You are the only person I know that religiously tracks, and calls people on their birthday..long before FB made it easy to do so. Based on your postings, I am sure that will plan your travel schedule to wish people in person.

Rajib RoyonActually, mathematically, Shiva it works out… I wish about 2000 people happy birthday in a year. Assuming even distribution, 6 of them will be in any one day. And I know exactly 6 people born on Feb 1!!

Tammi Gagne' PerryonI want to be on the list for a personal visit on my birthday!!

Pratyush PaulonI know someone they are husband and wife and they share the same birthday, same birth year 🙂 probability of this happening is one in 259 million marriages….

Monica RiskayonI have two friends that share my birthday with me. They also live in Marietta and we celebrate together every year!

Hena MukherjeeonYes, Pratyush Paul, I also know them. Both are my very good friends..

Vinay SharmaonRajib, my answer is 20

Bijetri ChakrabortyonUncle,we have 46 students in our class,& 3 pairs share common birthday.

Arka Gangulyonif the number of student is 19 : the probability = [19^2-(19+18+17…+1)] /365 = (361-190)/365 = 46.8%.

If the number of student is 20 the probability = 52%.

My answer is 20.

Rajib RoyonAnswer to the puzzle is 23.

The way to think about this is the following – In a class of “n” students, the probability that a birthday is repeated is basically “1 minus the probability that everybody has a different birthday”. The probability that everybody has a different birthday is calculated the following way:

The first student can be born in any day.

The second student can then be born in any of the remaining 364 days

The third student can be then born in any of the remaining 363 days and so on…

So for “n” students, the prob that each has a different birthday is

365/365 * 364/365 * 363/365 * 362/365 * … * (365-n+1)/365

The probability of a repeat of a birthday is 1 minus the above.

Plugging in values of n, you will see that at 23, the “1 minus the expression above” crosses 0.50

Ramesh, Devashish, Madhu and Anamika got it. (also the latter two posted their answers in the Comments section again)

Vinay SharmaonMy logic is same as logic of Arka Ganguly, and the answer is 20

Rajib RoyonAnd both of you would be equally wrong 🙂

Dilesh Bansalonsince the answer to this is already out, i was curious to push this a bit further…a class size of 49 is more likely to have 3 pairs of common birthdays (22% chance) compared to just 1 or 2 pairs, explaining the observation in Bijetri’s class.