# Probability that k is the maximum of n dice throws

Given a dice with $m$ sides that is thrown $n$ times, what is the probability that $k <= m$ is the maximum number obtained?

Here is my attempt:

In order of $k$ to be the maximum, in at least one throw I need to get $k$ (and there are $n$ ways to get this) and in the rest of $n-1$ throws I can get anything between $1$ and $k$, and there are $k^{n-1}$ ways to do this. So, $nk^{n-1}$ times out of $m^n$ I get the maximum k. Of course, this is wrong, as I count duplicates as different throws.

You might find it easier to calculate

• the probability all the throws are less than or equal to $k$
• the probability all the throws are less than or equal to $k-1$

and then take the difference to give the probability that none of the throws are strictly more than $k$, and at least one of them is $k$.

• And that would be $k^n-(k-1)^n$, right? – Paul92 Aug 7 '14 at 10:35
• @Paul92: Yes, except that you have to divide that result by $m^n$ – Henry Aug 7 '14 at 12:19

This is

$$P(X{\leq}k)=\frac{1}{m^n}\sum_{j=1}^{k}\sum_{i=1}^{n}(j-1)^{n-i}$$