Skip to content

Final length of a die sequence with resets

Question

A fair six-sided die is rolled over and over while you maintain a running sequence:

  • an even result (22, 44 or 66) is appended to the sequence;
  • a 33 or a 55 wipes the sequence clean (the 33 or 55 itself is not recorded);
  • a 11 is appended and the game stops.

For instance, the rolls 3,4,2,6,5,2,4,13,4,2,6,5,2,4,1 leave the final sequence 2,4,12,4,1 of length 33. What is the expected length of the sequence when the game ends?

Short answer

22. The final sequence is the run of rolls after the last 33 or 55, up to the first 11. Looking backwards, that run lasts until the first odd number, and each roll in it is odd with probability 12\tfrac12, so its length is geometric with mean 22. (Simply ignoring 33s and 55s and answering 44 is the classic trap.)

Adapted from QuantQuestions.io; question and answer rewritten by SelfMadeQuant.com.

See the hint and the full worked solution in the question bank (free account).

Open the worked solution

Lessons behind this question

Start with a free lesson: Expectation, Variance and Covariance is part of a free topic. Create a free account, no card needed, to read it in full with worked solutions.

Read it free