Quant puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 71
- Topics
- 12
- Hard
- 30
019A casino flips a fair coin until the first head appears and pays 2 to the power n rupees if that happens on flip n. Its bank holds only 2 to the power 20 rupees, so it pays at most that. What is the fair price of the game?Hudson River TradingNew York · 2020
Try it first
What is the fair price with the bank capped at 2 to the 20 rupees?
Show the worked solution
Rs 21. Flip n pays 2 to the n with probability 1/2 to the n, so each of flips 1 to 20 contributes exactly 1 rupee: 20 rupees. Beyond flip 20 the casino pays its whole bank, 2 to the 20, and the chance of getting that far is 1/2 to the 20, which adds 1 more. The famous infinite value collapses to 21 as soon as the payer's bank is finite.
Why is the uncapped game worth infinity?
Each extra flip halves the chance and doubles the prize, so each flip adds the same 1 rupee to the average, forever. An expected value is a sum over outcomes of prize times chance, and when every term is 1 and there are infinitely many terms, the sum has no limit. That is the St Petersburg paradox, discussed by Daniel Bernoulli in the eighteenth century: the mathematics says pay anything, and nobody would pay more than a modest sum.
Every flip up to the twentieth contributes exactly 1 rupee to the expected value, and the capped payouts beyond it add up to just 1 more, so a casino with a bank of 2 to the 20 rupees offers a game worth Rs 21. What exactly does the cap remove?
Picture a lottery that promises to double your prize every day for ever, run by a shop with a small safe. The later promises are worth nothing because the shop cannot keep them. The cap turns every term after flip 20 from 1 rupee into 2 to the 20 divided by 2 to the n, which is 1/2, 1/4, 1/8 and so on, and those add up to exactly 1. So the tail that made the value infinite is now worth a single rupee. The bank is Rs 10,48,576 and the game is worth Rs 21.
The relationship2^n the payout if the first head arrives on flip n 2^{-n} the chance the first head arrives on flip n 2^{20} the bank, which caps every later payout What it says in wordsTwenty flips worth a rupee each, plus a capped tail worth one rupee.What does this teach about pricing a payoff?
Doubling the bank adds only one rupee to the fair price: a bank of 2 to the 30, about Rs 107 crore, makes the game worth Rs 31. The value grows with the logarithm of what the counterparty can pay, so the realistic price of a lottery-like payoff depends on who stands behind it. The same idea appears in trading as counterparty risk: a contract's promised payout in extreme states is only worth what the other side can deliver in those states.
Where candidates lose it
Candidates recite the St Petersburg paradox and answer infinity, missing the cap in the question. The interviewer has changed one word to see whether you hear it.
The second loss is getting 20 by stopping at the cap and forgetting the tail. Every sequence of 20 tails still pays the full bank, and that last piece is worth exactly one more rupee.
What the interviewer asks next
- How big must the bank be for the game to be worth Rs 50?
- How much would a player with logarithmic utility pay for the uncapped game?
- If you could play the capped game a million times, how would the average payout behave?
Asked at Hudson River Trading, Prop Trading, New York, 2020 (Wall Street Oasis):
Questions on EV for coin tosses, law of large numbers, Bayes theorem
028You roll two fair dice and are paid the larger of the two faces in rupees. What is the expected payout?Jane StreetNew York · 2026
Try it first
Pick the expected payout before you count.
Show the worked solution
161/36, about Rs 4.47. The larger face equals k in 2k minus 1 of the 36 equally likely outcomes: 1, 3, 5, 7, 9 and 11 cells for k from 1 to 6. Multiply each value by its count and add: 1 + 6 + 15 + 28 + 45 + 66 = 161. Divided by 36, that is 4.47, almost a full point above a single die's 3.5.
Why is the answer well above 3.5?
When two friends each suggest a restaurant and you always go with the better rated one, your average dinner beats either friend's average. Taking the larger of two draws pulls the result toward the top, because a low result survives only if both draws are low. A payout of 1 needs both dice on 1, one cell in 36. A payout of 6 needs just one six, and 11 cells in 36 contain at least one.
The larger face is 1 in one cell, 2 in three cells and so on up to 6 in eleven cells; face times count sums to 161, so the expected payout is 161/36, about 4.47, against 3.50 for one die. How do you count the cells without listing all 36?
Count the outcomes where the larger face is at most k: both dice must be at most k, which is k squared cells. The cells where the larger face is exactly k are k squared minus (k - 1) squared, which is 2k - 1. That is the L-shaped band in the grid: a new row and a new column, sharing one corner cell. The bands are 1, 3, 5, 7, 9 and 11, and they add to 36, which is the check that nothing was double counted.
The relationshipk the value of the larger face 2k - 1 the number of the 36 outcomes where the larger face is exactly k What it says in wordsWeight each possible payout by how many of the 36 outcomes produce it, then divide by 36.A second route helps when the interviewer changes the dice. Add up the chance that the payout reaches each level: the payout is at least k unless both dice are below k, so the sum of 1 minus (k - 1) squared over 36, for k from 1 to 6, is 6 minus 55/36, which is 161/36 again. Two methods landing on the same fraction is the check worth saying out loud. By symmetry the smaller face averages 7 minus 4.47, about 2.53, and with three dice the larger face rises to 4.96.
Where candidates lose it
The common slip is to treat the six payouts as equally likely and answer 3.5, or to say a bit more than 3.5 without a number. The grid shows how uneven the counts are: eleven ways to be paid 6 against one way to be paid 1.
The second slip is counting 12 cells for a payout of 6, which counts the double six twice. The row of sixes and the column of sixes share one cell.
What the interviewer asks next
- What is the expected value of the smaller face?
- What is the expected larger face with three dice?
- I pay you the larger face minus the smaller. What is that worth?
Asked at Jane Street, Investment Operations, New York, 2026 (Wall Street Oasis):
First interview was testing simple math brainteasers (e.g. expected value of dice throws, etc.)
064You may roll a fair die up to three times. After each roll you either stop and are paid the face showing, or roll again; if you reach the third roll you must take it. What is your optimal stopping rule, and what is the game worth?RBC Capital MarketsToronto · 2025
Try it first
On the first roll you see a 4. What do you do?
Show the worked solution
Keep a 5 or 6 on the first roll, a 4, 5 or 6 on the second, and take whatever the third gives; the game is worth 14/3, about 4.67. Work backwards. The last roll is worth 3.5. With two rolls left, keep anything above 3.5: (4 + 5 + 6)/6 + (1/2)(3.5) = 4.25. With three, keep anything above 4.25: (5 + 6)/6 + (2/3)(4.25) = 14/3.
Why start from the last roll?
Think of house hunting with three viewings booked: whether to accept the first flat depends on what the remaining viewings are likely to offer, and you only know that once you know how you would behave at the last one. The value of continuing at any point is defined by what you would do later, so the only roll whose value you know outright is the last one, and every earlier decision is built on it. That is backward induction, and the interviewer wants to hear the words before any numbers.
Solving from the last roll upwards, the third roll is worth 3.5, so the second roll keeps 4, 5 or 6 and is worth 4.25, so the first roll keeps only 5 or 6 and the whole game is worth 14/3, about 4.67. How do the values build up?
On the last roll you take the face, worth 3.5. On the second roll, stop if the face beats 3.5, which means 4, 5 or 6; otherwise you get 3.5 from the last roll. The value is the average of the faces you keep plus the chance you continue times the value of continuing: (4 + 5 + 6)/6 + (3/6)(3.5) = 4.25. On the first roll, the bar to beat is now 4.25, so only 5 and 6 are kept: (5 + 6)/6 + (4/6)(4.25) = 11/6 + 17/6 = 14/3, about 4.667.
The relationshipV_n the value of the game with n rolls still available max(f, V_n) keep the face f if it beats rolling on, otherwise take the value of continuing What it says in wordsEach extra roll is worth the average of the better of the face and the value of carrying on.What does the common shortcut cost, and where does this lead?
The shortcut is to keep anything above the single-roll average of 3.5 at every stage. On the first roll that keeps a 4, which gives 4.625 instead of 4.667. The threshold rises with the number of rolls left, because each spare roll is an option, and an option is worth more the longer it lives. With six rolls the value is 5.27, and with many rolls it approaches 6, since you can wait for a six. The same structure prices an American option: exercise early only when the payoff beats the value of holding on.
Where candidates lose it
The trap is the fixed threshold: stopping on 4 at the first roll because 4 beats 3.5. It ignores that the comparison is with the value of continuing, which is 4.25 with two rolls left, not 3.5.
The second loss is computing forwards, trying to enumerate all paths from the first roll. Say backward induction, solve the last roll, and build up; three lines of arithmetic do the whole job.
What the interviewer asks next
- What is the game worth with four rolls?
- You now pay Rs 1 for each reroll. How does the rule change?
- If you are paid the square of the final face, what is the first-roll rule?
Asked at RBC Capital Markets, Quantitative Trading, Toronto, 2025 (Wall Street Oasis):
Best way to maximize EV across 3 chosen dice rolls (can choose to continue or not).
075You roll two fair dice and are paid the product of the two faces in rupees. What is the expected payout?Wolverine TradingChicago · 2024
Try it first
What is the expected product?
Show the worked solution
Rs 12.25. The two dice are independent, so the expected product equals the product of the expected faces: 3.5 x 3.5 = 12.25. A check on the 6 by 6 grid: row i averages 3.5i, and the six row averages, 3.5 to 21, average 12.25. If both numbers came from one die, the answer would be E[X squared] = 91/6, about 15.17, which is not the question.
Why can you multiply the averages?
Picture a shop whose daily takings are footfall times average spend, where the two have nothing to do with each other. Over a year, average takings are average footfall times average spend. When two quantities are independent, the average of their product is the product of their averages, because knowing one tells you nothing about how big the other will be. That fails the moment they move together: a crowded day with bigger spending lifts the product above the product of averages. Two dice thrown separately are the textbook independent pair.
Across the 36 equally likely cells of the multiplication grid each row averages its row number times 3.5, so the grand average is 3.5 x 3.5 = 12.25, even though 23 of the 36 products are below it; squaring a single die would give 15.17 instead. How do you check 12.25 by brute force quickly?
Sum the grid by rows. Row i of the multiplication table sums to i x 21, so the whole grid sums to 21 x 21 = 441, and 441 / 36 = 12.25. That is the product rule made visible: the grid's total factors into the first die's total times the second die's total. Note too that the product is skewed: only 18 different values appear, most cells are small, and the big ones, 25, 30 and 36, pull the mean up, so {BELOW75} of the 36 outcomes pay less than the average.
The relationshipX, Y the two independent die faces 21 the sum of the faces 1 to 6 441 the sum of all 36 products What it says in wordsThe grid's total is the product of the two dice's totals, so the average product is the product of the averages.What is the interviewer likely to ask next?
The usual next step changes the dependence. If the same die is used for both numbers, you are paid the square of one roll, and its expectation is 91/6, about 15.17, higher by exactly the variance of one die, 35/12. That gap is the covariance at work: E[XY] = E[X]E[Y] + Cov(X, Y). Then comes the price: if you would pay to play, you should quote around 12.25 and note that the payout's standard deviation is about 8.94, so a single play is very noisy relative to its mean.
Where candidates lose it
The trap is computing E[X squared] instead of E[XY], getting 15.17, usually because the candidate thinks of rolling one die and squaring. The other slip is answering 18 by taking the midpoint of 1 to 36.
Say independent and give 3.5 x 3.5 inside five seconds; then offer the row-sum check, 21 x 21 / 36, so the interviewer sees you can verify it.
What the interviewer asks next
- What is the expected payout if you are paid the square of a single roll?
- What is the variance of the product of two dice?
- You may reroll one of the two dice once after seeing both. What is the game worth?
Asked at Wolverine Trading, Sales and Trading, Chicago, 2024 (Wall Street Oasis):
don't think I was what they were looking for. Questions on EV & Dice.

