Expected Die Rolls Until Two Consecutive Sixes
Last updated: November 29, 2026
Quick Overview
Find the expected number of fair die rolls until you see two sixes in a row, generalize to k sixes in a row, and explain why waiting for a six followed by a five takes fewer rolls on average.
MathWorks
November 29, 20260
0
0 solved
Find the expected number of fair die rolls until you see two sixes in a row, generalize to k sixes in a row, and explain why waiting for a six followed by a five takes fewer rolls on average.
MathWorks hires engineers and scientists who model stochastic systems in MATLAB and Simulink, and an onsite may include a probability problem that rewards setting up states rather than guessing. The interviewer checks a Markov chain or first-step analysis, a clean general formula, and intuition about pattern self-overlap.
What the Interviewer Expects
- Defines states by the length of the current run of sixes
- Writes first-step equations and solves them to get 42
- Generalizes to $E_k = (6^{k+1} - 6)/5$
- Explains that the pattern 6,5 has no self-overlap and needs only 36 rolls
- Sanity checks with k = 1 giving 6
Key Topics to Cover
How to Approach This
- Define your hypotheses (H0 and H1) clearly before performing any test.
- Calculate required sample size BEFORE running an experiment, using power analysis.
- Remember the Central Limit Theorem: sample means become approximately normal with large n.
- Watch for Simpson's paradox. Always segment data by key dimensions.
- Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
- What is the variance of the waiting time for two sixes?
- Two players bet on whether 6,6 or 6,5 appears first in the same sequence. Who wins more often?
- How would you verify 42 with a vectorized MATLAB simulation, and how many trials would you need for a tight check?
- Generalize to a biased die where a six has probability q.
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Statistics QuestionsSample Answer
Clarify
Fair six-sided die, independent rolls. Count every roll including the final one. Target first: the pattern 6,6. Then k sixes in a row. Then the pattern 6,5....
Approach
Let be the expected additional rolls when the current run of trailing sixes has length j. Condition on the next roll (first-step analysis), solve the linear system, then look for a pattern in k....