# Probability that the absolute difference of two dice is equal or less than 2.

The scenario: I roll two dice, what's the probability that the absolute difference between the two dice is equal or less than 2?

I know the easiest way is to create a truth table and count the possibilities

Dice 1 | Dice 2
1         | 1
2         | 2
...
6         | 6

But, the caveat is that I need to find the answer without having to count the possibilities.

There has to be a quicker/formulaic way of doing this, without having to write out the sample spaces/count the possibilities.

• Not sure if what you are looking for, but you can count them in a systematic way. The second dice must yield either the same as the first, one more, two more, one less or two less. For the same there are clearly 6 possibilities: the six possible values for the first one, and then the second one has to yield the same. For the second to yield +1 the first one can attain any value from 1 to 5, so 5 possibilities, and for the second one to yield +2 you have 4 possibilities. The other cases are similar. So (4 + 5 + 6 + 5 + 4) / 6*6. – Lazward Feb 28 '18 at 23:29
• Drawing up the $6 \times 6$ table of all the possibilities will take you very little time. Why do you think there has to be a quicker way of doing this? – Rob Arthan Feb 28 '18 at 23:40

$$P(|X_1-X_2|\leq2)=\frac16\sum_{i=1}^6P(|X_1-X_2|\leq2\mid X_2=i)=$$ $$=\frac16\sum_{i=1}^6P(|X_1-i|\leq2)$$ because of independence.
$$P(|X_1-i|\leq2)=P(|X_1-i|\leq2\ \cap X_i\geq i)+P(|X_1-i|\leq2\ \cap X_1<i)=$$ $$=P(X_1\leq2+i\ \cap X_i\geq i)+P(i-2\leq X_1 \cap X_1<i)=$$ $$=\begin{cases}P(X_1=6)+P(X_1=4)+P(X_1=5)&\text{ if }& i=6\\ P(X_1=6)+P(X_1=5)+P(X_1=3)+P(X_1=4)&\text{ if }& i=5\\ P(X_1=4)+P(X_1=5)+P(X_1=6)+P(X_1=2)+P(X_1=3)&\text{ if }& i=4\\ P(X_1=3)+P(X_1=4)+P(X_1=5)+P(X_1=1)+P(X_1=2)&\text{ if }& i=3\\ P(X_1=2)+P(X_1=3)+P(X_1=4)+P(X_1=1)&\text{ if }& i=2\\ P(X_1=1)+P(X_1=2)+P(X_1=3)&\text{ if }& i=1\\ \end{cases}=$$ $$=\begin{cases}\frac12&\text{ if }& i=6\\ \frac23&\text{ if }& i=5\\ \frac56&\text{ if }& i=4\\ \frac56&\text{ if }& i=3\\ \frac23&\text{ if }& i=2\\ \frac12&\text{ if }& i=1\\ \end{cases}.$$
$$P(|X_1-X_2|\leq2)=\frac23.$$
It would be double the number of ways for the sum of the non-absolute differences of $2$ and $1$, plus the sum of the ways their differences are $0$, divided by the total number of ways. The probability is: $$2*\bigg(\frac{4}{6}*\frac{1}{6}+\frac{5}{6}*\frac{1}{6}\bigg)+\frac{6}{6}*\frac{1}{6}$$ which evaluates to a $2$ in $3$ chance.