Four dice, probability that difference of some outcomes is equal to others I roll four dice which gives me outcomes $x_1, ..., x_4$. I want to determine the probability $$P\left((x_2-x_1) = (x_4-x_3)\right)$$ I have already calculated other probabilities in this setting and suspect that I can use a Cartesian product here, but I'm kind of lost.
 A: This answer is under the assumption that these are fair dice.
You have $P(x_2 - x_1 = k) = (6-|k|)/36$, for $-5 \le k \le 5$.  (This is just a short way of writing what you'd get out of counting case by case.)
Now 
$$P((x_2 - x_1) = (x_4 - x_3)) = \sum_{k=-5}^5 P((x_2 - x_1) = k, (x_4 - x_3) = k)$$
and since $x_1, x_2$ are independent of $x_3, x_4$, this becomes
$$ \sum_{k=-5}^5 P((x_2 - x_1) = k) \cdot P((x_4 - x_3) = k).$$
Substituting in the known value for these probabilities, we get
$$ \sum_{k=-5}^5 \left( {6 - |k| \over 36} \right)^2 $$
and at this point I'd just write out the sum term-by-term, although it would be possible to use standard formulas for $\sum_{k=1}^n k$ and $\sum_{k=1}^n k^2$ at this point.  It's
$$ {1^2 + 2^2 + 3^2 + 4^2 + 5^2 + 6^2 + 5^2 + 4^2 + 3^2 + 2^2 + 1^2 \over 36^2} = {146 \over 1296}.$$
A: Let us assume that the dice are fair and are rolled independently of each other. Then,
$$
\begin{eqnarray*}
P\left(x_2 - x_1{}={}x_4 - x_3\right)&{}={}&P\left(x_2 + x_3{}={}x_1 + x_4\right)\newline
&{}={}&\sum\limits_{k=2}^{12}P\left(x_2 + x_3{}={}k ,\, x_1 + x_4{}={}k\right)\newline
&{}={}&\sum\limits_{k=2}^{12}P\left(x_2 + x_3{}={}k\right)P\left(x_1 + x_4{}={}k\right)\newline
&{}={}&\sum\limits_{k=2}^{12} \left({k+1\choose k} - 2\max\left\{1, \left(k - 6\right)\right\} \right)^2\left(\frac{1}{6}\right)^4\newline
&{}={}&\sum\limits_{k=2}^{7} \left(k-1\right)^2\left(\frac{1}{6}\right)^4 {}+{} \sum\limits_{k=8}^{12} \left(13-k\right)^2\left(\frac{1}{6}\right)^2\newline
&{}={}&\frac{6\left( 7 \right)\left(13\right)}{6}\left(\frac{1}{6}\right)^4{}+{}\frac{5\left( 6 \right)\left(11\right)}{6}\left(\frac{1}{6}\right)^4\newline
&{}={}&\frac{146}{1296}\,.
\end{eqnarray*}
$$
The probabilities $P\left(x_2 + x_3{}={}k\right)$ are computed by counting the number of ways in which the sum $k$ can occur from adding the faces of a pair of dice, and multiplying this count by the probability $$\displaystyle \left(\frac{1}{6}\right)^2$$ of each of these occurrences. For the count, I imagined it as the number of ways in which $k+1$ objects, of which k are identical, can be arranged, and then subtracted the ways in which an arrangement results in a dice having an impossible face (e.g. 0, 7, 8, e.t.c.). This gives the expression $$\displaystyle \left({k+1\choose k} - 2\max\left\{1, \left(k - 6\right)\right\} \right)\left(\frac{1}{6}\right)^2 $$ as the required probability. I think this way of counting is an example of Feller's famous "stars and bars" technique Wikipedia. 
