Why can't I calculate the result of the birthday paradox using `n choose k`?

1k Views Asked by At

The birthday paradox says, if you have 23 people in the same room, the odds are greater than half that two people will share a birthday. I tried to calculate it using 1 - (number of ways 23 people can have birthdays that are ALL DIFFERENT)/(number of ways 23 people can have birthdays).

Here's how 23 people can have birthdays that are all different: it is just 365 choose 23.

To calculate all the different ways 23 people can have birthdays is more complicated. In this case, order doesn't matter, but it is okay for multiple people to have the same birthdays. The formula for this is (n + k - 1) choose k, so in this case: (387 choose 23).

However, 1 - (365 choose 23) / (387 choose 23) = 75%, not 50%. What am I doing wrong?

2

There are 2 best solutions below

0
On BEST ANSWER

The formula for this is ${n + k - 1 \choose k}$,

Okay, no.   The "stars and bars" formula counts the distinct arrangements by which $k$ indistinguishable items may be assigned to $n$ distinguishable items (eg balls in boxes).   It does not, however, consider the probability weighting of those outcomes, and they are not all equally probable.

For instance, counting by "stars and bars" the ways two balls may be fairly dropped into two boxes labelled $\sf H, T$, gives $3$ ways:   "$\sf HH, HT, TT$", but you should be quite aware that the probability weights of these are $\tfrac 14, \tfrac 24, \tfrac 14$ respectively.

Although it has its uses, don't be tempted to use "stars and bars" in to measure probability as it does not count equally probable outcomes.

1
On

First, the total number of ways is $365^{23}$, because each person can have a birthday on any day.

Second, your complementary calculation is also wrong. The number of combinations $23$ people don't share a birthday is $365\times364\times\cdots\times343$. So the probability becomes $$1-\frac{365\times364\times\cdots\times343}{365^{23}}\approx 1-0.492702765676015=0.507297234323985$$