Expected Value of the Difference of Two Dice

diceexpected valueprobabilityprobability theory

Problem: If a six-sided die is fair, what is the expected value of the difference between two die rolls?

Attempted solution: The expected value can be thought of as the midpoint of the outcomes. If the die is rolled twice, the difference of the two sides could be $$0,0,0,0,0,0,1,1,1,1,1,2,2,2,2,3,3,3,4,4,5$$ The midpoint is then $1$. Here, I have assumed that two rolls with sides $4,5$ is the same as $5,4$.

Is there a more sensible way to answer this problem?

Best Answer

$X$ and $Y$ are two independent random variables following a uniform distribution on $\{1, \ldots, 6\}$ (your two dices). Using conditional expectation you have $$ \mathbb{E} \left[ \left\lvert X - Y \right\rvert \right] = \sum_{k = 1}^6 \mathbb{E} \left[ \left\lvert X - Y \right\rvert \mid Y = k \right] \mathbb{P} \left( Y = k \right). $$ From the law of $Y$, you know that $\mathbb{P} \left( Y = k \right) = \frac{1}{6}$ for all $k$. Moreover, you can check that \begin{align*} \mathbb{E} \left[ \left\lvert X - Y \right\rvert \mid Y = 1 \right] = \mathbb{E} \left[ \left\lvert X - Y \right\rvert \mid Y = 6 \right] &= \frac{15}{6}, \\ \mathbb{E} \left[ \left\lvert X - Y \right\rvert \mid Y = 2 \right] = \mathbb{E} \left[ \left\lvert X - Y \right\rvert \mid Y = 5 \right] &= \frac{11}{6}, \\ \mathbb{E} \left[ \left\lvert X - Y \right\rvert \mid Y = 3 \right] = \mathbb{E} \left[ \left\lvert X - Y \right\rvert \mid Y = 4 \right] &= \frac{9}{6}. \end{align*} Therefore you finally have $$ \mathbb{E} \left[ \left\lvert X - Y \right\rvert \right] = 2 \times \frac{15 + 11 + 9}{6} \times \frac{1}{6} = \frac{70}{36}. $$

Related Question