# When rolling multiple dice, what is the average value if you only keep the highest roll?

These questions come up regarding a RPG in which you roll multiple dice, but only keep the highest value. So, suppose I were to roll 5 dice, each of which has 12 sides (numbered from 1 to 12). If I only keep the highest roll, what would the average end up being?

To throw in an additional level of complication, what would happen if the dice "explode" or "penetrate"? Explode/Penetrate=If you roll a die and roll the highest value (if you roll an 8 on an eight sided die), re-roll the die and add the results together. Repeat until you do not roll the maximum value.

• Average of how many rolls? – barak manos Nov 7 '14 at 16:17
• If it wouldn't make things extremely complicated, assume a true average over an infinite number of rolls. – user190683 Nov 7 '14 at 16:20
• It's certainly not a good answer, but if you want brute force, it's only $12^5$ combinations and a simple $max$ function on each for the first case, and that's easily done in any computer program :). – Alan Nov 7 '14 at 16:23
• This seems related: math.stackexchange.com/questions/355820/… – Jason Knapp Nov 7 '14 at 16:29

For your first question (expected value for max value of 5 rolls of a 12-sided die):

Let $X$ be the maximum value.

Then $P(X=k)=\left(\frac{k}{12}\right)^5-\left(\frac{k-1}{12}\right)^5$ for $k=1,2,...,12$.

The reasoning is that for the maximum to be $k$, you need all the rolls to be less than or equal to $k$, but not all less than $k$.

So $$E[X]=\sum_{k=1}^{12}k \left( \left(\frac{k}{12}\right)^5-\left(\frac{k-1}{12}\right)^5\right)=\frac{2604108}{12^5}\approx10.4653$$

There are one event, where the maximal number is $1$ (all dices showing $1$).

There are $2^5$ events where all dices showing either $1$ or $2$. Subtract the one event, where all dices showing $1$, you get $2^5-1$ events, where maximal number is $2$.

There are $3^5$ events, where all dices showing $1$, $2$ or $3$. Subtract the $2^5$, where the maximal number is $1$ or $2$ and you get $3^5-2^5$ events with maximal number $3$.

Continue that idea and you get the average:

$\frac{1}{12^5}\sum\limits_{i=1}^{12}(i^5-(i-1)^5)\cdot i$

(Note that $12^5$ is the whole number of possible events)

Let $P_{n}$ denote the probability to get a value of $n$:

• $P_{ 1}=(\frac{ 1}{12})^5 =\frac{ 1}{248832}$
• $P_{ 2}=(\frac{ 2}{12})^5-(\frac{ 1}{12})^5=\frac{ 31}{248832}$
• $P_{ 3}=(\frac{ 3}{12})^5-(\frac{ 2}{12})^5=\frac{ 211}{248832}$
• $P_{ 4}=(\frac{ 4}{12})^5-(\frac{ 3}{12})^5=\frac{ 781}{248832}$
• $P_{ 5}=(\frac{ 5}{12})^5-(\frac{ 4}{12})^5=\frac{ 2101}{248832}$
• $P_{ 6}=(\frac{ 6}{12})^5-(\frac{ 5}{12})^5=\frac{ 4651}{248832}$
• $P_{ 7}=(\frac{ 7}{12})^5-(\frac{ 6}{12})^5=\frac{ 9031}{248832}$
• $P_{ 8}=(\frac{ 8}{12})^5-(\frac{ 7}{12})^5=\frac{15961}{248832}$
• $P_{ 9}=(\frac{ 9}{12})^5-(\frac{ 8}{12})^5=\frac{26281}{248832}$
• $P_{10}=(\frac{10}{12})^5-(\frac{ 9}{12})^5=\frac{40951}{248832}$
• $P_{11}=(\frac{11}{12})^5-(\frac{10}{12})^5=\frac{61051}{248832}$
• $P_{12}=(\frac{12}{12})^5-(\frac{11}{12})^5=\frac{87781}{248832}$

Now let's calculate the expectancy (mean average):

$\sum\limits_{n=1}^{12}n\cdot{P_n}=\frac{1\cdot1+2\cdot31+3\cdot211+4\cdot781+5\cdot2101+6\cdot4651+7\cdot9031+8\cdot15961+9\cdot26281+10\cdot40951+11\cdot61051+12\cdot87781}{248832}\approx10.47$