What's the expected value of the square of the median of three 10-sided dice rolls For a recent interview I was asked:
Which of the following gives you the highest expected value? The square of a singular 10-sided dice roll or the square of the median of three 10-sided dice rolls?
I understand I can get the answer without actually finding their values

*

*Let $X = $ outcome of a single roll

*Let $Y = $ median of three rolls

So we are looking at $E(X^2)$ vs $E(Y^2)$

*

*This is the same as comparing $Var(X) + E(X)^2$ and $Var(Y) + E(Y)^2$

*Since $E(X)^2 = E(Y)^2$ by symmetry we only need to look at $Var(X)$ vs $Var(Y)$

*$Var(X)$ is obviously larger than $Var(Y)$ because $X$ is uniformly distributed between $1$ and $10$ whilst $Y$ tends to be closer to $5$
So the square of a singular dice roll is always larger than the square of the median of three dice rolls.
But do I actually find the expected value of the median squared of a 10-sided dice three times? Is there a concise way to work this out?
 A: One can find the probability that the median equals a given value by hand, doing the classical "how many ways can this happen" count. Since he median must be one of the dice values, for clarity is seems best to distinguish the cases where that value comes up exactly 1, 2 or 3 times.
Median=1
Value 1 occurs exactly once: Not possible, the median would then be greater than 1.
Value 1 occurs exactly twice: 3 choices for which dice show 1; 9 potential values for the other die: $3\times9=27$ possibilities alltogether.
Value 1 occurs exactly thrice: 1 possibility.
Overall, Median equals 1 in 28 possible dice throw results.
Median = 5
Value 5 occurs exactly once: 3 choices for which dice shows 5, 2 choices for which dice shows the lower value (4 options for that value: $1..4$) and the last dice must show a higher value ($6..10$), so $3\times2\times4\times 5 = 120$ possible dice throws.
Value 5 occurs eactly twice: 3 choices for which dice show 5, 9 possible other values for the third die, means again 27 possible dice throws.
Value 5 occurs exactly thrice: again, exactly 1 possibility.
Overall, Median equals 5 in 148 dice throw results.
The possibilities for the other Median values can be calculated the same way, the values for excactly 2 occurances will always be 27, the value for exactly three occurances will always be 1, and the value for exactly 1 occurance will vary similar to the calculation for Median=5, it will be $3\times2\times(\rm{Median}-1)\times(10-\rm{Median})$
One can make a good check by summing up the possibilities for all 10 Medians, it must of course be $1000$.
