Expected Rolls Until a Die Shows a Strict Rise
Statistics & ExperimentsModel answerLast updated
Find the expected number of fair-die rolls until a roll is strictly higher than the one before it, using a Markov-state recursion and an independent counting check.
Waiting for the First Rise
A fair six-sided die (faces 1 to 6) is rolled again and again. The process halts the first time a roll is strictly larger than the roll immediately before it. A repeated value (for example 4 then 4) does not halt it.
Let N be the total number of rolls made when the process halts. Because a comparison needs two values, N is at least 2.
Example: the rolls 3, 2, 4 give a first roll of 3, then a drop to 2 (continue), then a rise to 4 (stop). Here N = 3.
What to deliver
Compute E[N] exactly. Your answer should include:
- A clear choice of state, and a justification that it carries all the information you need.
- The equations that relate the expected remaining rolls from each state, and how you solve them.
- The final value of E[N], as an exact fraction and as a decimal.
- Ideally, a second independent derivation or sanity check.
Hints
Hint 1
Ask what part of the history affects the future. Once you know the most recent roll, do earlier rolls matter at all?
Hint 2
Let E_i be the expected number of additional rolls given the latest roll is i. From state i, a new roll j ends the game if j > i. Otherwise you move to state j. Write one equation per i and notice the system is triangular. Subtracting consecutive equations gives a simple ratio between E_i and E_{i-1}.
Hint 3
For a cross-check, use E[N] = sum over n of P(N > n). The event N > n means the first n rolls never rise, so they form a weakly decreasing sequence. Count those sequences as multisets and sum the resulting series with the negative binomial identity.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Answer
$$E[N]=\left(\tfrac65\right)^6=\frac{46656}{15625}\approx 2.986$$
I will derive it by first-step analysis and then confirm it with a completely different counting argument.
Approach 1: Conditioning on the last roll
Choosing the state
The stopping rule only compares a new roll to the previous one, and rolls are independent. So the entire relevant history is the value of the latest roll. Define
$$E_i=\text{expected number of further rolls, given the latest roll showed } i .$$
Writing the equations
From state i we always make one more roll, which lands on j with probability 1/6.
- If j > i, we halt (probability (6−i)/6) and need no more rolls.
- If j ≤ i, we carry on from state j. This includes j = i, because ties do not halt the game.
Hence
$$E_i = 1+\frac16\sum_{j=1}^{i}E_j,\qquad i=1,\dots,6 .$$
Solving
The equation for i involves only E_1 through E_i, so the system is triangular.
- For i = 1: E_1 = 1 + E_1/6, so E_1 = 6/5.
- Subtract the equation for i−1 from the one for i. Everything cancels except the new term: E_i − E_{i−1} = E_i/6. Rearranging, E_i = (6/5)·E_{i−1}.
Therefore E_i = (6/5)^i.
Adding the first roll
The first roll is unconstrained and uniform, so after it we sit in a uniformly random state:
$$E[N]=1+\frac16\sum_{i=1}^{6}\left(\tfrac65\right)^i .$$
The geometric sum equals 6((6/5)^6 − 1), so
$$E[N]=1+\left(\tfrac65\right)^6-1=\left(\tfrac65\right)^6 .$$
Approach 2: Tail sums and counting
For a nonnegative integer variable, E[N] = Σ_{n≥0} P(N > n).
The event N > n says that none of the first n rolls was a rise, i.e. the sequence is weakly decreasing. A weakly decreasing sequence of length n over 6 values is determined by how many times each value appears, so these sequences correspond to multisets of size n from 6 values. There are C(n+5, 5) of them out of 6^n equally likely sequences:
$$P(N>n)=\binom{n+5}{5}6^{-n}.$$
This is also correct for n = 0 and n = 1, where the probability is 1. Using Σ_n C(n+k−1, k−1) x^n = (1−x)^{−k} with k = 6 and x = 1/6:
$$E[N]=\left(1-\tfrac16\right)^{-6}=\left(\tfrac65\right)^6 ,$$
matching Approach 1.
Sanity checks
- N ≥ 2, and P(N = 2) = 15/36 (there are 15 strictly increasing pairs among 36). An average just under 3 is believable.
- With an m-sided die the same argument gives (m/(m−1))^m, which tends to e as m grows. That is the known result for the first rise in a sequence of continuous i.i.d. values.
- A quick simulation or exact-fraction script reproduces 2.985984.
from fractions import Fraction
def expected_rolls(m=6):
E = []
for i in range(1, m + 1):
# E_i = 1 + (1/m) * (E_1 + ... + E_i) -> solve for E_i
E.append((1 + Fraction(sum(E), m)) / (1 - Fraction(1, m)))
return 1 + Fraction(sum(E), m)
print(expected_rolls()) # 46656/15625
Complexity is O(m) time for the recursion, and the closed form is O(1).
Common mistakes
- Counting ties as a stop. Using j ≥ i changes the equations and the answer.
- Dropping the first roll. E_i counts only future rolls, so the total is 1 + average of E_i, not the average alone.
- Treating N as geometric. The chance of stopping depends on the current state, so the trials are not identical.
- Brute-forcing a 6×6 solve. The triangular structure makes the telescoping step much cleaner and less error-prone.
Extensions worth mentioning
- Biased die with probabilities p_i. The system stays triangular with E_i = E_{i−1}/(1 − p_i), giving E[N] = ∏_k 1/(1 − p_k). The tail probability is the complete homogeneous symmetric polynomial h_n(p_1,…,p_6).
- Variance. With G(t) = Σ P(N>n) t^n = (1 − t/6)^{−6} and E[N²] = 2G′(1) + G(1), we get E[N²] = 2(6/5)^7 + (6/5)^6 ≈ 10.152, so Var(N) ≈ 1.236.
- Different stopping rule (for example, stop when two consecutive rolls sum to at least 7). The system is no longer triangular, so you must solve it more carefully. Be ready to explain why a rule that stops sooner on the second roll need not have a smaller overall mean, since the tail behavior differs.