Thread Rating:
"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?
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.
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 :)Quote: JBThe 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.
silly
3rd question by Anon E. Mouse :)Quote: WizardThere 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.
Is there an easy way to calculate the probability of throwing a total of t with d 6-sided dice?
Quote: mustangsallyYou 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.
Online Polynomial calculators can do the trick easily.Quote: mustangsallyYou need to know about polynomials
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.
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
I added a few R code modules here:Quote: mustangsallyafter thinking more about this
the easiest way is to use an online calculator
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
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
I think the inclusion exclusion method was done way back hereQuote: AceI 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.
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