KatInterview

Expected Rolls Until a Die Shows a Strict Rise

Statistics & ExperimentsModel answer
MediumModel answerStatistics & Experimentsprobabilityexpected-valuemarkov-chain

Last updated

Find the expected number of fair-die rolls until a roll is strictly higher than the one before it, using a Markov-state recursion and an independent counting check.

Waiting for the First Rise

A fair six-sided die (faces 1 to 6) is rolled again and again. The process halts the first time a roll is strictly larger than the roll immediately before it. A repeated value (for example 4 then 4) does not halt it.

Let N be the total number of rolls made when the process halts. Because a comparison needs two values, N is at least 2.

Example: the rolls 3, 2, 4 give a first roll of 3, then a drop to 2 (continue), then a rise to 4 (stop). Here N = 3.

What to deliver

Compute E[N] exactly. Your answer should include:

  1. A clear choice of state, and a justification that it carries all the information you need.
  2. The equations that relate the expected remaining rolls from each state, and how you solve them.
  3. The final value of E[N], as an exact fraction and as a decimal.
  4. Ideally, a second independent derivation or sanity check.

Hints

Hint 1

Ask what part of the history affects the future. Once you know the most recent roll, do earlier rolls matter at all?

Hint 2

Let E_i be the expected number of additional rolls given the latest roll is i. From state i, a new roll j ends the game if j > i. Otherwise you move to state j. Write one equation per i and notice the system is triangular. Subtracting consecutive equations gives a simple ratio between E_i and E_{i-1}.

Hint 3

For a cross-check, use E[N] = sum over n of P(N > n). The event N > n means the first n rolls never rise, so they form a weakly decreasing sequence. Count those sequences as multisets and sum the resulting series with the negative binomial identity.