After writing a simulation in python (code at bottom) I realized my calculations are incorrect but can't figure out where I went wrong. Let {$D_1$, $D_2$, $D_3$, $D_4$} be the ordered dice rolls. Let $X = D_2 + D_3 + D_4$.
$$E[X] = E[D_2 + D_3 + D_4] = E[D_2] + E[D_3] + E[D_4]$$
I treated each $D_i$ as an order statistic. The PDF would then be $$f_{D_i}(x)=\frac{4!}{(i-1)!(4-i)!}\frac{1}{6}\left(\frac{x}{6}\right)^{i-1}\left(\frac{6-x}{6}\right)^{n-i}$$ The expectation for each $D_i$ would be, $$E[D_i]=\sum_{x=1}^6x \cdot f_{D_i}(x)$$ With this method I get $D_2 = 2.398$, $D_3 = 3.435$, and $D_4 = 7.022$ for a sum of $12.855$. Approximating it with the code example I get around $\{12.2447, 12.24464, 12.24494\}$ using 100,000 samples which seems like a pretty significant difference.
This question is similar to this one: Finding the expected value of four dice when only the Lowest three count, but I wanted to know why my application of order statistics was wrong.
Code is as follows:
from numpy import array, sort
from numpy.random import uniform
cycles = 100000
total = 0
for i in range(cycles):
rolls = sort(array(uniform(1,7, size=4), dtype=int))
total += sum(rolls[1:])
print(total/cycles)