TITLE: Top 3 of 4 Dice Rolls
QUESTION [6 upvotes]: I'm trying to prove why the mean of the distribution of sums of the top 3 out of 4 fair 6 sided dice is rolls 12.25.  Anybody who's rolled a D&D character knows the idea.
$r_n = Rand([1,6])$
$x = \frac{\sum_{i=1}^4{r_i} - min(r_i)}{3}$
Pardon the notation, I wasn't sure how to properly define the problem.
So, I came to derive 12.25 with a computer program that just does several million iterations and comes up with something that's approaching 12.25.  I just don't know why or how to prove it.  I thought of splitting the interval [1,6] into 4 equal subsets and add the midpoint of the top 3.  But that didn't work.  Can someone explain why it's 12.25 and how to prove it?

REPLY [8 votes]: We use the same idea as Ross Millikan.  In order to bring out the structure, there will be as little calculation as possible.
Let the random variable $X$ denote the smallest roll, and let $Y$ denote the sum of the three larger rolls. Then 
$$E(X)+E(Y)=E(X+Y)=14.$$
We calculate $E(X)$. From this, $E(Y)$ is easily found.
Let $q_1$ be the probability that $X\ge 1$, let $q_2$ be the probability that $X\ge 2$, and so on.
Then $P(X=1)=q_1-q_2$, $P(X=2)=q_2-q_3$, and so on until $P(X=6)=q_6$.  Thus
$$E(X)=1\cdot(q_1-q_2)+2\cdot(q_2-q_3)+3\cdot(q_3-q_4)+4\cdot (q_4-q_5)+5\cdot (q_5-q_6) +6q_6.$$
This simplifies to 
$$q_1+q_2+q_3+q_4+q_5+q_6.$$
But 
$$q_i=\frac{(7-i)^4}{6^4},\qquad\text{and therefore}\qquad 
E(X)=\frac{1^4+2^4+3^4+4^4+5^4+6^4}{6^4}.$$ 
Comment: Let $W$ be a random variable that only takes on integer values.  For any positive integer $n$, let $q_n=P(W\ge n)$. Then
$$E(W)=\sum_{n=1}^\infty q_n,$$
provided the sum is defined.