cswork / libraryOpen practice workspace

Articles

Martingale Interview Questions: Fair Games, Stopping Times, and Invalid Shortcuts

Practice martingale interviews with conditional expectations, stopping times, a bounded random walk and capped doubling examples that expose invalid shortcuts.

Martingale interview questions test whether “fair game” remains true after you specify what is known, how a decision is made, and when observation stops. Constant unconditional expectation is insufficient. A valid stopping time is also insufficient by itself to justify replacing a fixed time with an arbitrary random time in an expectation.

This guide checks those distinctions with a small absorbing random walk, a future-aware stopping mistake and a capped doubling ledger.

Evidence boundary: primary university lectures and instructor notes support the definitions and theorem conditions cited below. The particular numerical examples, derivations and recommended follow-ups are original preparation.

Define the information before calling a process fair

Primary definition: a discrete-time martingale relative to an information sequence F_n is an adapted process M_n with finite E[|M_n|] and E[M_(n+1) | F_n] = M_n. Adapted means the current value is known from the information available now. MIT's lecture presents the conditional-expectation and integrability requirements. MIT Lecture 35

Take independent fair increments X_n equal to plus or minus one, and define S_n = S_0 + X_1 + ... + X_n. Under the information generated by those increments through n, the next increment has conditional mean zero. Thus the next conditional position is the current position.

The information boundary matters. If a process description reveals the next coin outcome in advance, the same argument no longer applies to that enlarged information sequence. The question is not whether a random variable has mean zero in isolation; it is whether it has mean zero given what the decision-maker already knows.

Check integrability separately. A symbolic equality between conditional means cannot establish a martingale when the needed absolute expectations are undefined. In a finite coin-path example this condition is easy; in an unbounded payoff model it deserves attention.

Why do equal unconditional means fail?

Construct M_0=0, let M_1 be plus or minus one with equal probabilities, and set M_2=-M_1. All three unconditional expectations are zero. But once M_1 is observed, the next value is known to be its negative.

Therefore E[M_2 | F_1] = -M_1, which differs from M_1 on both possible outcomes. The process fails the martingale condition even though its mean stays flat. Our exact two-path fixture verifies both the unconditional averages and the conditional failure.

This is a useful interview distinction because a chart of average outcomes can hide predictability. Showing a level mean over repeated simulations does not show that every available history has zero conditional drift.

A related trap is to take a nonlinear transformation of a martingale and assume it remains fair. For our random walk, E[S_(n+1)² | F_n] = S_n²+1, so the square has upward conditional drift. Subtracting n gives the martingale S_n²-n. Name the correction and derive it rather than invoking a vague symmetry argument.

Decide whether a time uses future information

Primary stopping-time condition: the event “we have stopped by time n” must be determined by information available at n. First hitting a visible boundary satisfies this; selecting the best time after seeing the whole path generally does not. MIT stopping-time examples

Our smallest counterexample starts at S_0=0 with one fair step. Define T=1 if that next step is positive and T=0 if it is negative. The event T=0 depends on X_1, which is not available at time zero. Under the ordinary coin information, this is not a stopping time.

The selected value is one on a positive path and zero on a negative path, giving expected selected value one half. That apparent advantage comes from using tomorrow's outcome to decide whether today's observation should count.

Compare a legitimate rule: take the first time the walk reaches zero or four, starting from one. At each step you can tell whether the boundary has been reached. The time is random, but the decision is based entirely on the observed prefix.

A finite bound alone does not repair future awareness. Our invalid T is already at most one. Optional stopping requires a stopping time as well as the other conditions of the theorem you apply.

State which optional-stopping condition you are using

Primary theorem boundary: Yale's notes give several sufficient conditions for E[M_T]=E[M_0]: a bounded stopping time; almost-sure finite stopping with a uniformly bounded stopped range; or finite expected stopping time with uniformly bounded increments before stopping. These are alternative sufficient routes, not a list of requirements that always must hold together. Yale, theorem 9.3.1

Translate the selected route into facts about the actual process. “Bounded” might refer to time, process value or increments, and those statements are not interchangeable. A walk with unit steps has bounded increments but can wander arbitrarily far over an unbounded time.

One robust starting point is T_n=min(T,n). It is a bounded stopping time when T is a stopping time, so fixed-cap stopped expectations can be established first. Passing from those equalities to the uncapped result is a separate limit step.

Do not state that almost-sure termination automatically allows that step. It says the eventual outcome exists on almost every path; it does not control the contribution from increasingly rare but large unfinished paths.

Work a bounded absorbing walk completely

Use our original fair walk with S_0=1 and absorbing boundaries zero and four. Let T be the first hit of either boundary. Until stopping, positions stay between zero and four; every step is plus or minus one.

Termination and finite mean can be justified without guessing the answer. From any interior state, four consecutive positive increments guarantee that a boundary is reached within the next four steps. That sequence has probability 1/16. Independent future blocks therefore give a geometric upper bound on survival, implying a finite expected T.

Apply optional stopping to S_n using the bounded stopped range. If p is the probability of hitting four, E[S_T]=4p=1, so p=1/4. Three quarters of paths hit zero first. This probability statement is distinct from the expected number of steps.

For time, use the martingale S_n²-n at the bounded time T_n. Its identity gives E[T_n]=E[S_(T_n)²]-1. As n increases, T_n increases to T; the square term converges to S_T² and is bounded by 16. Monotone convergence on the time term and dominated convergence on the square term justify the limit.

Hence E[T]=16*(1/4)-1=3. This argument avoids incorrectly calling S_n²-n bounded merely because the stopped positions are bounded. Its time term is precisely what needs separate treatment.

Independently, solve first-step equations for the interior states. Success probabilities are p_i=(p_(i-1)+p_(i+1))/2, with endpoints zero and one. Expected times satisfy e_i=1+(e_(i-1)+e_(i+1))/2, with both endpoint times zero.

Starting positionReach four before zeroExpected steps to either boundary
11/43
21/24
33/43

Our local linear-system fixture reproduces this ledger and exact capped stopped identities. It checks the concrete example; it does not replace a theorem about every unbounded process.

What changes with only one absorbing boundary?

Now start a simple symmetric walk at zero and stop on first reaching plus one, with no lower boundary. The first-hitting rule is a valid stopping time. Nevertheless, the conclusion E[S_T]=E[S_0] would equate one with zero.

Primary counterexample: Durham's notes explain that this walk hits plus one almost surely but does not satisfy the conditions needed for that stopped-expectation equality. Almost-sure finite time and finite expected time are different claims. Durham optional stopping

Its expected hitting time is infinite. One way to see the conflict is that unit increments are bounded: if the mean stopping time were finite, the corresponding sufficient theorem would imply the false equality. The bounded-range route also fails because unfinished paths can visit arbitrarily negative positions.

A simulation with a fixed cap hides this distinction unless you retain unfinished paths. Dropping them and averaging only completed trajectories estimates a selected finite-horizon quantity. It cannot prove the unconditional stopping time has finite mean.

Audit doubling with a finite payoff ledger

Consider a mathematical fair-coin game with stakes one, two, four and so on after successive losses, stopping at the first win. Impose a maximum of m rounds. Ignore fees and assume each permitted stake is available; this is a theorem counterexample, not a recommended strategy.

Any win before the cap produces net payoff plus one. Losing all m rounds produces -(2^m-1) with probability 2^-m. The probability of a win by the cap is 1-2^-m.

Cap mWin probability; loss probabilityLoss payoff; expected payoff
11/2; 1/2-1; 0
37/8; 1/8-7; 0
101023/1024; 1/1024-1023; 0

At every finite cap, (1-2^-m)*1 + 2^-m*(-(2^m-1)) = 0. The high win probability is offset by a growing rare loss. Our fixture enumerates the finite coin paths independently for these caps.

As the cap grows without bound, a first head eventually appears with probability one and the limiting net payoff is plus one. Yet the capped expectations stay zero. Almost-sure convergence did not permit moving the limit inside expectation.

For any fixed magnitude cutoff K, choose m with 2^m-1>K. The expected absolute payoff carried by that loss tail is 2^-m*(2^m-1), approaching one. The rare large contributions do not vanish uniformly. This explicitly exhibits the missing uniform-integrability control discussed in Durham's notes.

Prepare an answer the interviewer can audit

Write the information sequence, candidate process and conditional-mean calculation first. Then define T from observable prefixes and name one sufficient stopping condition. Only after those checks should you use a stopped expectation to solve for a probability or time.

For a disputed shortcut, show its smallest counterexample: the two-path flat-mean process, the future-aware zero/one time, or the finite-cap payoff table. These make the missing assumption visible without a long abstract proof.

If you verify numerically, compare a bounded recurrence or enumerate finite paths. Include truncation and unfinished outcomes in the report. Agreement with a capped experiment validates that bounded calculation; it does not automatically validate an infinite-horizon limit.

Five related questions to practice

These records support the stated reasoning tasks. Our stopping-time and finite-cap demonstrations are original extensions, not claims that every linked question explicitly asks for an optional-stopping proof.

Practice questionMartingale-specific focus
Analyze profits under random walk and Brownian motionIdentify what is observed before the next increment is traded.
Compute Random Walk Hitting and Return ProbabilitiesSeparate hitting probability, recurrence and expected hitting time.
Solve quick probability questionsJustify the fair gambler's-ruin shortcut with bounded barriers.
Compute probabilities and expectations in random processesCheck the stopping assumptions before linking event counts to expected time.
Solve probability and game-theory puzzlesSeparate available information and adaptive decisions from future knowledge.

Try the random-walk information-timing exercise, then defend one stopped-expectation equality by naming its process, stopping rule and sufficient condition.

Sources and Further Reading