Probability of Sum of Different Sized Dice 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.

Suppose we have dice $Da$ and $Db$, with $a \le b$. Then there are three cases:  


*

*If $2 \le n \le a$, the probability of throwing $n$ is $\frac{n-1}{ab}$.

*If $a+1 \le n \le b$, the probability of throwing $n$ is $\frac{1}{b}$.

*If $b+1 \le n \le a+b$, the probability of throwing $n$ is $\frac{a+b+1-n}{ab}$.

