How to determine the probability of bone sums?

When trying to solve a specific Euler Euler question, I ran into difficulties with a specific mathematical formula. According to this web page ( http://www.mathpages.com/home/kmath093.htm ), the formula for determining the probability of rolling the sum T by the number of bones, n, each with the number of sides, s, each with numbers from 1 to s can be set as follows:

alt text http://www.freeimagehosting.net/uploads/8294d47194.gif

After I started to get meaningless answers in my program, I started to step over and tried this for some specific values. In particular, I decided to try the formula for the sum T = 20, for n = 9 cubes, each with s = 4 sides. Since the sum of 9 4-sided cubes should give a bell-shaped curve of the results, from 4 to 36, the sum of 20 seems to be what it should be pretty (relatively speaking) probable. Throwing the values โ€‹โ€‹into the formula, I got:

alt text http://www.freeimagehosting.net/uploads/8e7b339e32.gif

Since j works from 0 to 7, we have to add all j ... but for most of these values โ€‹โ€‹the result is 0, since at least one result of choosing the formula is 0. The only values โ€‹โ€‹for j that seem to return non-0 Results 3 and 4. Drop 3 and 4 into this formula, I got

alt text http://www.freeimagehosting.net/uploads/490f943fa5.gif

Which, when it was simplified, seemed as follows:

alt text http://www.freeimagehosting.net/uploads/603ca84541.gif

which ultimately simplifies to ~ 30.75. Now, as a probability, of course, 30.75 is far away ... the probability should be between 0 and 1, so something went terribly wrong. But I do not understand what it is.

Can I understand the formula? It is very possible, although I do not quite understand where the breakdown will occur. Could they have been rewritten incorrectly on the web page? It is also possible, but it was difficult for me to find another version online to check it out. Can I just make a silly math mistake? It is also possible ... although my program has similar value, so I think it is more likely that I do not understand something.

Any clues?

(I would post it on MathOverflow.com, but I donโ€™t think itโ€™s even close to being "postgraduate" math, which is necessary to survive there.)

Also: I definitely do not want to answer the question from Project Euler, and I suspect that other people that mine stumble on this will feel the same way. I'm just trying to figure out where my math skills are being destroyed.

+4
source share
3 answers

According to mathworld (formula 9 is appropriate), the formula from your source is incorrect.

The correct formula should be n choose j , not n choose T This will really reduce the size of the values โ€‹โ€‹in the summation.

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

+9
source

Take a look at the Wikipedia article - Dice . The formula here looks almost the same, but has one difference. I think this will solve your problem.

+3
source

I need to show my ignorance here .... Doesn't 9 choose 20 = 0? In a more general case, not n chooses that T will always be 0, since T> = n? Perhaps I am not reading this formula correctly (I am not an expert in mathematics), but looking at the work "My", I am not sure how this formula was obtained; it seems a bit off. You can try switching from "My Original Maths", p. 39, in the lem.

+2
source

Source: https://habr.com/ru/post/1301361/


All Articles