Help with birthday problem

132 Views Asked by At

I am trying to figure out the probability of having $3$ or more birthdays (out of $23$ people) within the span of $7$ days. I was thinking of going with the number of weeks in a year ($52$), but I know that this won't work because it could be any consecutive 7 days. Can anyone help me approach this problem please?

Thanks all!

2

There are 2 best solutions below

2
On

You are right there is not only 52, 7 consecutive days in a year. But how many are there? If you have an ordered set {1,2,3,4,.........,365} and you take any 7 numbers out of it while preserving order, you would have {1,2,3...7}, {2,3,....8}, {3,4,....9} etc. So you would have 365 - 7 + 1 = 359 different possibilities. Edit: But as Alain Remillard pointed out in the comment there could be 6 more sets [365,1,2,3,4,5,6],[364.....5],[363,.....4],[362,.....,3],[361,......,2],[360,......1]. So, the answer will be 365 total possibilities.

2
On

There are $\binom{23}{3}$ to choose $3$ people that are guaranteed to have birthdays within $7$ days of each other. There are $365$ choices for which $7$ days the three peoples' birthdays are going to be in($1$ to $7$, $2$ to $8$, $3$ to $9$,$...$, $365$ to $6$). There are $P(7,3)=\frac{7!}{4!}$ ways to choose which the $3$ birthdays within the $7$ days. There are $P(358,20)=\frac{358!}{338!}$ ways (P denotes permutation) to choose the other $20$ peoples' birthday. There are $P(365,23)=\frac{365!}{342!}$ ways (P denotes permutation) to choose the $23$ peoples' birthdays without any restrictions. That makes the probability:

$\frac{\binom{23}{3}*7*\frac{7!}{4!}\frac{358!}{338!}}{\frac{365!}{342!}}=\frac{1771*7*210*696412227779209162190682130478477696691226214400000}{42200819302092359872395663074908957253749760700776448000000}\approx 4$%

(Not sure if this is correct. Please correct me if you spot any errors in my calculations)