Expected Sum Until Rolling a 1

Expectation · Medium · Free problem

You roll a fair six-sided die repeatedly and keep a running total of the results. The moment you roll a $1$, you stop -- and that $1$ is not added to your sum.

What is the expected value of your final sum?

Hints

  1. Think about the problem in two pieces: how many rolls contribute to the sum, and what does each contributing roll add on average?
  2. The number of non-1 rolls before the first 1 follows a geometric distribution. What is $E[X \mid X \neq 1]$?
  3. Write a self-referencing equation: $E[S] = \frac{1}{6}(0) + \frac{5}{6}(4 + E[S])$ and solve, or use Wald's identity $E[S] = E[N] \cdot E[X]$.

Worked Solution

How to Think About It: This is a classic "geometric stopping" problem. Before doing any algebra, think about it in two pieces: (1) how many "good" rolls (non-1) do you get before a 1 kills you, and (2) what does each good roll contribute on average? The stopping condition is memoryless -- every time you pick up the die, there is a $1/6$ chance the game ends. So the number of contributing rolls is geometric. Once you see that decomposition, the answer is immediate via Wald's identity.

Quick Estimate: Each roll has a $1/6$ chance of being a 1 (game over) and a $5/6$ chance of continuing. The expected number of contributing rolls before the first 1 is $E[N] = 5$ (geometric with success probability $1/6$, counting failures before the first success). Each contributing roll is equally likely to be 2, 3, 4, 5, or 6, so its expected value is $(2+3+4+5+6)/5 = 4$. Quick multiplication: $5 \times 4 = 20$. That should be the answer.

Approach: We can confirm this with a self-referencing equation for $E[S]$.

Formal Solution:

Let $S$ be the total sum. Condition on the first roll:

  • With probability $1/6$: roll a 1, stop, contribute $0$.
  • With probability $5/6$: roll some $k \in \{2,3,4,5,6\}$, add $k$ to the sum, and the remaining game looks identical to the original (by memorylessness).

The expected value of a roll given that it is not a 1:

$$E[X \mid X \neq 1] = \frac{2+3+4+5+6}{5} = 4$$

So the recursion is:

$$E[S] = \frac{1}{6} \cdot 0 + \frac{5}{6}\bigl(4 + E[S]\bigr)$$

Expanding:

$$E[S] = \frac{20}{6} + \frac{5}{6}\,E[S]$$

Subtract $\frac{5}{6}\,E[S]$ from both sides:

$$\frac{1}{6}\,E[S] = \frac{20}{6}$$

$$E[S] = 20$$

Wald's Identity (alternative): The number of contributing rolls $N \sim \text{Geometric}(1/6)$ with $E[N] = 5$. Since each contributing roll is independent and identically distributed with mean 4, Wald's identity gives:

$$E[S] = E[N] \cdot E[X \mid X \neq 1] = 5 \times 4 = 20$$

Answer: $E[S] = 20$.

Intuition

This problem is a clean illustration of a principle that shows up constantly in quant work: decompose a random sum into "how many terms" times "what each term looks like." Whenever a process runs until some stopping event, and each step is i.i.d., Wald's identity ($E[S] = E[N] \cdot E[X]$) gives you the answer almost for free. The geometric distribution for the count and the uniform distribution over non-terminal outcomes are independent, so the expected sum factors cleanly.

The deeper lesson is about memorylessness. Every time you pick up the die, the future looks exactly the same -- there is no "history" that changes your odds. This is why the recursion $E[S] = \frac{5}{6}(4 + E[S])$ works: the continuation value after a successful roll is just $E[S]$ again. This same structure appears in survival analysis, ruin problems, and any sequential process with a constant hazard rate. In trading, you see the same pattern when modeling the expected P&L of a strategy that runs until a stop-loss is hit, where each period's return is independent.

Open the full interactive solver →