Quant interview prep guides

Random walks, for quant interviews

A coin, a step, and a running total — the simplest process in finance and the one interviewers use to check whether you actually understand how uncertainty accumulates. The trap is that almost everything true of one step stops being true of the sum.

For candidates seeing hitting-probability, market-model, or gambler’s ruin prompts · Updated July 21, 2026

The step process is the whole object

A random walk is a running total of independent, identical bets. Let X1,X2,…X_1, X_2, \dotsX1​,X2​,… be the steps — each +1+1+1 or −1-1−1 — and let Sn=∑i=1nXiS_n = \sum_{i=1}^{n} X_iSn​=∑i=1n​Xi​ be your position after nnn steps, starting from S0=0S_0 = 0S0​=0. In the symmetric walk each step is ±1\pm 1±1 with probability 1/21/21/2; in the biased walk it is +1+1+1 with probability ppp and −1-1−1 with probability q=1−pq = 1 - pq=1−p.

Before touching a specific question, say what an interviewer is really checking: whether you keep the two moments of SnS_nSn​ straight. The step has an expectation and a variance; the sum inherits them by two different rules, and candidates who blur those rules get every downstream question — hitting times, ruin, volatility scaling — subtly wrong. State the two facts up front and the rest of the interview is bookkeeping: E[Sn]\E[S_n]E[Sn​] adds the step means, Var⁡(Sn)\Var(S_n)Var(Sn​) adds the step variances because the steps are independent.

Expectation stays put; variance grows

For one symmetric step, E[Xi]=12(+1)+12(−1)=0\E[X_i] = \tfrac12(+1) + \tfrac12(-1) = 0E[Xi​]=21​(+1)+21​(−1)=0, so E[Sn]=0\E[S_n] = 0E[Sn​]=0 for every nnn: the walk has no drift and no pull. But “expected position zero” does not mean “stays near zero.” The spread is what moves. Since Var⁡(Xi)=E[Xi2]−E[Xi]2=1−0=1\Var(X_i) = \E[X_i^2] - \E[X_i]^2 = 1 - 0 = 1Var(Xi​)=E[Xi2​]−E[Xi​]2=1−0=1 and the steps are independent, variances add: Var⁡(Sn)=n\Var(S_n) = nVar(Sn​)=n. The standard deviation is n\sqrt{n}n​.

That single line — variance linear in time, standard deviation like t\sqrt{t}t​ — is the most-tested fact about random walks, so anchor it with a number. After 100100100 steps the typical displacement is about ±10\pm 10±10, not ±100\pm 100±100 and not ±50\pm 50±50. Run it four times as long, to 400400400 steps, and the spread only doubles to ±20\pm 20±20. Uncertainty accumulates, but it accumulates slowly, and the t\sqrt{t}t​ is why.

Random-walk sample paths spreading inside a square-root-of-t envelopeGrey ragged unit-step paths start at the origin and spread over time, staying mostly inside an emerald band of plus and minus the square root of t, which grows steeply then flattens.SPREAD GROWS LIKE √t, NOT LIKE t+√t−√t+100−10050100steps t →
Each grey path is one realization; the emerald band is plus and minus the square root of t. The paths fan out, but the band widens ever more slowly — quadruple the time and the spread only doubles. That flattening is the signature of variance growing linearly while the standard deviation grows like the square root of time.

The derivation the interviewer wants on the board

When they ask you to show it, keep it to two lines and name the assumption each line uses.

E[Sn]=∑i=1nE[Xi]=n (p−q)\E[S_n] = \sum_{i=1}^{n} \E[X_i] = n\,(p - q)E[Sn​]=i=1∑n​E[Xi​]=n(p−q)

— linearity of expectation, which needs no independence. For the symmetric walk p=q=12p = q = \tfrac12p=q=21​ so this is 000.

Var⁡(Sn)=∑i=1nVar⁡(Xi)=n (1−(p−q)2)\Var(S_n) = \sum_{i=1}^{n} \Var(X_i) = n\,\bigl(1 - (p-q)^2\bigr)Var(Sn​)=i=1∑n​Var(Xi​)=n(1−(p−q)2)

— and this line is where independence earns its keep: the cross-covariance terms vanish only because the steps are uncorrelated. For the symmetric walk Var⁡(Xi)=1\Var(X_i) = 1Var(Xi​)=1, so Var⁡(Sn)=n\Var(S_n) = nVar(Sn​)=n and, because the mean is zero, E[Sn2]=n\E[S_n^2] = nE[Sn2​]=n — a favorite one-line follow-up. The whole t\sqrt{t}t​ law is just “independent variances add, then take a square root.”

Gambler’s ruin, with real numbers

Now the canonical trading-desk version: absorbing barriers at 000 and NNN, and you start with iii. In a fair game the reach-the-top probability is beautifully linear, P(hit N first)=i/N\Prob(\text{hit } N \text{ first}) = i/NP(hit N first)=i/N. Take i=3i = 3i=3, N=10N = 10N=10: you reach 101010 with probability 3/10=30%3/10 = 30\%3/10=30% and go broke with probability 70%70\%70%, and the expected game length is i(N−i)=3×7=21i(N-i) = 3 \times 7 = 21i(N−i)=3×7=21 steps.

Gambler's ruin number line with absorbing barriers at zero and NA number line from 0 to 10 with absorbing walls at both ends, a token at position 3, and arrows for an up-step with probability p and a down-step with probability q.GAMBLER'S RUIN · ABSORBING WALLS AT 0 AND Nfair: p = q = ½biased: p = 0.4, q = 0.6012345678910RUINTARGET Npqstart i = 3reach N: fair 30% · biased 4.2%expected length (fair): 21 steps
You start with 3 and the game ends only at 0 (broke) or 10 (target). In a fair game you reach the target 30% of the time and the average game lasts 21 steps; tilt each step to 40/60 against you and the target probability falls to about 4.2%.

Then they tilt the odds and watch you. Make each step +1+1+1 with probability p=0.4p = 0.4p=0.4 against you, so r=q/p=1.5r = q/p = 1.5r=q/p=1.5, and the win probability becomes 1−r i1−r N\dfrac{1 - r^{\,i}}{1 - r^{\,N}}1−rN1−ri​. Plug in: r3=3.375r^3 = 3.375r3=3.375, r10=57.665r^{10} = 57.665r10=57.665, giving 1−3.3751−57.665=2.37556.665≈4.19%\dfrac{1 - 3.375}{1 - 57.665} = \dfrac{2.375}{56.665} \approx 4.19\%1−57.6651−3.375​=56.6652.375​≈4.19%. A 101010-percentage-point edge against you did not shave 30%30\%30% down to 25%25\%25% — it collapsed it to about one in twenty-four. That geometric sensitivity, not the fair-game line, is the point of the question.

Probability of reaching the target versus starting wealth, fair straight line against biased convex curveThe fair game is a straight diagonal from 0 to 1; the biased game is a convex curve hugging the floor, far below the fair line at a starting stake of 3.PROBABILITY OF REACHING N BEFORE RUIN00.510510starting wealth ifair: p = i/N0.30biased (p=0.4)0.042
In a fair game the reach-the-target probability is exactly your fraction of the pot, the straight emerald line i/N. A 40/60 tilt bends it into the slate curve that hugs the floor until the very end — at a starting stake of 3 the target probability drops from 30% to about 4%.

Hitting a level, recurrence, and the infinite wait

“Will the symmetric walk ever reach +100+100+100?” Yes — with probability 111. The one-dimensional symmetric walk is recurrent: it returns to the origin, and reaches every level, almost surely. The catch that separates a good answer from a glib one: the expected time to get there is infinite. Certain to happen, but with no finite average wait — a distinction interviewers probe because it kills naive “it’ll mean-revert soon” reasoning.

Add drift and certainty breaks. With an upward bias, p=0.6p = 0.6p=0.6, the walk still climbs forever, but the probability it ever dips a dollar below its start is q/p=0.4/0.6=2/3q/p = 0.4/0.6 = 2/3q/p=0.4/0.6=2/3 — even a persistent tailwind leaves a two-in-three chance of being underwater at some point. Ever reaching +1+1+1 has probability min⁡(1, p/q)=1\min(1,\, p/q) = 1min(1,p/q)=1; ever reaching −1-1−1 has probability min⁡(1, q/p)=2/3\min(1,\, q/p) = 2/3min(1,q/p)=2/3. Recurrence is a knife-edge property of the exact symmetry, and it snaps the moment there is drift.

Why this is the market’s baseline model — and where it cracks

The reason interviewers care: the log-price of an asset is modeled as a random walk with drift, and the entire t\sqrt{t}t​ machinery becomes the rule for scaling volatility across horizons. If daily returns have standard deviation 1%1\%1% and are independent, then annual volatility is 1%×252≈15.87%1\% \times \sqrt{252} \approx 15.87\%1%×252​≈15.87% — you scale by time\sqrt{\text{time}}time​, never by time. Every “annualize the vol” question is this fact wearing a suit.

Then name the caveats, because a candidate who recites the model without its failure modes looks junior. Real returns are not i.i.d.: volatility clusters, tails are fatter than the walk predicts, and t\sqrt{t}t​ scaling breaks the instant returns are autocorrelated. And prices are bounded below by zero, so the arithmetic walk (which happily goes negative) is replaced by a walk in log price — geometric, not additive. The random walk is the right first sentence and the wrong last word.

Common mistakes

  • Confusing variance with standard deviation. Variance grows linearly in ttt; the spread grows like t\sqrt{t}t​. Saying the walk wanders “proportionally to time” is the single most common error and it flips every scaling question.
  • Believing the symmetric walk is pulled back to zero. Mean zero is not mean reversion. There is no restoring force; the walk is recurrent but drifts arbitrarily far, and “it’s due to come back” is the gambler’s fallacy.
  • Reusing fair-game intuition on a biased game. In gambler’s ruin a tiny edge compounds geometrically, not linearly. Reaching for i/Ni/Ni/N when p≠qp \neq qp=q is wrong by an order of magnitude, as the 30%→4%30\% \to 4\%30%→4% example shows.
  • Forgetting the wait is infinite. “Reaches the level with probability one” and “reaches it in finite expected time” are different claims for the symmetric walk; only the first is true.
  • Letting modeled prices go negative. Treating the price (not log-price) as an additive random walk permits negative prices and misses drift — a tell that you memorized the model without its constraints.

Practice the pattern

Random walks reward one discipline: keep the mean and the variance on separate tracks, and remember which one grows like t\sqrt{t}t​. Drill step-process, hitting-time, and ruin questions in the LeetQuidity curriculum, or take the free calibration to see where your reasoning breaks under time.

Take the calibrationView the curriculum

On this page

The step processVariance grows like √tThe formal derivationGambler’s ruinHitting & recurrenceThe market modelCommon mistakes

Related guides

Gambler's Ruin Interview QuestionsStochastic Processes Quant Interview GuideGambler's Ruin Quant Interview GuideBrownian Motion Quant Interview BasicsQuant Interview Cheat Sheet: Formulas, Identities and Fast MethodsQuant Interview Drills by Topic
LeetQuidity

The complete quant interview course.

InstitutionsCurriculumPricingFAQCalibrationDemoGuides
XLinkedInInstagramYouTube

© 2026 LeetQuidity — a W Interior company. All rights reserved.

Privacy PolicyTerms of ServiceTrust & Security