aez-notes

Birthday Pairings

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

Let's ignore leap years since this has a negligible effect. Let \(p(n)\) be the probability that \(n\) people all have distinct birthdays. Then we want to find the minimum value of \(m\) such that \(1 - p(m) > 1/2\). The probability that \(m\) people all have distinct birthdays is the total number of ways to select distinct birthdays,

\[ \prod_{a=0}^{m-1} 365 - a \]

divided by the total number of ways to select birthdays without constraints, \(365^{m}\).

p(n) := product(365 - i, i, 0, n-1) / 365 ^ n;

result(n) := [n, ev(1 - p(n) > 1/2, pred)];

for n:20 thru 25 step 1 do print(result(n))$

Which tells us that \(23\) is the answer

[20, false]
[21, false]
[22, false]
[23, true]
[24, true]
[25, true]

Author: Alex Zarebski

Created: 2022-04-15 Fri 12:30

Validate