牛顿-皮普斯问题
牛顿-皮普斯问题是一个掷骰子的概率问题。塞缪尔·皮普斯1693年向艾萨克·牛顿咨询怎样在赌局中下注赢面更大,在信中他问道:下列三种情形哪一种概率最高:
- A.6个正常的骰子独立投掷,至少出现1个6.
- B.12个正常的骰子独立投掷,至少出现2个6.
- C.18个正常的骰子独立投掷,至少出现3个6.[1]
编程计算法
在R语言中,该问题可以用如下方法解:
p <- as.numeric(1/6)
s <- c(1, 2, 3)
for (i in s)
{
x <- 0
n <- 6*i
for(j in 0:(i-1)) {x <- x + dbinom(j, n, p) }
print(paste("Probability of at least ", i, " six in ", n, " fair dice: ", 1-x, sep=""))
}
结果会显示为:
[1] "Probability of at least 1 six in 6 fair dice: 0.665102023319616"
[1] "Probability of at least 2 six in 12 fair dice: 0.618667373732309"
[1] "Probability of at least 3 six in 18 fair dice: 0.597345685947723"
牛頓的解释
牛頓設想將B和C的骰子每六粒分為一組,A只可分為一組;B和C分別可分成兩組和三組,每組需要在其中一次投擲中出現6。如此可見,A的機率是最大的,因为A只需要在其中一次投擲中出現6,而B和C則分别需要重复A的過程两次和三次。
参考文献
- Isaac Newton as a Probabilist 的存檔,存档日期2007-09-18., Stephen Stigler, University of Chicago
- Weisstein, Eric W. (编). . at MathWorld--A Wolfram Web Resource. Wolfram Research, Inc. (英语).
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.