Expected Sum of Dice Rolls Until a Target Face

Expectation · Medium · Free problem

You repeatedly roll a fair 6-sided die and keep a running total of every value you roll. The process stops the moment you roll a 1. What is the expected value of the running total at that point (including the final 1)?

Follow-up: Suppose instead you stop the first time you roll a 6, or any other specific face $k \in \{1, 2, 3, 4, 5, 6\}$. Does the expected total change?

Hints

  1. Decompose the total sum into the contribution from non-stopping rolls plus the final stopping roll. What distribution does the number of non-stopping rolls follow?
  2. Each non-stopping roll is uniform on the five remaining faces. Compute $E[X \mid X \neq 1]$ and use Wald's identity: $E[\sum_{i=1}^{N} X_i] = E[N] \cdot E[X]$.
  3. For the follow-up, write $E[X \mid X \neq k] = (21 - k)/5$ and notice that $5 \cdot (21-k)/5 + k$ simplifies to 21 for every $k$.

Worked Solution

How to Think About It: Each roll is either the stopping roll (you hit 1) or a non-stopping roll. The non-stopping rolls each contribute a random value drawn uniformly from $\{2, 3, 4, 5, 6\}$, and you keep rolling until you finally hit 1. So the total sum decomposes into: (sum of all the non-stopping rolls) + 1. The number of non-stopping rolls follows a geometric distribution, and the conditional expectation of each non-stopping roll is just the average of the five non-stopping faces. Multiply those together and add the final 1.

Quick Estimate: On average, how many times do you roll before hitting 1? Each roll has a $1/6$ chance of being a 1, so you expect $5$ non-stopping rolls before the first 1 appears (the mean of a Geometric($1/6$) distribution, counting only failures). Each non-stopping roll averages $(2+3+4+5+6)/5 = 4$. So the total is roughly $5 \times 4 + 1 = 21$.

Approach: Use the decomposition $S = (\text{sum of non-stopping rolls}) + (\text{stopping value})$ with Wald's identity.

Formal Solution:

Let $N$ be the number of rolls before the first 1 appears. Each roll independently lands on 1 with probability $1/6$, so $N \sim \text{Geometric}(1/6)$ counting failures only:

$$E[N] = \frac{1 - 1/6}{1/6} = 5$$

Each of the $N$ non-stopping rolls is uniformly distributed on $\{2, 3, 4, 5, 6\}$, independent of $N$. The conditional mean of a single non-stopping roll is:

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

By Wald's identity, the expected sum of the $N$ non-stopping rolls is:

$$E\left[\sum_{i=1}^{N} X_i\right] = E[N] \cdot E[X_i \mid X_i \neq 1] = 5 \times 4 = 20$$

Adding the final roll of 1:

$$E[S] = 20 + 1 = 21$$

Follow-up: Now suppose the stopping face is $k$ instead of 1. The number of non-stopping rolls is still $\text{Geometric}(1/6)$ with $E[N] = 5$, since each face has probability $1/6$. The conditional mean of a non-stopping roll is:

$$E[X_i \mid X_i \neq k] = \frac{21 - k}{5}$$

where 21 is the sum of all faces $1 + 2 + \cdots + 6$. So:

$$E[S] = 5 \cdot \frac{21 - k}{5} + k = (21 - k) + k = 21$$

The expected total is always 21, regardless of which face stops the process.

Answer: The expected sum is $\boxed{21}$, and this holds no matter which face you designate as the stopping face. The cancellation is exact: a higher stopping face contributes more on the final roll but less on average per non-stopping roll, and vice versa. The two effects cancel perfectly because every face has the same probability $1/6$.

Intuition

The beautiful symmetry here is that every face of a fair die has the same probability, so the "role" each face plays in the total is interchangeable. When you designate face $k$ as the stopper, you remove $k$ from the pool of non-stopping contributions and add it as a fixed final payment. The non-stopping pool loses exactly $k$ from its total, but the final roll adds back exactly $k$ -- so the expected sum stays at 21 regardless. This is a clean application of linearity of expectation and Wald's identity, and it is the kind of symmetry argument interviewers love to see.

In practice, this type of reasoning appears whenever you need to compute expected costs or payoffs of a process that terminates on a random trigger. The key pattern is: decompose the total into "contribution per step" times "expected number of steps" plus the terminal value. Once you see the decomposition, the problem becomes arithmetic.

Open the full interactive solver →