# Looking for a general formula of the probability of a sum of multiple dice throw values

There is a dice with n faces, each face has a value from 1 to n.

The dice is fair, and probability to fall on each face is the same.

The dice is thrown n times, and we calculate the sum of the VALUES, what are on faces ( unlike the binomial distribution for example).

I am looking for the general formula, to estimate, with what probability the sum will be k.

Since i have not found any clue for solution, i have started with basics - calculating the variants, here are my thoughts:

Example 1.

Let a dice have 6 sides , we throw it 2 times. How probable it will be, that a sum is 6?

The variants will be 5-1; 4-2; 3-3 ; 2-4; 1-5 from 6*6 variants, so the answer will be $$\frac{5}{36}$$

Example 2. Now let us see all possible summs:

2 : 1-1 ,

12 : 6-6, equal to 2

3 : 3-1 , 2-2 , 1-3

10 : 4-6, 5-5, 6-4, equal to 3

...etc, each variant have a count +1 of previous one


maximum of variants are with :

7: 1-6, 2-5 , 3-4, 4-3, 5-2, 6-1


Define count (2,n,x) to be the count of variants, with a dice of size n, fora sum x, having 2 throws.

$$count (2,6,x) = \left\{\begin{array}{ll} x - 1 & 2 \leq x \leq 7 \\ 13-x & 8 \leq x \leq 12\\ 0 &\text{x out of bounds } \end{array} \right.$$

or :

$$count (2,n,x ) = n - \left\lvert n + 1 - x \right\rvert$$

And the probability of it, consider that we have n^2 variants:

$$P(2,n,x) = \frac{\left\lvert n - \left\lvert n + 1 - x \right\rvert \right\rvert_{+}}{ n ^2 }$$

Where $$\left\lvert a \right\rvert _{ + } = max( a,0)$$ for out-of-bounds being 0

The checks show, that this is a valid distribution:

sum is 1, maximum at x = 7, 0 for out of bounds,

And i realy was proud from this formula, because i do not found it in any probability theory book.

Example 3. Now, let us see, what happens if we have 3 throws. For 6- sided dices and sum = 8 , there will be , if we have 1 on the first dice: 1-1-6, 1-2-5 , 1-3-4, 1-4-3, 1-5-2, 1-6-1 or to write it short, 1-#7 = 6 variants, 2-#6 , 3-#5, 4-#4, 5-#3, 6-#2 = 6-1-1 , and thats all, minimum value of each die is 1.

You could see, the counts for each case build a triangle, with a total sum of :

$$count (3,n,x ) = \frac{ (x-1) * (x-2) }{ 2 }$$ if x < n+2, the border is 8 here, anf if x > 8...

i stopped here for now. There will be some formula with modulo there, etc. But the approach seems for me to be very extensice, it there a better solution for that task?

• The general case involves counting the number of restricted compositions of a number, with the restriction being that each addend is in $\{1, \ldots, 6\}$. I'm not sure there is a simple formula for the general case. – angryavian Aug 6 '20 at 3:04
• It could potentially be helpful to think of the distribution using the coefficients of the polynomial ($x + \dots + x^n)^n$, for which the coefficient for $x^k$ will give the probability that $\sum X_i = k$ when divided by $n^2$. – Hyperion Aug 6 '20 at 3:11
$$p_{X_1+X_2}(n) = (p_{X_1} \star p_{X_2})(n) =\sum_k p_{X_1}(k)p_{X_2}(n-k)$$ For sums of additional independent RVs, the distribution is defined inductively: $$p_{X_1+X_2+\cdots+X_{j+1}}(n) = p_{(X_1+X_2+\cdots+X_j) + X_{j+1}}(n)$$ $$= (p_{X_1+X_2+\cdots+X_j} \star p_{X_{j+1}})(n)$$