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 (, or ) is appended to the sequence;
- a or a wipes the sequence clean (the or itself is not recorded);
- a is appended and the game stops.
For instance, the rolls leave the final sequence of length . What is the expected length of the sequence when the game ends?
Short answer
. The final sequence is the run of rolls after the last or , up to the first . Looking backwards, that run lasts until the first odd number, and each roll in it is odd with probability , so its length is geometric with mean . (Simply ignoring s and s and answering 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 solutionLessons behind this question
- Conditional Expectation and Variance Revisited
- Counting and Combinatorics
- Expectation, Mean, and Variance
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