Three six-sided dice are rolled. Denote the greatest value rolled to be $x$ and the smallest value rolled to be $y$. What is the expected value of $x-y$?
Any help is greatly appreciated. I'm not sure how to go about this.
I listed out all the possible differences. One 5, two 4's, three 3's, four 2's, five 1's, and six 0's. The total of these values is $35$ and there are $21$ different outcomes. Does this make sense?
To get a maximum value of $1$ you need to get all $1's$ with probability $\frac{1}{6}^3$.
To get a maximum value of $2$ you need to either get all $2$'s, one $2$ and two $1$'s, or two $2$'s and one $1$ with probability $$\frac{1+{3\choose{2}}+{3\choose{1}}}{6^3}$$
To get a maximum of $3$, you need to either get all $3$'s, two of the other two numbers and a $3$, two of one of the other two numbers and a $3$, or two $3$'s and one of the other two numbers, giving a probability of $$\frac{1+3!{2\choose{2}}+{3\choose{2}}{2\choose{1}}+{3\choose{1}}{2\choose{1}}}{6^3}$$
To get a maximum of $4$, you need to either get all $4$'s, two of the other three numbers and a $4$, two of one of the other three numbers and a $4$, or two $4$'s and one of the other three numbers, giving a probability of
$$\frac{1+3!{3\choose{2}}+{3\choose{2}}{3\choose{1}}+{3\choose{1}}{3\choose{1}}}{6^3}$$
To get a maximum of $5$, you need to either get all $5$'s, two of the other four numbers and a $5$, two of one of the other four numbers and a $5$, or two $5$'s and one of the other four numbers, giving a probability of $$\frac{1+3!{4\choose{2}}+{3\choose{2}}{4\choose{1}}+{3\choose{1}}{4\choose{1}}}{6^3}$$
To get a maximum of $6$, you need to either get all $6$'s, two of the other five numbers and a $6$, two of one of the other five numbers and a $6$, or two $6$'s and one of the other five numbers, giving a probability of
$$\frac{1+3!{5\choose{2}}+{3\choose{2}}{5\choose{1}}+{3\choose{1}}{5\choose{1}}}{6^3}$$
Summing these I get $$E(X)=\left(1\cdot\frac{1}{6^3}\right)+\left(2\cdot\frac{7}{6^3}\right)+\left(3\cdot\frac{19}{6^3}\right)+\left(4\cdot\frac{37}{6^3}\right)+\left(5\cdot\frac{61}{6^3}\right)+\left(6\cdot\frac{91}{6^3}\right)\approx 4.958$$
Checking that the numerators sum to $6^3 = 216$, I get
$$1+7+19+37+61+91=216$$
By symmetry, the expected value of the minimum is $$4.958-3.5\approx2.0417$$
Thus $$E(X-Y)=E(X)-E(Y)\approx4.958-2.0417 \approx 2.916$$
Note: Needs to be checked!
An excel simulation with about $1$,$000$ trials gives an expected value of the minimum as being $2.048$, an expected value of the maximum as being $4.99$, and a mean difference of $2.88$ which I would say agrees with my result.