Top 3 of 4 Dice Rolls 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?
 A: 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. 
A: One approach is to find the number of rolls with each number as the lowest.  There is only one roll with $6$ the minimum.  There are $2^4-1=15$ with $5$ the minimum.  This continues to the fact that there are $6^4-5^4=1296-625$ rolls with $1$ the minimum.  The total of all the dice is $1296*4*3.5=18144$  The thrown out dice are $6*1+5*15+4*65+3*175+2*369+1*671=2275$ so the total score after throwouts is $15869$, giving an average of about $12.2446$
A: There are $6^4$ rolls for which the minimum is at least $1$, $5^4$ rolls for which the minimum is at least $2$, and so on. Thus the sum over all the minima is $1^4+2^4+3^4+4^4+5^4+6^4=2275$. It's a bit of an overkill, but if you like you can also calculate this sum using the general formula for the sum of the first $n$ fourth powers:
$$\sum_{k=1}^6k^4=\left.\frac{n(n+1)(2n+1)(3n^2+3n-1)}{30}\right|_{n=6}=\frac{6\cdot7\cdot13\cdot125}{30}=2275\;.$$
As Ross shows in his answer, this leads to an average of about $12.2446$.
