如何确定骰子总和概率? [英] How can determine dice sum probabilities?

查看:96
本文介绍了如何确定骰子总和概率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试解决欧拉计划的一个特定问题时,我遇到了一个特殊的数学公式的难题.根据此网页( http://www.mathpages.com/home/kmath093.htm ),用于确定将总和T在骰子n上滚动的概率的公式如下:

In trying to solve a particular Project Euler question, I ran into difficulties with a particular mathematical formula. According to this web page (http://www.mathpages.com/home/kmath093.htm), the formula for determining the probability for rolling a sum, T, on a number of dice, n, each with number of sides, s, each numbered 1 to s, can be given as follows:

替代文字http://www.freeimagehosting.net/uploads/8294d47194.gif

在我的程序中开始获得荒谬的答案后,我开始逐步进行操作,并尝试一些特定的值.特别是,我决定尝试对总和为T = 20,n = 9的骰子尝试公式,每个骰子的s = 4个边.由于9个4面骰子的总和应具有类似于4到36的钟形曲线,因此20(总和)的可能性似乎相当大(相对而言).将值放入公式中,我得到:

After I started getting nonsensical answers in my program, I started stepping through, and tried this for some specific values. In particular, I decided to try the formula for a sum T=20, for n=9 dice, each with s=4 sides. As the sum of 9 4-sided dice should give a bell-like curve of results, ranging from 4 to 36, a sum of 20 seems like it should be fairly (relatively speaking) likely. Dropping the values into the formula, I got:

替代文本http://www.freeimagehosting.net/uploads/8e7b339e32.gif

由于j从0到7,我们必须将所有j相加...但是对于大多数这些值,结果为0,因为至少一个选择公式的结果为0.j的唯一值似乎是返回非0的结果是3和4.将3和4放到这个公式中,我得到了

Since j runs from 0 to 7, we must add over all j...but for most of these values, the result is 0, because at least one the choose formulae results are 0. The only values for j that seem to return non-0 results are 3 and 4. Dropping 3 and 4 into this formula, I got

替代文本http://www.freeimagehosting.net/uploads/490f943fa5.gif

其中,简化后似乎去了:

Which, when simplified, seemed to go to:

替代文字http://www.freeimagehosting.net/uploads/603ca84541.gif

最终简化为〜30.75.现在,当然还有30.75的概率了……该概率必须在0到1之间,因此出现了严重错误.但是我不清楚它是什么.

which eventually simplifies down to ~30.75. Now, as a probability, of course, 30.75 is way off...the probability must be between 0 and 1, so something has gone terribly wrong. But I'm not clear what it is.

我可以误解公式吗?很有可能,尽管我不清楚在哪里发生故障.可以在网页上将其转录为错误吗?也可以,但是我发现很难在网上找到它的另一个版本进行检查.我可以犯一个愚蠢的数学错误吗?也可能...虽然我的程序具有类似的值,所以我认为我很可能误会了某些东西.

Could I misunderstanding the formula? Very possible, though I'm not clear at all where the breakdown would be occuring. Could it be transcribed wrong on the web page? Also possible, but I've found it difficult to find another version of it online to check it against. Could I be just making a silly math error? Also possible...though my program comes up with a similar value, so I think it's more likely that I'm misunderstanding something.

有任何提示吗?

(我会将其发布在MathOverflow.com上,但我认为它甚至还远远不能成为在那生存的研究生级"数学.)

(I would post this on MathOverflow.com, but I don't think it even comes close to being the kind of "postgraduate-level" mathematics that is required to survive there.)

也:我当然不想要欧拉计划问题的答案,而且我怀疑我偶然发现的其他人也会有同样的感觉.我只是想弄清楚我的数学技能在哪里崩溃.

Also: I definitely do not want the answer to the Project Euler question, and I suspect that other people that my stumble across this would feel the same way. I'm just trying to figure out where my math skills are breaking down.

推荐答案

根据mathworld (公式9是相关的公式),则您提供的公式是错误的.

According to mathworld (formula 9 is the relevant one), the formula from your source is wrong.

正确的公式应该是n choose j,而不是n choose T.确实可以减少求和内值的大小.

The correct formula is supposed to be n choose j, not n choose T. That'll really reduce the size of the values within the summation.

mathworld公式使用k代替jp代替T:

The mathworld formula uses k instead of j and p instead of T:

这篇关于如何确定骰子总和概率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆