Post Reply 
Calculating odds of rolling a given total with a specified number of dice
06-15-2015, 11:52 PM (This post was last modified: 06-16-2015 12:04 AM by Thomas Klemm.)
Post: #5
RE: Calculating odds of rolling a given total with a specified number of dice
It's much easier to use lists:

Code:
\<< DUP
    1 5 START
        { 0 } SWAP +
        SWAP 0 +
        OVER ADD SWAP
    NEXT
    DROP
\>>

Start with this list:

{ 1 1 1 1 1 1 }

Repeat the program above 8 times.
To get the coefficient of \(x^{22}\) use:

14 GET

That's because 14 = 22 - 9 + 1 and the list is symmetric.

You should get: 145,899
Divide this by 69 = 10,077,696 to get the desired probability.

HTH
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Calculating odds of rolling a given total with a specified number of dice - Thomas Klemm - 06-15-2015 11:52 PM



User(s) browsing this thread: 1 Guest(s)