Thread Rating:

jonslady04
jonslady04
  • Threads: 1
  • Posts: 1
Joined: May 3, 2012
May 3rd, 2012 at 3:14:08 AM permalink
I am trying to figure this out:

"A six-sided die is rolled 5 times. Figure out the probability of the rolls summing up to 20."

Could someone please explain how this is solved?
s2dbaker
s2dbaker
  • Threads: 51
  • Posts: 3259
Joined: Jun 10, 2010
May 3rd, 2012 at 4:11:25 AM permalink
This one is pretty easy. There are 6^5 combinations, that's your denominator. Your numerator is the number of combinations that add to exactly 20.

If I was at my computer, I could figure out the formula for the numerator. I'll come up with something in a couple of hours. The denominator is 7776.
Someday, joor goin' to see the name of Googie Gomez in lights and joor goin' to say to joorself, "Was that her?" and then joor goin' to answer to joorself, "That was her!" But you know somethin' mister? I was always her yuss nobody knows it! - Googie Gomez
s2dbaker
s2dbaker
  • Threads: 51
  • Posts: 3259
Joined: Jun 10, 2010
May 3rd, 2012 at 5:48:27 AM permalink
The numerator is 651. It would take more brain power than I can muster at the moment to come up with a formula for the numerator. 5 comes up once, 6 comes up five times, 7 happens fifteen times, 8 appears thirty-five times and so on up to 17 and 18 which occur seven-hundred-eighty times each. Then the counts start heading back down.
Someday, joor goin' to see the name of Googie Gomez in lights and joor goin' to say to joorself, "Was that her?" and then joor goin' to answer to joorself, "That was her!" But you know somethin' mister? I was always her yuss nobody knows it! - Googie Gomez
JB
Administrator
JB
  • Threads: 334
  • Posts: 2089
Joined: Oct 14, 2009
May 3rd, 2012 at 6:02:55 AM permalink
The question is the same as "5 six-sided dice are rolled at once. Figure out the probability of the dice summing up to 20."

See the Wizard's dice probabilities for 1 to 25 dice page and scroll down to the table for 5 dice.

As s2dbaker mentioned, there might be a formula to figure out the number of combinations of 5 dice which add up to 20, but it's much easier to have a computer do it for you.
s2dbaker
s2dbaker
  • Threads: 51
  • Posts: 3259
Joined: Jun 10, 2010
May 3rd, 2012 at 6:07:30 AM permalink
Quote: JB

The question is the same as "5 six-sided dice are rolled at once. Figure out the probability of the dice summing up to 20."

See the Wizard's dice probabilities for 1 to 25 dice page and scroll down to the table for 5 dice.

As s2dbaker mentioned, there might be a formula to figure out the number of combinations of 5 dice which add up to 20, but it's much easier to have a computer do it for you.

It's nice to know that I can independently verify The Wizard's results. I should have looked first :)
Someday, joor goin' to see the name of Googie Gomez in lights and joor goin' to say to joorself, "Was that her?" and then joor goin' to answer to joorself, "That was her!" But you know somethin' mister? I was always her yuss nobody knows it! - Googie Gomez
Wizard
Administrator
Wizard
  • Threads: 1518
  • Posts: 27036
Joined: Oct 14, 2009
May 3rd, 2012 at 6:37:53 AM permalink
There is a technique to get at the answer to questions like this fairly quickly that I explained in an Ask the Wizard question about a year ago.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
May 3rd, 2012 at 7:19:53 AM permalink
removed
silly
I Heart Vi Hart
guido111
guido111
  • Threads: 10
  • Posts: 707
Joined: Sep 16, 2010
May 3rd, 2012 at 8:23:56 AM permalink
Quote: Wizard

There is a technique to get at the answer to questions like this fairly quickly that I explained in an Ask the Wizard question about a year ago.

3rd question by Anon E. Mouse :)
Is there an easy way to calculate the probability of throwing a total of t with d 6-sided dice?
dwheatley
dwheatley
  • Threads: 25
  • Posts: 1246
Joined: Nov 16, 2009
May 3rd, 2012 at 8:27:37 AM permalink
Quote: mustangsally

You need to know about polynomials

I do not have my notes on this but the concept can be found on the internet called "Dice sums and polynomials".
=(x+x2+x3+x4+x5+x6)5
look for the coefficient of x20
that will be the numerator



mustangsally is spot on. That's called a generating function. Incredibly useful once you wrap your head around it.
Wisdom is the quality that keeps you out of situations where you would otherwise need it
guido111
guido111
  • Threads: 10
  • Posts: 707
Joined: Sep 16, 2010
May 3rd, 2012 at 8:51:00 AM permalink
Quote: mustangsally

You need to know about polynomials

Online Polynomial calculators can do the trick easily.
Try this one
Polynomial calculators
answer 217/2592 x20 or (651/7776)
I think Excel can also do it. I will have to dig deep for that.

added
the exact formula would then be
(1/6*(x+x2+x3+x4+x5+x6))5

the general formula being 1/n*(x+x2+...+xn)k
n=number of sides of a fair die
k=number of dice rolled

The OP wanted to know the explanation on solving this.
The pdfs linked by Sally shows this.

Here is my take.

The x and x2 or (x^2) are the different faces of the die. x = x^1 but we just write x.
We know that if 5 dice are rolled the highest total can be 30.
that would come from x^6(face6)*5
The smallest total would be 5.
So we now know our sample space.

The coefficients (the number in front of x) of the expanded polynomial gives us the total combinations of that exact total
As dwheatley pointed out, this is great stuff to know, once you get it down, because it can be used in many other types of counting problems.
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
May 3rd, 2012 at 11:06:41 PM permalink
after thinking more about this
the easiest way is to use an online calculator
as NO life points are given to do this long-hand-way

wolfram alpha
(Coefficient[(x^1+x^2+x^3+x^4+x^5+x^6)^5, x, 20]) / 6^5

wolfram alpha

for a list of the ways each sum can show
just use this
CoefficientList[(x^1+x^2+x^3+x^4+x^5+x^6)^5, x]

result
{0, 0, 0, 0, 0, 1, 5, 15, 35, 70, 126, 205, 305, 420, 540, 651, 735, 780, 780, 735, 651, 540, 420, 305, 205, 126, 70, 35, 15, 5, 1}

as the list starts with sum=0
and 5d6 does not produce a 0 sum

so probability of sum=20= 651/ 6^5 = sum15

because 15+20=35
as does
5 + 30=35
smallest sum to largest sum
Last edited by: mustangsally on May 22, 2016
I Heart Vi Hart
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
June 2nd, 2018 at 11:55:46 AM permalink
Quote: mustangsally

after thinking more about this
the easiest way is to use an online calculator

I added a few R code modules here:
https://sites.google.com/view/krapstuff/dice/dice-sums

there are 3 to choose from
depending on what is required as a result

using the 1st R code script module
results:
[1] "Probability of sum 20: 0.0837191358"
> print(ways <- sum(minSum <= dice.sums & dice.sums <= maxSum))
[1] 651
> outcomes
[1] 7776

using the 2nd R code script module
results:
DiceSumsRange(20,20,5,6)
[1] "prob for sum of 20: 0.0837191358"
[1] "ways: 651"
[1] "outcomes: 7776; using 5 dice with 6 faces"

using the 3rd R code script module
results:
> diceSums(5)
sum ways probability
[1,] 5 1 0.0001286008
[2,] 6 5 0.0006430041
[3,] 7 15 0.0019290123
[4,] 8 35 0.0045010288
[5,] 9 70 0.0090020576
[6,] 10 126 0.0162037037
[7,] 11 205 0.0263631687
[8,] 12 305 0.0392232510
[9,] 13 420 0.0540123457
[10,] 14 540 0.0694444444
[11,] 15 651 0.0837191358
[12,] 16 735 0.0945216049
[13,] 17 780 0.1003086420
[14,] 18 780 0.1003086420
[15,] 19 735 0.0945216049
[16,] 20 651 0.0837191358
[17,] 21 540 0.0694444444
[18,] 22 420 0.0540123457
[19,] 23 305 0.0392232510
[20,] 24 205 0.0263631687
[21,] 25 126 0.0162037037
[22,] 26 70 0.0090020576
[23,] 27 35 0.0045010288
[24,] 28 15 0.0019290123
[25,] 29 5 0.0006430041
[26,] 30 1 0.0001286008
[1] "7,776"
>

*****
hope this helps out for future inquiries
Sally
I Heart Vi Hart
Ace
Ace
  • Threads: 6
  • Posts: 43
Joined: Aug 15, 2013
June 22nd, 2018 at 6:56:44 PM permalink
I was analyzing patterns today and I just created a formula for this. I've never seen a basic formula for dice sums, so if I'm the inventor I take full credit haha.

Combin (19,4) - Combin (13,4) * 5 + Combin (7,4) * 10 = 651 ways to get a result of 20.

There are 5 die (d=5), 6 sides (s=6) and a result of 20 (r=20).

The formula is:

+Combin (r-1-s*0, d-1) * Combin (d,0)
- Combin (r-1-s*1, d-1) * Combin (d,1)
+Combin (r-1-s*2, d-1) * Combin (d,2)
.........and so on

You quit the series when a combination is impossible. For instance to find the result for 10 you just take Combin (9,4) = 126. If you attempt the second line of the formula you get Combin (3,4) which is invalid so you stop at the first line.

For a result like 20, it's easier to calculate the result of 15, which we know is the same since it's the same distance from the mean of 17.5. Combin (14,4) - Combin (8,4) * 5 = 651
Last edited by: Ace on Jun 22, 2018
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
June 22nd, 2018 at 7:15:47 PM permalink
Quote: Ace

I was analyzing patterns today and I just created a formula for this. I've never seen a formula for dice sums, so if I'm the inventor I take full credit haha.

I think the inclusion exclusion method was done way back here
Subject: Probability of getting a sum s on n dice with x sides
Date: 03/26/2001
http://mathforum.org/library/drmath/view/52207.html
in Excel (I had this a long time now)


seems to me to be a slower way than other methods
but...
great minds think alike

Sally
I Heart Vi Hart
  • Jump to: