What is the minimum number of people do you need, chosen at random, so that there is at least a 50% chance that at least two have the same birthday. Assume that people are born randomly throughout the year. You may ignore leap day.
Solution
假设一年有 365天,假设有 \(n\) 人。现要求至少有两个人有相同的生日。那么我们求其相反面:每个人生日都不同的概率:
\[P_1=\frac{365}{365}\cdot ...\cdot \frac{365-n+1}{365}=\prod_{i=0}^{n-1}\frac{365-i}{365} \]所以答案就是:\(1-P_1\ge 0.5 \Rightarrow P_1\le 0.5\)
求解得到 \(n=23\)