# Dice Probability

**URL:** <https://boards.straightdope.com/t/dice-probability/631879>\
**Category:** Factual Questions\
**Created:** [August 18, 2012, 4:43pm UTC](https://boards.straightdope.com/t/dice-probability/631879 "2012-08-18T16:43:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ricksummon](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ricksummon/32/3333_2.png) [@ricksummon](https://boards.straightdope.com/u/ricksummon)\
**Post date:** [August 18, 2012, 4:43pm UTC](https://boards.straightdope.com/t/dice-probability/631879/1 "2012-08-18T16:43:52Z")

</div>

On the [MathWorld](http://mathworld.wolfram.com/Dice.html) site, it gives a formula for calculating the probability of rolling a total of **p** on **n** dice with **s** sides each. It starts by saying the number of possible ways to roll this total is the coefficient of the x^p term in the multinomial:

(x + x^2 + … + x^s)^n

The rest of the article is simply about how to calculate this multinomial coefficient using a number of binomial coefficients. But it doesn’t elaborate on why the multinomial coefficient itself is the correct answer, treating it as self-evident. However, it doesn’t seem obvious to me. How can we prove that this is the case?

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [August 18, 2012, 6:06pm UTC](https://boards.straightdope.com/t/dice-probability/631879/2 "2012-08-18T18:06:12Z")

</div>

Consider what happens when you distribute out the calculation of (some sum of powers of x) \* (some sum of powers of x) \* … \* (some sum of powers of x).

Each way of choosing one term (i.e., one power of x) from each factor contributes 1 to the coefficient of x[sup]r[/sup], where r is the sum of the powers you chose.

Thus, the overall coefficient of x[sup]r[/sup] is the total number of ways to choose one term from each factor with powers that add up to r.

In your particular case, each of the n factors corresponds to a particular die, with the s terms in each factor corresponding to the possible outcomes for that die.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [August 18, 2012, 9:05pm UTC](https://boards.straightdope.com/t/dice-probability/631879/3 "2012-08-18T21:05:28Z")

</div>

This is an application of what’s known as [generating functions](http://en.wikipedia.org/wiki/Generating_function), which are pretty slick. A good introductory combinatorics/discrete math book will have a section on generating functions, and there’s a lot more out there.

---

<div class="post-metadata">

**Author:** ![Lance\_Turbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lance_turbo/32/6156_2.png) [@Lance\_Turbo](https://boards.straightdope.com/u/Lance_Turbo)\
**Post date:** [August 18, 2012, 9:17pm UTC](https://boards.straightdope.com/t/dice-probability/631879/4 "2012-08-18T21:17:28Z")

</div>

> [@ricksummon](#):
>
> How can we prove that this is the case?

A fairly straightforward induction argument will do the trick. I can supply it upon request.
