AndyGB
AndyGB
  • Threads: 18
  • Posts: 59
Joined: Feb 7, 2013
July 2nd, 2013 at 5:45:33 PM permalink
Hi, I have a dice question. I hope it's hard, because I've locked my brain up on how to figure it, but I suspect it is easy. How can I calculate the distribution of totals that you'll see for rolling some number of dice? I'll explain what I mean: When rolling (and summing) 2 dice, your range of values is from 2 to 12, and even I know there's one way to roll a 2, two ways to roll a 3 and so on. When rolling 3 dice, the possible values are 3 to 18. There's still only one way to roll a 3 or an 18, but there's more 4s and so on. It quickly gets pretty tedious to hand calculate this, and I'm sure there's a way to figure it for any number of dice. What is the approach? The easy, clean, intuitive, face-palm way to do it? Thanks!
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
July 2nd, 2013 at 6:00:38 PM permalink
https://wizardofvegas.com/forum/questions-and-answers/math/9660-probability-of-fair-die-equaling-sum-of-20/

some methods for some are easier than others

added: 7/5
here is a method like the Wizard's that uses the dice table (matrix) so you can see how this is done
starting with the box at cell A12
we can populate the cells B12:L17 by adding 2 cells to make the value (B12 = B18 + A12 or 1+2)
this should be intutive
we can easily add the sum3d6 row
the # of ways below that row is just the sum of the cells that sumX appears in the table

The example is the Sum9
one can see the diagonal of 9s starting in cell C17 to H12 (in green)
we sum the corresponding cell values in the row # of ways right below the sum2d6 row
C19 to H19
2,3,4,5,6,5=25

for the Sum10 we add
3,4,5,6,5,4=27
and so on


here is 2d6 to 5d6 for viewing


also added
Dice N Patterns
One six-sided die
A 6 100.000 %

----------------

2 six-sided dice

AB 30 83.333 %
AA 6 16.667 %

----------------

3 six-sided dice

ABC 120 55.556 %
AAB 90 41.667 %
AAA 6 2.778 %

----------------

4 six-sided dice

ABCD 360 27.778 %
AABC 720 55.556 %
AABB 90 6.944 %
AAAB 120 9.259 %
AAAA 6 0.463 %

----------------

5 six-sided dice

ABCDE 720 9.259 %
AABCD 3600 46.296 %
AABBC 1800 23.148 %
AAABC 1200 15.432 %
AAABB 300 3.858 %
AAAAB 150 1.929 %
AAAAA 6 0.077 %

----------------

6 six-sided dice

ABCDEF 720 1.543 %
AABCDE 10800 23.148 %
AABBCD 16200 34.722 %
AABBCC 1800 3.858 %
AAABCD 7200 15.432 %
AAABBC 7200 15.432 %
AAABBB 300 0.643 %
AAAABC 1800 3.858 %
AAAABB 450 0.965 %
AAAAAB 180 0.386 %
AAAAAA 6 0.013 %

----------------

7 six-sided dice

AABCDEF 15120 5.401 %
AABBCDE 75600 27.006 %
AABBCCD 37800 13.503 %
AAABCDE 25200 9.002 %
AAABBCD 75600 27.006 %
AAABBCC 12600 4.501 %
AAABBBC 8400 3.001 %
AAAABCD 12600 4.501 %
AAAABBC 12600 4.501 %
AAAABBB 1050 0.375 %
AAAAABC 2520 0.900 %
AAAAABB 630 0.225 %
AAAAAAB 210 0.075 %
AAAAAAA 6 0.002 %

----------------

8 six-sided dice

AABBCDEF 151200 9.002 %
AABBCCDE 302400 18.004 %
AABBCCDD 37800 2.251 %
AAABCDEF 40320 2.401 %
AAABBCDE 403200 24.005 %
AAABBCCD 302400 18.004 %
AAABBBCD 100800 6.001 %
AAABBBCC 33600 2.000 %
AAAABCDE 50400 3.001 %
AAAABBCD 151200 9.002 %
AAAABBCC 25200 1.500 %
AAAABBBC 33600 2.000 %
AAAABBBB 1050 0.063 %
AAAAABCD 20160 1.200 %
AAAAABBC 20160 1.200 %
AAAAABBB 1680 0.100 %
AAAAAABC 3360 0.200 %
AAAAAABB 840 0.050 %
AAAAAAAB 240 0.014 %
AAAAAAAA 6 0.000 %

----------------

9 six-sided dice

AABBCCDEF 907200 9.002 %
AABBCCDDE 680400 6.752 %
AAABBCDEF 907200 9.002 %
AAABBCCDE 2721600 27.006 %
AAABBCCDD 453600 4.501 %
AAABBBCDE 604800 6.001 %
AAABBBCCD 907200 9.002 %
AAABBBCCC 33600 0.333 %
AAAABCDEF 90720 0.900 %
AAAABBCDE 907200 9.002 %
AAAABBCCD 680400 6.752 %
AAAABBBCD 453600 4.501 %
AAAABBBCC 151200 1.500 %
AAAABBBBC 37800 0.375 %
AAAAABCDE 90720 0.900 %
AAAAABBCD 272160 2.701 %
AAAAABBCC 45360 0.450 %
AAAAABBBC 60480 0.600 %
AAAAABBBB 3780 0.038 %
AAAAAABCD 30240 0.300 %
AAAAAABBC 30240 0.300 %
AAAAAABBB 2520 0.025 %
AAAAAAABC 4320 0.043 %
AAAAAAABB 1080 0.011 %
AAAAAAAAB 270 0.003 %
AAAAAAAAA 6 0.000 %

----------------

10 six-sided dice

AABBCCDDEF 3402000 5.626 %
AABBCCDDEE 680400 1.125 %
AAABBCCDEF 9072000 15.003 %
AAABBCCDDE 9072000 15.003 %
AAABBBCDEF 1512000 2.501 %
AAABBBCCDE 9072000 15.003 %
AAABBBCCDD 2268000 3.751 %
AAABBBCCCD 1008000 1.667 %
AAAABBCDEF 2268000 3.751 %
AAAABBCCDE 6804000 11.253 %
AAAABBCCDD 1134000 1.875 %
AAAABBBCDE 3024000 5.001 %
AAAABBBCCD 4536000 7.502 %
AAAABBBCCC 252000 0.417 %
AAAABBBBCD 567000 0.938 %
AAAABBBBCC 189000 0.313 %
AAAAABCDEF 181440 0.300 %
AAAAABBCDE 1814400 3.001 %
AAAAABBCCD 1360800 2.251 %
AAAAABBBCD 907200 1.500 %
AAAAABBBCC 302400 0.500 %
AAAAABBBBC 151200 0.250 %
AAAAABBBBB 3780 0.006 %
AAAAAABCDE 151200 0.250 %
AAAAAABBCD 453600 0.750 %
AAAAAABBCC 75600 0.125 %
AAAAAABBBC 100800 0.167 %
AAAAAABBBB 6300 0.010 %
AAAAAAABCD 43200 0.071 %
AAAAAAABBC 43200 0.071 %
AAAAAAABBB 3600 0.006 %
AAAAAAAABC 5400 0.009 %
AAAAAAAABB 1350 0.002 %
AAAAAAAAAB 300 0.000 %
AAAAAAAAAA 6 0.000 %

----------------

11 six-sided dice

AABBCCDDEEF 7484400 2.063 %
AAABBCCDDEF 49896000 13.753 %
AAABBCCDDEE 12474000 3.438 %
AAABBBCCDEF 33264000 9.169 %
AAABBBCCDDE 49896000 13.753 %
AAABBBCCCDE 11088000 3.056 %
AAABBBCCCDD 5544000 1.528 %
AAAABBCCDEF 24948000 6.877 %
AAAABBCCDDE 24948000 6.877 %
AAAABBBCDEF 8316000 2.292 %
AAAABBBCCDE 49896000 13.753 %
AAAABBBCCDD 12474000 3.438 %
AAAABBBCCCD 8316000 2.292 %
AAAABBBBCDE 4158000 1.146 %
AAAABBBBCCD 6237000 1.719 %
AAAABBBBCCC 693000 0.191 %
AAAAABBCDEF 4989600 1.375 %
AAAAABBCCDE 14968800 4.126 %
AAAAABBCCDD 2494800 0.688 %
AAAAABBBCDE 6652800 1.834 %
AAAAABBBCCD 9979200 2.751 %
AAAAABBBCCC 554400 0.153 %
AAAAABBBBCD 2494800 0.688 %
AAAAABBBBCC 831600 0.229 %
AAAAABBBBBC 166320 0.046 %
AAAAAABCDEF 332640 0.092 %
AAAAAABBCDE 3326400 0.917 %
AAAAAABBCCD 2494800 0.688 %
AAAAAABBBCD 1663200 0.458 %
AAAAAABBBCC 554400 0.153 %
AAAAAABBBBC 277200 0.076 %
AAAAAABBBBB 13860 0.004 %
AAAAAAABCDE 237600 0.065 %
AAAAAAABBCD 712800 0.196 %
AAAAAAABBCC 118800 0.033 %
AAAAAAABBBC 158400 0.044 %
AAAAAAABBBB 9900 0.003 %
AAAAAAAABCD 59400 0.016 %
AAAAAAAABBC 59400 0.016 %
AAAAAAAABBB 4950 0.001 %
AAAAAAAAABC 6600 0.002 %
AAAAAAAAABB 1650 0.000 %
AAAAAAAAAAB 330 0.000 %
AAAAAAAAAAA 6 0.000 %

----------------

12 six-sided dice

AABBCCDDEEFF 7484400 0.344 %
AAABBCCDDEEF 149688000 6.877 %
AAABBBCCDDEF 299376000 13.753 %
AAABBBCCDDEE 99792000 4.584 %
AAABBBCCCDEF 44352000 2.038 %
AAABBBCCCDDE 133056000 6.113 %
AAABBBCCCDDD 5544000 0.255 %
AAAABBCCDDEF 149688000 6.877 %
AAAABBCCDDEE 37422000 1.719 %
AAAABBBCCDEF 199584000 9.169 %
AAAABBBCCDDE 299376000 13.753 %
AAAABBBCCCDE 99792000 4.584 %
AAAABBBCCCDD 49896000 2.292 %
AAAABBBBCDEF 12474000 0.573 %
AAAABBBBCCDE 74844000 3.438 %
AAAABBBBCCDD 18711000 0.860 %
AAAABBBBCCCD 24948000 1.146 %
AAAABBBBCCCC 693000 0.032 %
AAAAABBCCDEF 59875200 2.751 %
AAAAABBCCDDE 59875200 2.751 %
AAAAABBBCDEF 19958400 0.917 %
AAAAABBBCCDE 119750400 5.501 %
AAAAABBBCCDD 29937600 1.375 %
AAAAABBBCCCD 19958400 0.917 %
AAAAABBBBCDE 19958400 0.917 %
AAAAABBBBCCD 29937600 1.375 %
AAAAABBBBCCC 3326400 0.153 %
AAAAABBBBBCD 2993760 0.138 %
AAAAABBBBBCC 997920 0.046 %
AAAAAABBCDEF 9979200 0.458 %
AAAAAABBCCDE 29937600 1.375 %
AAAAAABBCCDD 4989600 0.229 %
AAAAAABBBCDE 13305600 0.611 %
AAAAAABBBCCD 19958400 0.917 %
AAAAAABBBCCC 1108800 0.051 %
AAAAAABBBBCD 4989600 0.229 %
AAAAAABBBBCC 1663200 0.076 %
AAAAAABBBBBC 665280 0.031 %
AAAAAABBBBBB 13860 0.001 %
AAAAAAABCDEF 570240 0.026 %
AAAAAAABBCDE 5702400 0.262 %
AAAAAAABBCCD 4276800 0.196 %
AAAAAAABBBCD 2851200 0.131 %
AAAAAAABBBCC 950400 0.044 %
AAAAAAABBBBC 475200 0.022 %
AAAAAAABBBBB 23760 0.001 %
AAAAAAAABCDE 356400 0.016 %
AAAAAAAABBCD 1069200 0.049 %
AAAAAAAABBCC 178200 0.008 %
AAAAAAAABBBC 237600 0.011 %
AAAAAAAABBBB 14850 0.001 %
AAAAAAAAABCD 79200 0.004 %
AAAAAAAAABBC 79200 0.004 %
AAAAAAAAABBB 6600 0.000 %
AAAAAAAAAABC 7920 0.000 %
AAAAAAAAAABB 1980 0.000 %
AAAAAAAAAAAB 360 0.000 %
AAAAAAAAAAAA 6 0.000 %

----------------


Good Luck
winsome johnny (not Win some johnny)
AndyGB
AndyGB
  • Threads: 18
  • Posts: 59
Joined: Feb 7, 2013
July 3rd, 2013 at 8:59:08 AM permalink
I will dig through those links, thanks as always 7craps!
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
July 3rd, 2013 at 9:03:30 AM permalink
I think the numerators are combin(N + R - 2, R - 1), where R = #of dice. The values of N go from 1 to the mid-point, then go backwards to 1. The denominator is 6^R.

With R = 2, we get combin(N,1) = N. So we get 1/36, 2/36, 3/36, 4/36, 5/36, 6/36.

For example, with R = 3, the numbers are combin(N + 1, 2). Starting with N = 1, we get combin(2,2) = 1 for the number of ways of rolling 3. The number of ways of rolling 4 is combin(2+1,2) = 3. And so on. You get 1/216, 3/216, ... for the probabilities of rolling a 3, 4, and so on.

These are the figurate numbers.

I must confess, this is a guess on my part. I am using geometric intuition.
Climate Casino: https://climatecasino.net/climate-casino/
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
July 4th, 2013 at 10:53:43 AM permalink
Quote: AndyGB

I will dig through those links, thanks as always 7craps!

The Wizard's tables are about as easy as it gets for those that just want answers.
of course there will always be the clever one that makes his
1d6 (color red) with face values of 2,4,6,8,10,12 and
another 1d6 (color green) with face values of 1,3,5,7,9,11
now he asks about the sum distribution.
(I did this one long hand in 1972 and got it wrong the first attempt)
(x^2+x^4+x^6+x^8+x^10+x^12)*(x+x^3+x^5+x^7+x^9+x^11)
for each sum: the # of ways
3:1
5:2
7:3
9:4
11:5
13:6
15:5
17:4
19:3
21:2
23:1
Looks familiar
This was high school and there were some that did this in their heads and even faster methods.
Not I.

or just 1d6 and 1d10 sums
Polynomial calculator shown in one post works sweet (for those that care)
http://www.mathportal.org/calculators/polynomials-solvers/polynomials-expanding-calculator.php
winsome johnny (not Win some johnny)
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
July 4th, 2013 at 11:21:17 AM permalink
Quote: teliot

These are the figurate numbers.

I must confess, this is a guess on my part. I am using geometric intuition.

Interesting.
This kind of brings back a few dice math memories.
The error starts at the 7th sum for 3 dice and up.
(not 7th son - go johnny go - no - the other johnny)

for 3 dice the sums 9,10,11 and 12 # of ways are 25,27,27,25
instead of 28,36,36,28
looks like the 7th sum error is the # of dice.

method using combinations found here
http://math.stackexchange.com/questions/4632/how-can-i-algorithmically-count-the-number-of-ways-n-m-sided-dice-can-add-up-t

maybe someone has another method burning a hole in their pocket?
My bet is Ringo!
winsome johnny (not Win some johnny)
JB
Administrator
JB
  • Threads: 334
  • Posts: 2089
Joined: Oct 14, 2009
July 4th, 2013 at 11:44:34 AM permalink
I was just fiddling with this and came to the same conclusion as 7craps.

Building on Eliot's input, the following Excel formula works for d dice and a sum t...

=combin(min(t, (d*7)-t)-1, d-1)

...up to a point, but additional recursive adjustments are needed for expanding middle-ranges of t as d increases, with the first error showing up for 3 dice and a sum of 9 (d=3, t=9), which is the 7th sum for 3 dice as 7craps mentioned.
JB
Administrator
JB
  • Threads: 334
  • Posts: 2089
Joined: Oct 14, 2009
July 4th, 2013 at 12:00:30 PM permalink
Expanding on my previous post, if you look at the error as a multiple of the number of dice, it appears to be the result of the formula for the same d value but a lower t value. Have a look:

# of Dice
(d)
Total of Dice
(t)
Actual
Combinations
Formula
Combinations
Difference Difference
as a multiple
of d
3 3 1 1
3 4 3 3
3 5 6 6
3 6 10 10
3 7 15 15
3 8 21 21
3 9 25 28 3 1
3 10 27 36 9 3
3 11 27 36 9 3
3 12 25 28 3 1
3 13 21 21
3 14 15 15
3 15 10 10
3 16 6 6
3 17 3 3
3 18 1 1
# of Dice
(d)
Total of Dice
(t)
Actual
Combinations
Formula
Combinations
Difference Difference
as a multiple
of d
4 4 1 1
4 5 4 4
4 6 10 10
4 7 20 20
4 8 35 35
4 9 56 56
4 10 80 84 4 1
4 11 104 120 16 4
4 12 125 165 40 10
4 13 140 220 80 20
4 14 146 286 140 35
4 15 140 220 80 20
4 16 125 165 40 10
4 17 104 120 16 4
4 18 80 84 4 1
4 19 56 56
4 20 35 35
4 21 20 20
4 22 10 10
4 23 4 4
4 24 1 1
# of Dice
(d)
Total of Dice
(t)
Actual
Combinations
Formula
Combinations
Difference Difference
as a multiple
of d
5 5 1 1
5 6 5 5
5 7 15 15
5 8 35 35
5 9 70 70
5 10 126 126
5 11 205 210 5 1
5 12 305 330 25 5
5 13 420 495 75 15
5 14 540 715 175 35
5 15 651 1001 350 70
5 16 735 1365 630 126
5 17 780 1820 1040 208
5 18 780 1820 1040 208
5 19 735 1365 630 126
5 20 651 1001 350 70
5 21 540 715 175 35
5 22 420 495 75 15
5 23 305 330 25 5
5 24 205 210 5 1
5 25 126 126
5 26 70 70
5 27 35 35
5 28 15 15
5 29 5 5
5 30 1 1


The error when d=3, t=9 is d * f(d=3, t=1) where f is the above formula using d and t as inputs.
When d=3, t=9 the error is d * f(d=3, t=2)

When d=4 and t=10 to 14, the error is d * f(d=4,t=1 to 5) respectively.

With 5 dice it appears that even further adjustments are necessary, because the error itself has more error (208 instead of 205), and so on and so on.
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
July 4th, 2013 at 12:34:46 PM permalink
Note that for 4 dice, that last column is

combin(3,0), combin(4,1), combin(5,2), combin(6,3), combin(7,4)

For 5 dice, that last column is

combin(4,0), combin(5,1), combin(6,2), combin(7,3), combin(8,4), combin(9,5) and combin(10,6).

Does that help?
Climate Casino: https://climatecasino.net/climate-casino/
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
July 4th, 2013 at 2:29:00 PM permalink
Quote: JB

With 5 dice it appears that even further adjustments are necessary, because the error itself has more error (208 instead of 205), and so on and so on.

Sally's last post in the link in my 1st post shows a link to the combination (binomial coefficients) solution.
Here it is
http://mathforum.org/library/drmath/view/52207.html

It is simple once you see what is going on

The 1040 error for the 5 dice sum 17 begins at 1820

But this over-counts the sums by a lot.
So we use inclusion-exclusion to remove the over-count
but doing that we remove too many and have to add a few back in.
same concept as counting the # of 101 sequences in "10101". We count 2 sequences of '101' by the math,
but have to subtract out 1 because the 2nd '1' is counted twice, 1st ending a 101 and 2nd starting a new 101.
(This is not a great example)

The 3 values to sum for 5d6 Sum17 are:
1820
-1050
10
I see the 1040 right there.

To me the interesting fact appears, at least up to 50 dice, is why the first 6 sums are correct
and it is the 7th sum that starts the error being the # of dice.
(maybe has to do with the # of die faces)
I guess a bit of algebra should show the answer.

with 25d6 I get 2 values to sum for the 7th sum (31)
593775
-25


But now
BBQ,
pool time,
Baseball,
ice cream
and the Beach Boys for this US 4th of July
winsome johnny (not Win some johnny)
  • Jump to: