Join ML Engineer Interview MasterClass (April Cohort) led by FAANG Data Scientists | Just 6 seats remaining...
ML Engineer MasterClass (April) | 6 seats left
A candidate I know solved the gambler's ruin problem perfectly, got the closed-form answer, checked it numerically. Rejected. The interviewer's feedback: "We couldn't follow their reasoning and weren't sure they understood what they were doing."
That's the trap. Jane Street, Citadel, and Two Sigma aren't running a math exam. They're watching how you think under pressure. Can you decompose an unfamiliar problem in real time? Do you name your approach before you start computing, or do you just start scribbling? When your first method stalls, do you freeze or pivot cleanly? The answer you write down matters far less than the process you make visible getting there.
This guide gives you a repeatable four-step framework you can apply to any problem they throw at you: dice games, card puzzles, random walks, urn models, optimal stopping. Not a list of solutions to memorize. A mental scaffold that gets you making visible, credible progress within the first sixty seconds of any problem.
Every quant probability interview, regardless of the specific puzzle, responds to the same four-phase attack. Memorize this table. It's the skeleton you hang everything else on.
| Phase | Time | Goal |
|---|---|---|
| Classify | 30–60 sec | Name the problem family and unlock the right toolbox |
| Simplify | 60–90 sec | Define sample space and random variables in formal notation |
| Strategize | 60–90 sec | Name your solution approach and justify it out loud |
| Execute + Sanity-Check | Remaining time | Derive the answer, then verify against at least one boundary condition |
The time splits are approximate. A hard Markov chain problem might need 3 minutes of setup. A symmetry argument might collapse execution to 30 seconds. What never changes is the order.

The problem family determines which tools are even on the table. Walking into a computation without classifying first is like opening a map after you've already driven off a cliff.
What to do:
What to say:
"This looks like an expected value problem with a recursive structure. The state space is finite, so I'm thinking Markov chain or a direct recursion, not a closed-form combinatorial argument."
Or, for a card problem:
"My first read is that this is a combinatorics problem. The sample space is all orderings of the deck, which is finite and uniform, so I can count favorable outcomes directly."
How the interviewer is evaluating you:
They want to see that you have a mental taxonomy of problem types. Candidates who skip this and start scribbling formulas immediately signal that they pattern-match to memorized solutions rather than reason from first principles. At Jane Street or Citadel, that's a red flag, not a shortcut.
Do this: Say the problem family name out loud within the first 60 seconds. Even if you're uncertain, say "my initial read is X, though it could also be Y." That uncertainty, stated clearly, is better than silent confidence in the wrong direction.
Before you compute anything, you need to know what you're computing over. Skipping formal definitions is the single most common source of wrong answers on problems that candidates "know how to do."
What to do:
What to say:
"Let me restate this to make sure I have it right. We're rolling a fair six-sided die repeatedly, and we want the expected number of rolls until every face has appeared at least once. My sample space is the set of all infinite sequences of rolls from ${1, 2, 3, 4, 5, 6}$, and my random variable $T$ is the index of the roll on which the last new face appears."
Then pause. Let the interviewer confirm or correct you. This is not wasted time. This is insurance.
How the interviewer is evaluating you:
Formal notation signals mathematical maturity. It also protects you: if your sample space is stated clearly and the interviewer agrees with it, any downstream error is a calculation error, not a conceptual one. Conceptual errors are much harder to recover from in the room.
This is the phase most candidates skip, and it's where interviewers at top firms most visibly differentiate candidates. You need to name your approach before you execute it.
What to do:
What to say:
"I'm going to use indicator random variables and linearity of expectation. For each face $i$, I'll define $X_i$ as the number of additional rolls needed to see face $i$ given that $i-1$ distinct faces have already appeared. These are independent geometric random variables, so $E[T] = \sum_{i=1}^{6} E[X_i]$, which I can compute directly."
Or for a Markov chain problem:
"I'll set up a recursion. Let $p_k$ be the probability of reaching $N$ before $0$ starting from position $k$. I can write a recurrence relation for $p_k$ in terms of $p_{k-1}$ and $p_{k+1}$, solve it with boundary conditions $p_0 = 0$ and $p_N = 1$."
How the interviewer is evaluating you:
They're checking whether you know why your approach works, not just that it works. If you announce "I'll use recursion" and the interviewer asks "why not a generating function?", you should be able to say "generating functions would work too, but the recursion is more transparent for this state space size." That's the answer of someone who owns the material.
Example: "Okay, I've defined the problem formally and I know I'm treating this as a Markov chain. Let me write down the recurrence before I start solving, so we can agree the setup is right before I do the algebra."
Now you compute. Work step by step, narrate what you're doing, and don't skip algebra in your head.
What to do:
What to say during the sanity check:
"Let me just verify this makes sense at the boundary. If $p = 1$, the gambler always wins, so $P(\text{ruin}) = 0$. Plugging $p = 1$ into my formula gives $0$. Good. And if $p = 0$, the gambler always loses, so $P(\text{ruin}) = 1$. My formula gives $1$ there too. The answer passes both checks."
How the interviewer is evaluating you:
The sanity check is not optional. It's the difference between a candidate who gets lucky and a candidate who knows they're right. Interviewers at Two Sigma and DE Shaw will often let you reach a wrong answer and wait to see if you catch it yourself. Catching your own error via a boundary check, and then fixing it, is a better signal than getting the right answer without checking.
The feedback loop. If your sanity check reveals a contradiction, that's not a failure. That's the framework working. Say: "My answer gives a probability greater than 1 when $p > 0.5$, which can't be right. Let me go back to my recurrence and check the setup." Then return to Step 3. The interviewer is watching whether you panic or pivot. Pivot.
Don't do this: Don't present your answer and immediately look up at the interviewer waiting for validation. State the answer, run the sanity check yourself, and only then invite feedback. Candidates who seek external confirmation before checking their own work signal that they don't trust their reasoning. That's a liability in a trading environment.
Two problems. Full framework, narrated out loud, exactly as you'd do it across the table from a Jane Street interviewer. The first shows you how indicator random variables collapse a hard-looking expected value problem. The second shows you how to set up a recursion, solve it, and handle the follow-up questions that always come.
The problem: You roll a fair six-sided die repeatedly. How many rolls do you expect before you've seen all six faces?
Step 1: Classify
Do this: Say the classification out loud. The interviewer needs to hear your mental model before you start writing.
Step 2: Simplify
$$T = T_1 + T_2 + T_3 + T_4 + T_5 + T_6$$
Each $T_i$ is geometrically distributed. When you have $i-1$ faces already, the probability of rolling a new face on any given roll is $\frac{6-(i-1)}{6} = \frac{7-i}{6}$."
Step 3: Strategize
Do this: Naming the theorem ("linearity of expectation") and the distribution ("geometric") before you compute signals to the interviewer that you're working from first principles, not pattern-matching to a memorized answer.
Step 4: Execute
$$E[T_i] = \frac{6}{7-i}$$
$$E[T] = \sum_{i=1}^{6} \frac{6}{7-i} = 6\left(\frac{1}{6} + \frac{1}{5} + \frac{1}{4} + \frac{1}{3} + \frac{1}{2} + \frac{1}{1}\right)$$
$$= 6 \cdot H_6 = 6 \cdot \frac{49}{20} = \frac{294}{20} = 14.7$$
where $H_6 = 1 + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5} + \frac{1}{6} = \frac{49}{20}$ is the sixth harmonic number.
Sanity check: When $n=1$ (a one-sided die), $E[T] = 1 \cdot H_1 = 1$. One roll to see the only face. Correct.
Then the interviewer does what interviewers do.
$$E[T] = \sum_{\emptyset \neq S \subseteq {1,\ldots,n}} (-1)^{|S|-1} \frac{1}{1 - \sum_{i \in S} p_i}$$
Each term corresponds to a non-empty subset $S$: you're computing how long it takes to see at least one face outside $S$, then alternating signs to count each collection event exactly once. It's exact but not pretty, and the clean harmonic sum is gone."
Do this: When the interviewer pivots to a harder variant mid-problem, don't panic and don't abandon your framework. Acknowledge what changes, state what stays the same, and give the direction of the generalization even if you don't compute it fully. That's the answer they're looking for.
The intuition question. It always comes.
The problem: You start with $\$k$. On each bet, you win $\$1$ with probability $p$ and lose $\$1$ with probability $q = 1-p$, where $p \neq \frac{1}{2}$. You stop when you reach $\$n$ (win) or $\$0$ (ruin). What is the probability you reach $\$n$?
Step 1: Classify
Step 2: Simplify
Step 3: Strategize
Step 4: Execute
$$P_k = p \cdot P_{k+1} + q \cdot P_{k-1}$$
Rearranging:
$$p \cdot P_{k+1} - P_k + q \cdot P_{k-1} = 0$$
The characteristic equation is $p r^2 - r + q = 0$, which factors as $(r-1)(pr - q) = 0$. The roots are $r_1 = 1$ and $r_2 = \frac{q}{p}$.
Since $p \neq \frac{1}{2}$, the roots are distinct, so the general solution is:
$$P_k = A + B\left(\frac{q}{p}\right)^k$$
Applying boundary conditions: $P_0 = 0$ gives $A + B = 0$, so $B = -A$. Then $P_n = 1$ gives:
$$A\left(1 - \left(\frac{q}{p}\right)^n\right) = 1 \implies A = \frac{1}{1 - \left(\frac{q}{p}\right)^n}$$
Therefore:
$$\boxed{P_k = \frac{1 - \left(\frac{q}{p}\right)^k}{1 - \left(\frac{q}{p}\right)^n}}$$
Sanity checks: - $P_0 = 0$. Correct. - $P_n = 1$. Correct. - As $p \to 1$ (you almost always win), $q/p \to 0$, so $P_k \to \frac{1 - 0}{1 - 0} = 1$ for all $k \geq 1$. Correct. - As $n \to \infty$ with $p < \frac{1}{2}$, $(q/p)^k > 1$ and $(q/p)^n \to \infty$, so $P_k \to 0$. Correct: against a house edge with infinite bankroll, you're ruined with certainty."
Now the interviewer interrupts.
Do this: When you have two solution methods, mention both. Solving the recurrence shows technical execution. The martingale argument shows conceptual depth. Interviewers at top quant shops are specifically looking for candidates who can see the same problem through multiple lenses.
The recursion setup pattern generalizes beyond gambler's ruin. Any time you see "what is the probability/expected value starting from state $k$?", your first move is: define $f(k)$, write the first-step equation, identify the recurrence, solve it, apply boundary conditions. That's the whole pattern. The specific algebra changes; the scaffold doesn't.
Most candidates who fail quant probability interviews aren't failing because they don't know the math. They're failing because of process errors that make them look unprepared even when they know the answer.
These mistakes are fixable. But you have to recognize them first.
You hear the problem, you recognize a pattern from something you've seen before, and you start writing. It feels efficient. To the interviewer, it looks like you're guessing.
The real cost isn't just wasted time. It's that you might spend four minutes on a brute-force enumeration of a problem that has a one-line symmetry argument. The interviewer watches you do it the hard way and wonders whether you'd do the same thing on a trading desk under pressure.
Don't do this: Hearing "expected number of coin flips to get heads" and immediately writing $E = \sum_{k=1}^{\infty} k \cdot (1/2)^k$ before you've even said a word.
Do this: Say out loud, "This looks like an expected value problem with a geometric structure, so I'll set up a recursion" before you write a single symbol.
The fix: spend ten seconds classifying before you touch the math. That pause is not weakness. It's signal.
This one bites smart candidates the hardest, because they assume the problem is unambiguous when it isn't.
Classic trap: "A stick is broken at two random points. What's the probability the three pieces form a triangle?" The answer depends entirely on what "random" means. Uniform on length? Uniform on position? These give different answers. If you don't state your sample space explicitly, you might solve a different problem than the one being asked, and get a confident wrong answer.
Don't do this: Computing $P(\text{triangle})$ without saying "I'm assuming both break points are chosen uniformly and independently on $[0,1]$."
The Bertrand paradox is the canonical example of this failure mode. Three different "natural" interpretations of "random chord" give three different probabilities: $1/2$, $1/3$, and $1/4$. None of them is wrong given their sample space. The candidate who doesn't define their sample space is just guessing which problem they're solving.
Before you compute anything, say: "My sample space is..." It takes five seconds and it protects you from an entire category of errors.
You've classified the problem. Now you put your head down and start working. The interviewer sits there watching you write.
This is one of the most common ways candidates lose points they've already earned. The interviewer can't see your reasoning. If you're heading toward a dead end, they can't redirect you. If you're about to do something clever, they can't give you credit for it until you're done, and by then you've lost the collaborative dynamic that top firms specifically look for.
Don't do this: Silently writing a recurrence relation for three minutes, then looking up and saying "so I get $E[X] = 1/p$."
Do this: Say "I'm going to set up a recursion here. Let $E$ be the expected number of flips from any state. After one flip, I either succeed with probability $p$ or restart, so $E = 1 + (1-p)E$. Solving that gives me $E = 1/p$."
The interviewer at Jane Street is not just grading your answer. They're deciding whether they want to work next to you. Thinking out loud is not a soft skill. It's part of the job.
You finish your derivation. The algebra worked out. You state your answer and move on.
Then the interviewer asks: "Does that answer make sense when $p = 1$?" And you realize your formula gives $E[\text{flips}] = 2$ when the coin always lands heads, instead of $1$. You made an algebra error three steps back, and you committed to a wrong answer in front of them.
Don't do this: Presenting $P(\text{win}) = \frac{p}{p+q}$ in the gambler's ruin without checking whether it equals $1$ when $p = 1$ and $0$ when $p = 0$.
A thirty-second boundary check catches most algebra errors. It also signals something the interviewer is specifically watching for: that you have the mathematical maturity to distrust your own work. Candidates who sanity-check visibly, out loud, look like senior researchers. Candidates who don't look like they've never been wrong before.
The fix: after every derivation, test one degenerate case before you declare the answer final.
Your recursion is producing a mess. The algebra isn't simplifying. You've been staring at the same line for ninety seconds. You say nothing.
This is the single most damaging thing you can do in a quant interview, and it's entirely avoidable. Freezing doesn't just cost you time. It signals that you don't have a backup plan, and that under real pressure you'd be paralyzed rather than adaptive.
Don't do this: Sitting in silence for two minutes, then saying "I'm not sure how to proceed."
Do this: Say exactly this: "My recursion is getting complicated here. Let me step back and try a symmetry argument instead, since the problem has this exchangeability property."
That sentence does three things. It shows you recognize when an approach isn't working. It shows you have alternative tools. And it keeps the conversation moving so the interviewer can engage, redirect, or confirm you're on the right track.
You're allowed to pivot. You're not allowed to freeze. The firms hiring for these roles need people who stay functional when the model breaks down at 3pm on an expiry day.
You derived the coupon collector result: $E[T] = n \cdot H_n$ where $H_n$ is the $n$-th harmonic number. The math is correct. You're done, right?
Not quite. The follow-up at Jane Street and Citadel is almost always some version of: "Okay, but why does that make sense?" Candidates who can only point at their derivation and shrug are leaving points on the table.
Don't do this: Saying "the answer is $n \ln n + O(n)$" and waiting.
Do this: Add one sentence: "Intuitively, once you have $k$ coupons, the probability of getting a new one is $(n-k)/n$, so you're waiting geometrically longer for each new type, and summing those waiting times gives the harmonic series structure."
The intuition doesn't have to be long. It has to exist. If you can't explain why your answer is reasonable in plain English, the interviewer will wonder whether you actually understand it or just executed a memorized procedure.
| Keywords / Signals | Problem Family | Go-To Tool |
|---|---|---|
| "how many rolls," "first time," "until you see" | Expected value | Recursion or indicator r.v.s + linearity of expectation |
| "choose k from n," "how many ways," "at least one" | Combinatorics | Direct counting, inclusion-exclusion, symmetry |
| "sequence of bets," "win/lose until broke or rich" | Markov chain | Gambler's ruin recurrence |
| "fair game," "expected value of stopping time" | Martingale | Optional stopping theorem |
| "random walk," "return to origin," "absorption" | Markov chain / random walk | Balance equations, generating functions |
| "given that," "conditional on," "updated belief" | Conditional probability | Bayes' theorem, law of total probability |
| "optimal time to stop," "maximize expected reward" | Optimal stopping | Dynamic programming, secretary problem structure |
Coupon Collector. Expected draws to collect all $n$ coupons:
$$E[T] = n \cdot H_n = n \sum_{k=1}^{n} \frac{1}{k} \approx n \ln n$$
Use when: "how long until you've seen every value at least once."
Geometric Series.
$$\sum_{k=0}^{\infty} r^k = \frac{1}{1-r}, \quad |r| < 1$$
Use when: a recursion produces a first-step decomposition with a geometric structure.
Gambler's Ruin Win Probability. Starting at $k$, absorbing barriers at $0$ and $N$, win probability $p \neq \frac{1}{2}$:
$$P(\text{win} \mid X_0 = k) = \frac{1 - (q/p)^k}{1 - (q/p)^N}, \quad q = 1-p$$
When $p = \frac{1}{2}$: $P(\text{win} \mid X_0 = k) = k/N$.
Linearity of Expectation.
$$E\left[\sum_{i} X_i\right] = \sum_{i} E[X_i]$$
No independence required. Use indicator random variables $X_i = \mathbf{1}[\text{event}_i]$ to decompose any counting expectation.
Optional Stopping Theorem. If $M_t$ is a martingale and $\tau$ is a stopping time with $E[\tau] < \infty$ (and bounded increments), then:
$$E[M_\tau] = E[M_0]$$
Use when: you need the expected value at a stopping time without solving the full distribution.
Run at least two of these before committing to your answer.
Before you write a single symbol, run this in your head:
Doing this visibly, even if it takes 20 seconds of silence, signals exactly the kind of structured thinking quant desks are hiring for.
Classifying the problem:
"This looks like an expected value problem with a geometric structure, so I'll set up a first-step recursion."
Announcing your strategy:
"I'm going to define indicator random variables for each event and use linearity of expectation, which avoids needing independence."
Stating your sample space:
"Let me be precise about the sample space: I'm treating each sequence of outcomes as equally likely, so $\Omega$ is all infinite binary sequences."
Pivoting when stuck:
"My recursion is getting unwieldy here. Let me step back and try a symmetry argument instead, which might give a cleaner path."
Running the sanity check aloud:
"Before I finalize this, let me check the boundary: when $p = 1$, the formula gives $P(\text{win}) = 1$, which is correct. I'm confident in the answer."
Answering the intuition follow-up:
"The intuition is that each additional coupon is harder to collect than the last, and the harmonic series captures exactly how that marginal difficulty accumulates."