Recently a friend posed me a problem:
You have $n$ dice, all of which have integer values ranging from $1$ to $j$, take on each of those values with probability $\frac{1}{j}$, and are independent of each other. If you roll those $n$ dice, then take the $k$ highest values that appear and sum them together, what is the expected value of this sum?
Now, when $k = 1$, this is simply the expected value of the maximum of $n$ i.i.d. random variables, which is not difficult to compute. But it becomes significantly trickier for even $k = 2$ (as then you are trying to maximize over the sum of two dice, which need not be independent), and so I am curious if anyone here has any good ideas.
Thank you in advance for your help!
Thank goodness for Wikipedia and for Greg Martin letting me know what to look for. Using this page -- https://en.m.wikipedia.org/wiki/Order_statistic#Dealing_with_discrete_variables -- one can arrive at this answer:
$$\mathbb{E}(\text{Roll } X \text{ d}Y \text{ and keep } Z) =$$ $$\sum_{k=0}^{Z-1} \sum_{j=1}^Y j \sum_{l=0}^k \binom{X}{l}\Big(\Big(\frac{Y-j}{Y}\Big)^l\Big(\frac{j}{Y}\Big)^{X-l} - \Big(\frac{Y-j+1}{Y}\Big)^l\Big(\frac{j-1}{Y}\Big)^{X-l}\Big).$$
One quickly notices that $0^0$ is encountered in this sum - for our purposes, this is assigned a value of $1$.
Thank you for your help, all!