quant finance

The probability brainteasers trading desks still ask

A trading-firm interviewer slides a fair six-sided die across the table and says: roll it, read the number, and that’s your payout in dollars, except you get one option to reroll and take whatever comes up instead. What’s the game worth, and what’s your rule for using the reroll? Answer that cleanly in under a minute, out loud, and you’ve cleared the opening bar at Jane Street, Optiver, SIG, IMC, Citadel Securities, and most other desks that still run a phone screen full of probability.

The rule falls out of one idea. A fresh roll is worth 3.5 on average, so keep any first roll above that and reroll anything below. Keep 4, 5, 6; reroll 1, 2, 3. Half the time you keep, and those kept rolls average 5. The other half you reroll into a fresh die worth 3.5. So the game is worth 0.5(5) + 0.5(3.5) = 4.25. Interviewers care less about the 4.25 than about hearing you say “compare each roll against what a reroll is worth” without being prompted.

The reroll game rewards backward reasoning

Now they add rerolls. Say you get two. The move is to solve it from the last decision backward, the same technique that shows up later in dynamic programming and option pricing. With one reroll left, the game is worth 4.25, as above. So on your first roll of a two-reroll game, you keep only what beats 4.25, meaning 5 or 6, and otherwise fall back into a game worth 4.25.

one reroll left:   value = 4.25
first roll, keep if > 4.25  -> keep 5, 6
E = (5 + 6)/6 + (4/6)(4.25)
  = 1.833 + 2.833
  = 4.667

Push it toward infinite rerolls and the value climbs toward 6 but never reaches it, because you would only ever settle for a 6 and might wait a long time to see one. The interviewer is watching whether you set up the recursion or start enumerating cases by hand. Enumeration works for one reroll and collapses at three.

Why “two heads in a row” takes longer than “heads then tails”

Flip a fair coin until you see two heads in a row. On average, how many flips? Then: flip until you see a head immediately followed by a tail. Same number? Most candidates say yes on reflex, and it costs them, because the answers are 6 and 4.

Set it up with states. For heads-then-tails, track whether your last flip was a head. Call E0 the expected flips from a cold start and E1 the expected flips once you’re already holding a head.

HT:  E1 = 1 + 0.5(0)  + 0.5(E1)   ->  E1 = 2
     E0 = 1 + 0.5(E1) + 0.5(E0)   ->  E0 = 4

HT is cheaper because of its failure mode. Once you have a head and you’re waiting for a tail, a wrong flip is another head, which leaves you exactly where you wanted to be: still holding a head. You never lose ground. For two heads in a row, a wrong flip after your first head is a tail, and that tail throws you back to zero.

HH:  E1 = 1 + 0.5(0)  + 0.5(E0)
     E0 = 1 + 0.5(E1) + 0.5(E0)
     solve  ->  E1 = 4,  E0 = 6

This one separates people who memorized “expected flips to first heads is 2” from people who understand why. The pattern generalizes: overlapping targets like HH punish you on a miss, non-overlapping ones like HT don’t. If you want to sound like you’ve seen it before, mention that HHH takes 14 flips while HTH takes 10, for the same structural reason.

Rolling a die until every face has shown up

How many rolls, on average, to see all six faces at least once? This is the coupon collector, and the clean way to reason is to add the waiting times for each new face. When you’ve already seen k distinct faces, the chance the next roll shows something new is (6-k)/6, so the expected number of rolls to find that new face is 6/(6-k).

Add them from the first new face to the last: 6/6 + 6/5 + 6/4 + 6/3 + 6/2 + 6/1, which is 6(1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6) = 14.7. The number worth remembering is that collecting all six takes about 14.7 rolls, and the last face alone accounts for 6 of them. That heavy tail is the whole point, and it’s why coupon-collector logic shows up when engineers reason about cache misses or test coverage.

Random experiment with a fair coin or fair die Quantity being measured Expected value
Fair coin, flipped repeatedly Flips until the first head 2
Fair coin, flipped repeatedly Flips until two heads in a row (HH) 6
Fair coin, flipped repeatedly Flips until a head then a tail (HT) 4
Fair coin, flipped repeatedly Flips until three heads in a row (HHH) 14
Fair six-sided die, rolled repeatedly Rolls until all six faces have appeared 14.7
Fair six-sided die with one optional reroll, keeping any first roll above 3.5 Value of the payout game, in dollars 4.25

Three heads in a row doesn’t mean the coin is loaded

A Bayes question, phrased the way SIG and Citadel Securities actually ask it. A coin is equally likely to be fair or two-headed, and you don’t know which one you’re holding. You flip it three times and get three heads. What’s the chance it’s the two-headed coin?

The two-headed coin produces three heads with certainty. The fair coin does it with probability 1/8. Both started at 50/50. So the posterior is (0.5)(1) divided by [(0.5)(1) + (0.5)(0.125)] = 0.5 / 0.5625 = 8/9. Not certainty, and that gap is the lesson.

The trading version of this shows up constantly. A strategy is up three days running. Real edge, or luck? The update depends entirely on your prior, on how common genuine edge is in the pool of strategies you’re looking at, not on the streak alone. Traders who skip the base rate are the ones who pile into a signal that was noise. Bayes is the single most tested idea in these loops, and it’s tested precisely because getting it wrong on the desk costs money.

Making a market when you might be the one who’s uninformed

The last kind of question stops being a puzzle with a number and turns into a game. “I’m going to roll two dice and pay you the sum. Make me a market.” The fair value is 7. The weak answer is to quote 7 at 7, or to freeze. Here’s what they’re probing: you have to give a two-sided price, a bid and an ask, knowing the interviewer picks the side and might know more than you do.

So you quote something like 6 bid at 8, wide enough that being picked off doesn’t hurt, tight enough that you don’t look lost. Then they squeeze: “I’ll deal at 6.5 or 7.5, your choice, buy or sell.” Now they want to see you take the positive-expectation side, buy at 6.5, sell at 7.5, and reprice once you’ve traded. Optiver and IMC build entire assessment days around versions of this, sometimes with live betting on a hidden card or a weighted spinner.

What they’re grading is whether your spread widens when you know less and tightens when you know more, and whether you manage a position instead of restating a fair value. Someone who quotes a razor-thin market on a payout they can’t see is telling the desk they don’t understand adverse selection. Someone who quotes a mile wide is telling them they can’t price. The good answer lives between those and moves as information arrives.

A few more that recur on phone screens, phrased close to how they land:

  • Roll a die over and over and add up the values, stopping whenever you like to keep the running sum, except you lose everything if you ever roll a 1. When do you stop?
  • You have 100 coins, 10 of them two-headed. You grab one at random, flip it, and it lands heads. What’s the chance you’re holding a two-headed coin?
  • Two players alternate flipping a fair coin, and the first to flip heads wins. What’s the first player’s edge?
  • What’s the expected number of flips of a fair coin to get three heads in a row?

What actually gets people cut

What gets people cut is almost never a wrong final number. More often it’s going quiet, or refusing to commit to an estimate before you feel sure. Say the base case out loud, bound the answer, then sharpen it. On the reroll game, start with “it’s at least 3.5, since I can always ignore the reroll,” then work to 4.25. On a market-making game, name a fair value, quote around it, and adjust when you get hit. The candidate who talks through a wrong first guess and corrects it beats the one who goes silent and hands over a clean number two minutes late. Desks want people who reason under uncertainty in real time, and the whole interview is built to watch exactly that.

newsletter

What's actually being asked right now

Interview patterns & comp trends, straight to your inbox.

No spam. Unsubscribe anytime.

newsletter

What's actually being asked right now

Interview patterns & comp trends, straight to your inbox.

No spam. Unsubscribe anytime.

1972 Soviet postage stamp commemorating the Mars 2 probe

worth a read

Mars For The Rest of Us — a weekly-or-more deep dive on the technical side of Mars exploration: rocket propulsion, microbiology, mission architecture, and everything in between. Written by Maciej Ceglowski.

Read it on Substack →
Scroll to Top