I've been trying to figure out the expected value of the outcome when you roll three N sided dice and take the sum of the larger two values. Would also like to know the EV for when you take the sum of the smaller two values, though I assume these have symmetry around the die's average value.
I get that I can take the EV of the total average sum, and subtract the EV of the minimum, but calculating the EV of the minimum of 3 is the hard part. I know each single die is a uniform discrete RV, I'm just having trouble turning that concept into a PMF for the minimum of the 3. I guess the PMF that the minimum is k can be written as the probability that all three RVs are less than or equal to k and at least one of the 3 equals k, and got (3N^2 - 3N + 1)/N^3 but when trying to get the EV from that I can an answer that doesn't match simulations for test N values.
Following @ThomasAndrews' comment, denote by $X_1$, $X_2$ and $X_3$ the three dice, by $X_{(1)}$, $X_{(2)}$ and $X_{(3)}$ the sorted dice. Then the expectation of the two largest is \begin{align*} \mathbb E[X_{(2)}+X_{(3)}] &= \mathbb E[X_{(1)}+X_{(2)}+X_{(3)}-X_{(1)}]\\ &= \mathbb E[X_1+X_2+X_3]-\mathbb E[X_{(1)}]\\ &= 3\frac{N+1}{2}-\sum_{k=1}^N \mathbb P[X_{(1)}\geq k]\\ &= 3\frac{N+1}{2}-\sum_{k=1}^N \left(\frac{N-k+1}{N}\right)^3\\ &=3\frac{N+1}{2}-\frac{1}{N^3}\sum_{k=1}^N k^3\\ &=3\frac{N+1}{2}-\frac{1}{N^3}\frac{N^2 (N+1)^2}{4}\\ &= \frac{6 N(N+1)-(N+1)^2}{4N}\\ &=\frac{5 N^2+4N-1}{4N} \end{align*}