What is the least number of persons required if the probability exceeds 1/2 that two or more of them have same birthday? (Year of birth need not match, and ignore leap year).

Let total number of persons be *n,* *P* be the probability that all persons have different birthdays.

If there are two persons, the second person can only have birthday among 364 dates (i.e. excluding birthday of first person). Now the third person can only have birthday among 363 dates, and so on. So,

*P = 1 . *^{364}* ⁄ *_{365}* . *^{363}* ⁄ *_{365}* . … . *^{365 – (n-1)}* ⁄ *_{365}

Evaluation this expression for large values of *n* takes courage. So its better we approximate it.

*e*^{-x}* ≅ 1 – x* (for small *x*)

* => 1 – *^{n}* ⁄ *_{365}* ≅ e*^{n ⁄ 365}

*=> P = 1 . e*^{1 ⁄ 365}* . e*^{2 ⁄ 365}* . … . e*^{n-1 ⁄ 365}

= e^{1 + 2 + … + n-1 ⁄ 365}

= e^{n(n-1) ⁄ 365}

Now, if *P = 0.5* then *log*_{e}*(P) ≅ 0.693*. Hence,

* *^{n(n-1)}* ⁄ *_{365}* = 0.693*

Solving this equation, we get *n = 23*, which ensures that probability of all persons having different birthday is less than 0.5.

The above graph shows that probability of common birthday reaches very close to 1, when there are 60 persons. 60 persons means that there are ^{60}C_{2} (or 1770) comparisons, each of which has 1/365 (or 0.0027) probability of being matched. The probability that at-least one of them match can also be approximated by: *1 – (1 – 0.0027)*^{1770} = 0.99.

Note: Matching of these 1770 pairs are not independent. For example: if A and B have same birthday, B and C have same birthday then there is 100% chance that A and C would have same birthday. But still the approximation works good.

Make sure you sign up at Prepleaf for regular quant and puzzle updates. Click here for more exciting puzzles.