# Expected number of rolls when repeatedly rolling an $n$-sided die

Suppose I roll an $n$-sided die once. Now you repeatedly roll the die until you roll a number at least as large as I rolled. What is the expected number of rolls you have to make?

I know the answer to this problem, but I'm curious about possible solutions people might post.

If you roll a $k$, then there are $n-k+1$ possible numbers out of $n$ that will be greater than or equal to $k$. This gives rise to a geometric distribution, and so the expected number of rolls required after rolling a $k$ is $\frac{n}{n-k+1}$. Averaging over all $k$, the expected number of rolls will be $$\mathbb{E}=\frac{1}{n}\sum_{k=1}^n \frac{n}{n-k+1}=H_{n}$$ where $H_n$ is the $n^{th}$ harmonic series.
• This is a fundamental result about geometric distributions. If you have $k$ chance of success on a given roll, the expected number of rolls for success is $\frac 1k$ – Ross Millikan Apr 25 '17 at 3:22
• The sum is to cover the range of first rolls. If the die has seven sides and the first roll is $4$, the chance on each roll to at least match it is $\frac 47$ so the expected number of rolls is $\frac 74$. There are seven possible first rolls and we sum over them. – Ross Millikan Apr 25 '17 at 3:34