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 . 364365 . 363365 . … . 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 – n365 ≅ en365

=> P = 1 . e1 ⁄ 365 . e2 ⁄ 365 . … . en-1 ⁄ 365
= e
1 + 2 + … + n-1 ⁄ 365
= e
n(n-1) ⁄ 365

Now, if P = 0.5 then loge(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.

birthday-pairings-function
Probability of common birthday as a function of number of persons

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 60C2 (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.

Leave a Reply

Your email address will not be published. Required fields are marked *