←
PDF 1046 / 1160 Solution The method of solution to this problem is similar to that for Example 13.10.
→
English · PDF 1046
Original PDF page 1046
中文 · PDF 1046

解答 本题的求解方法与例 13.10 类似。

P(至少两人生日相同)

$$= 1 - P(\text{all different birthdays})$$

$$= 1 - P(2\text{nd different from 1st})P(3\text{rd different from 1st and 2nd})$$

... $P(n$ th 与第 1 个不同,……, $(n - 1)$ th)

$$= 1 - \frac{364}{365} \frac{365}{365} \dots \frac{366 - n}{365}$$

= 0.507 当 $$n = 23$$

该计算的结果可以用图 13.18 所示的图形来直观展示。

图 13.18 中的图形可以由以下 R 代码生成:

temp <- rep(1, 365) temp[2] <- 364/365 for(i in 3: 365){ temp [i] <- temp[i-1]*(366-i)/365 } P = 1-temp P[23] # -> [1] 0.5072972 plot(P[1:100], axes=F, type="n", xlab="人数", ylab="概率") lines(P[1:100],lty=1, lwd=4, col="blue") axis(1, at=c(seq(from=0,to=100,by=10))) axis(2, at=c(0,0.2, 0.4, 0.5, 0.6, 0.8, 1), las=1) # 在 x = 23 处添加一条竖直虚线 segments(23,0,23,P[23], lty=3,col = "blue", lwd=4) # 在 y = P[23] 处添加一条水平线 segments(-10,P[23],23,P[23],lty=3, col = "blue", lwd=4) text(5,P[23]+0.05,"n=23", pos=4,col="blue", lwd=4) box(bty = "l")

很多人惊讶地发现例 13.11 的答案如此之小,但这说明当正确运用概率法则时,我们的主观预期有时不得不让步。