What is the probability that 4 randomly chosen people were all born on different days of the week?
840/2401, about 0.35. The first person can be born on any day (7/7), the second on one of 6 other days, the third on 5, the fourth on 4: (7 x 6 x 5 x 4) / 7^4 = 840/2401.
Explain it simply
This is a small version of the famous birthday problem. Each person independently has 7 possible weekdays, so there are 7^4 equally likely combinations. For "all different", the choices shrink by one each time, exactly like filling seats without repetition. Surprisingly, it is more likely than not that at least two share a weekday.
Example
Question: 4 people. P(all born on different weekdays)?
- Total outcomes = 7^4 = 2,401.
- All different = 7 x 6 x 5 x 4 = 840.
- P = 840 / 2,401 = about 0.35.
- So P(at least two share a weekday) = 1 - 840/2401 = 1,561/2,401, about 0.65.
const p = (7 * 6 * 5 * 4) / Math.pow(7, 4);
console.log(p.toFixed(4)); // Output: 0.3499
console.log((1 - p).toFixed(4)); // Output: 0.6501With 8 people, a shared weekday is certain, because there are only 7 weekdays (pigeonhole principle).
What to say in the interview
"I count ordered outcomes: 7 to the power 4 in total, and 7 times 6 times 5 times 4 with all different, so 840 over 2,401, about 35 percent. So a shared weekday is the likelier outcome, around 65 percent."
Common mistakes
- Using C(7,4)/7^4, which forgets that the people are distinct and order matters.
- Assuming 'at least two share' is unlikely just because there are 7 days.