# [Math] the probability on rolling $2n$ dice that the sum of the first $n$ equals the sum of the last $n$

diceprobabilitysummation

## The Question

What is the probability, rolling $n$ six-sided dice twice, that their sum each time totals to the same amount? For example, if $n = 4$, and we roll $1,3,4,6$ and $2,2,5,5$, adding them gives

$$1+3+4+6 = 14 = 2+2+5+5$$

What is the probability this happens as a function of $n$?

## Early Investigation

This problem is not too hard for $n = 1$ or $n = 2$ via brute force…

For $n = 2$:

Tie at a total of $2$:
$$\frac{1}{36} * \frac{1}{36} = \frac{1}{1296}$$

Tie at a total of $3$:
$$\frac{2}{36} * \frac{2}{36} = \frac{4}{1296}$$

etc.

so the answer is
$$\frac{1^2 + 2^2 + 3^2 + … + 6^6 + 5^2 + … + 1^2}{1296} = \frac{\frac{(6)(7)(13)}{6} + \frac{(5)(6)(11)}{6}}{1296} = \frac{146}{1296}$$

Note that I use the formula: $\sum_{k=1}^{n}k^2=\frac{(n)(n+1)(2n+1)}{6}$.

Is there a way to do this in general for $n$ dice? Or at least a process
for coming up with a reasonably fast brute force formula?

## The Difficulty

The problem arises that the sum of squares is not so simple when we
get to three dice.

Using a spreadsheet, I figured out we need to sum these squares for 3
dice:

$$1, 3, 6, 10, 15, 21, 25, 27, 27, 25, 21, 15, 10, 6, 3, 1$$

For a brute force answer of $\frac{4332}{46656}$. Note how we can no longer use
the sum of squares formula, as the squares we need to sum are no
longer linear.

## Some Thoughts

I am no closer to figuring out an answer for $n$ dice, and obviously the
question becomes increasingly more difficult for more dice.

One thing I noticed: I see a resemblance to Pascal's Triangle here,
except we start with the first row being six $1$, not one $1$. Se we have:

               1 1 1 1 1 1
1 2 3 4 5 6 5 4 3 2 1
1 3 6 10 15 21 25 27 27 25 21 15 10 6 3 1
1 4 9 16 25 36 46 52 54 52 46 36 25 16 9 4 1
...


but that's still a process, not a formula. And still not practical for
$n = 200$.

I know how to prove the formula for any cell in Pascal's Triangle to
be $C(n,r) = \frac{n!}{r!(n-r)!}$… using induction; that doesn't really
give me any hints to deterministically figuring out a similar formula
for my modified triangle. Also there is no immediately obvious sum for
a row of this triangle like there is (powers of 2) in Pascal's Triangle.

Any insight would be appreciated. Thanks in advance!

I don't know whether you're interested in approximate and asymptotic answers – there's a straightforward estimate for large $n$. The distribution for the sum tends to a normal distribution. The variance for one die is
$$\langle x^2\rangle-\langle x\rangle^2=\frac{1+4+9+16+25+36}6-\left(\frac{1+2+3+4+5+6}6\right)^2=\frac{35}{12}\;,$$
so the variance for $n$ dice is $n$ times that. The probability of a tie is the sum over the squares of the probabilities, which we can approximate by the integral over the square of the density, so this is
$$\int_{-\infty}^\infty\left(\frac{\exp\left(-x^2/\left(2\cdot\frac{35}{12}n\right)\right)}{\sqrt{2\pi\frac{35}{12}n}}\right)^2\,\mathrm dx=\int_{-\infty}^\infty\frac{\exp\left(-x^2/\left(\frac{35}{12}n\right)\right)}{2\pi\frac{35}{12}n}\,\mathrm dx=\sqrt{\frac3{35\pi n}}\approx\frac{0.1652}{\sqrt n}\;.$$
The approximation is already quite good for $n=3$, where it yields about $0.095$ whereas your exact answer is about $0.093$.