Rolling two dice, find $E[Z]$ given by $Z=|X-Y|$

1.6k Views Asked by At

Roll two fair six-sided dice, and let $X$, $Y$ denote the values of the first and the second die, respectively. If $Z=|X-Y|$, find $E[Z]$.

1

There are 1 best solutions below

5
On

$P(|X-Y|=0)=\frac{6}{36}$ (all doubles)

$P(|X-Y|=1)= \frac{10}{36}$ (all pairs with difference 1, so $(1,2),\ldots,(5,6),(6,5), \ldots,(2,1)$, of which there are $10$)

$P(|X-Y|=2)= \frac{8}{36}$

$P(|X-Y|=3) = \frac{6}{36}$

$P(|X-Y|=4)= \frac{4}{36}$

$P(|X-Y|=5)=\frac{2}{36}$ (just $(1,6),(6,1)$)

So the expectation is

$$\sum_{i=0}^5 i \cdot P(|X-Y|=i)$$ which can now be computed.