[Math] Probability of Sum of Different Sized Dice

combinatoricsdiceprobability

I am working on a project that needs to be able to calculate the probability of rolling a given value $k$ given a set of dice, not necessarily all the same size. So for instance, what is the distribution of rolls of a D2 and a D6?

An equivalent question, if this is any easier, is how can you take the mass function of one dice and combine it with the mass function of a second dice to calculate the mass function for the sum of their rolls?

Up to this point I have been using the combinatorics function at the bottom of the probability section of Wikipedia's article on dice, however I cannot see how to generalize this to different sized dice.

Best Answer

You can use generating functions.

I presume D2 means dice with numbers 1 and 2.

In which case the probability generating function is

$$(x/2 + x^2/2)(x/6 + x^2/6 + x^3/6 + x^4/6 + x^5/6 + x^6/6) = \frac{x^2(x^2-1)(x^6 - 1)}{12(x-1)^2}$$

You need to find the coefficient of $x^k$ in this to get the probability that the sum is $k$.

You can use binomial theorem to expand out $\frac{1}{(x-1)^2}$ in the form $\sum_{n=0}^{\infty} a_n x^n$

You can generalized it to any number of dice with varying sides.

I will leave the formula to you.

Related Question