Quant puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 71
- Topics
- 12
- Hard
- 30
030We play chess repeatedly. Each game is drawn with probability 1/2; of the decisive games I win 2/3 and you win 1/3. The match ends when one of us wins three games in a row, and a draw breaks any streak. What is the probability I win the match?Old Mission CapitalChicago · 2018
Try it first
Roughly what is my chance of winning the match?
Show the worked solution
86/99, about 86.9%. Track only the current streak: none, me on 1 or 2, you on 1 or 2. Each game I win with probability 1/3, you win with 1/6, and a draw, 1/2, resets the streak. Write my chance of taking the match from each state in terms of the others, solve the five equations, and the start state comes out at 86/99.
What is the state, and why is the running score not it?
A door lock that opens after three correct codes in a row does not care how many wrong codes came before the last mistake. The only thing that matters for the rest of this match is the current streak, so the states are: no streak, my streak of 1 or 2, and your streak of 1 or 2. Games won earlier, draws played, games elapsed: all irrelevant once the streak is known. That is the Markov propertyThe future depends on the past only through the present state., and spotting it turns an infinite tree of game sequences into five numbers. Per game, I win with probability 1/2 x 2/3 = 1/3, you win with 1/2 x 1/3 = 1/6, and the rest are draws.
The match has five live states and two endings; solving one equation per state gives my chance of winning as 86/99 from the start, rising to 10/11 when I am on a streak of two and falling to 8/11 when you are. How do the equations go, and how do you solve them quickly?
Let x be my chance from the start, a1 and a2 from my streaks, b1 and b2 from yours. Every equation reads the same way: play one more game, three things can happen. A draw always returns to the start, a win for me always moves to a1 or one step up, and a win for you always moves to b1 or one step up. From a2 my next win ends the match in my favour; from b2 your next win ends it against me.
The relationshipx my chance of winning the match from a fresh start a1, a2 my chance when I have won the last one or two games b1, b2 my chance when you have won the last one or two games What it says in wordsEach state's value is the average of where the next game can send the match, weighted by the chance of each result.Solve by substituting: b2 is in terms of a1 and x, which gives b1 in the same terms; feed that into a2 and a1, and the start equation leaves one unknown. The answers: x = 86/99, a1 = 29/33, a2 = 10/11, b1 = 28/33, b2 = 8/11. Check the ordering: the further I am ahead, the higher the value, and every value sits between 0 and 1. Your chance is 13/99. A quick cross-check: three wins in a row is (1/3) cubed for me and (1/6) cubed for you, a ratio of 8 to 1, which would suggest about 89%; landing within two points of that rough race is a sign no term was dropped.
Where candidates lose it
Candidates often forget that a draw resets both streaks, or they let a draw keep a streak alive. The question says draws break any streak, which is why every state has a path back to the start, and dropping that path changes the answer.
The other loss is trying to add up sequences of games. The sequences never end; the states are five. Name the states first, write one line per state, and the problem becomes algebra.
What the interviewer asks next
- What if a draw does not break a streak?
- What is the expected number of games the match lasts?
- What if the match needs only two wins in a row?
Asked at Old Mission Capital, Prop Trading, Chicago, 2018 (Wall Street Oasis):
You and I play chess. 1/2 games end in draws and in the other half I win with 2/3 probability
042A queue holds between 0 and 3 orders. Each tick at most one thing happens: with probability 0.3 a new order arrives (if there is room), with probability 0.5 one order is filled (if the queue is not empty), and otherwise nothing changes. In the long run, what fraction of ticks is the queue full?DRWNew York · 2026
Try it first
Roughly what share of ticks is the queue full?
Show the worked solution
27/272, about 9.9% of ticks. In a birth-death chain the long-run flow up across each cut equals the flow down, so share(k) x 0.3 = share(k + 1) x 0.5. Each state's share is 0.6 times the one below: weights 1, 0.6, 0.36 and 0.216, summing to 2.176. The full state gets 0.216/2.176, about 9.9%, and the queue is empty about 46% of the time.
Why can you skip solving the full set of equations?
Stand at a doorway between two rooms at a party that has settled down. Over an evening, the number of people walking through one way must match the number walking back, or one room would keep filling. In a chain that only steps up or down by one, the long-run flow across the boundary between neighbouring states must balance, which gives one simple equation per cut. Here flow up from state k is its share times 0.3, and flow down from state k + 1 is its share times 0.5.
Arrivals push the queue up with probability 0.3 and fills pull it down with probability 0.5, so each state's long-run share is 0.6 times the one below: 46.0% empty, 27.6% with one order, 16.5% with two and 9.9% full. How do the cut equations give the answer?
Write each share relative to the empty state. Each cut gives share(k + 1) = share(k) x 0.3/0.5 = 0.6 x share(k), so the weights are 1, 0.6, 0.36 and 0.216. They sum to 2.176, so the full queue holds 0.216/2.176 = 27/272 of the time, about 9.9%. The staying probabilities, 0.2 in the middle states and 0.5 when full, never enter; a chain that pauses on a state does not change the balance across cuts.
The relationshippi_k long-run share of ticks with k orders in the queue 0.3 chance of an arrival when there is room 0.5 chance of a fill when the queue is not empty What it says in wordsEach state is visited 0.6 times as often as the one below it; normalise the four weights to add to one.Check with conservation. Orders accepted per tick are 0.3 x (1 - 0.099) = 0.2702, and orders filled per tick are 0.5 x (1 - 0.460) = 0.2702: the same, as they must be. That gives a useful business number: arrivals turned away because the queue is full run at 0.3 x 0.099, about 0.030 per tick, or one arrival in ten. The model assumes one event per tick; if an arrival and a fill could happen in the same tick, the chain changes and so do the numbers.
Where candidates lose it
The common loss is assuming the four states are equally likely, or writing out all four balance equations with the self-loops and solving a 4 by 4 system under time pressure. The cut method needs three one-line ratios.
The second is inverting the ratio, using 0.5/0.3, which makes the full state the most common. Fills are faster than arrivals, so the queue must lean toward empty; check the direction before you normalise.
What the interviewer asks next
- What is the average queue length?
- What arrival probability would make the queue full 25% of the time?
- How does the answer change if the queue can hold unlimited orders?
Asked at DRW, Quantitative Research, New York, 2026 (Wall Street Oasis):
There was a problem on Chi-squared distributions which was difficult and also one on birth death chains.
083A market is either calm or stressed each day. A calm day is followed by another calm day with probability 0.8, and a stressed day is followed by another stressed day with probability 0.6. In the long run, what fraction of days are calm?DRWLondon · 2026
Try it first
What share of days are calm in the long run?
Show the worked solution
Two thirds of days are calm. In the long run the fraction of days moving from calm to stressed must equal the fraction moving back, so calm share x 0.2 = stressed share x 0.4. Calm days are therefore twice as common as stressed days, 2/3 against 1/3. The same answer comes from spell lengths: calm spells average 5 days and stressed spells 2.5, and 5 / 7.5 = 2/3.
Why can you balance flows instead of solving equations?
Think of two rooms at a party. Every few minutes, one in five people in the kitchen wanders to the lounge, and two in five people in the lounge wander back. Once the crowd settles, the numbers crossing each way must match, or one room would keep filling up. In a two-state chain the long-run shares are fixed by one equation: the share of days leaving calm must equal the share of days leaving stressed. Calm leaves at rate 0.2 and stressed at rate 0.4, so calm must hold twice as many days.
Calm days leave at rate 0.2 and stressed days at rate 0.4, so in the long run calm must hold twice as many days as stressed for the flows to balance: two thirds calm and one third stressed, with each flow equal to 2/15 of all days. The relationshippi_C the long-run share of calm days pi_S the long-run share of stressed days 1 - 0.8 the chance a calm day is followed by a stressed one What it says in wordsEach state's long-run share is the rate of leaving the other state, divided by the two leaving rates added together.How do you check it a second way?
Use spell lengths. A calm spell ends each day with probability 0.2, so it lasts 1/0.2 = 5 days on average; a stressed spell ends with probability 0.4, so it lasts 2.5 days. The chain alternates calm spell, stressed spell, calm spell, so the calm share is 5 out of every 7.5 days, which is 2/3. Two methods, one answer, in under a minute.
How fast does the chain forget where it started?
The transition matrix has a second eigenvalue of 0.8 + 0.6 - 1 = 0.4, and any gap between today's probabilities and the long-run split shrinks by that factor each day. After five days the starting state explains only 0.4^5, about 1%, of the gap, so the answer does not depend on how the week began. A trader would add the limitation: real regimes are not memoryless, and a stress spell that has already lasted a month is not as likely to end tomorrow as one that started yesterday.
Where candidates lose it
The trap is answering 80%, reading the chance of staying calm as the share of calm days. The 0.8 describes one step, and the long-run share depends on how quickly both states are left, not just one of them.
The second slip is setting up a full eigenvector calculation and running out of time. Say the flow balance in one line, then use the spell lengths as the check.
What the interviewer asks next
- Today is stressed. What is the probability that the day after tomorrow is calm?
- What is the expected number of days until the first stressed day, starting calm?
- If a desk loses Rs 2 lakh on stressed days and makes Rs 1 lakh on calm days, what is its long-run average daily P&L?
Asked at DRW, Trader Intern Interview, London, 2026 (Wall Street Oasis):
consisted of math, statistics, and probability theory (eg. one question was about markov chains
