Quant puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 71
- Topics
- 12
- Hard
- 30
007You roll a fair six-sided die six times. What is the expected number of different faces that appear?Quant tradingProp trading firms
Try it first
Your estimate before any working?
Show the worked solution
About 3.99. Give each face an indicator that equals 1 if that face appears at least once. A given face is missed on all six rolls with probability (5/6) to the 6th, about 0.335, so it appears with probability 0.665. The expected count of distinct faces is the sum of the six indicators' expectations: 6 x 0.665 = 3.99. No case listing is needed.
Why not list the cases?
You could work out the chance of exactly one, two, up to six distinct faces and average them. It works, but it needs Stirling numbersCounts of the ways to split a set of items into a given number of non-empty groups; they appear when counting surjections. or a lot of careful counting, and it is easy to slip. Linearity of expectation lets you ignore how the faces interact: the expected total of several indicators is the sum of their expectations, whether or not they are independent. Here the six indicators are clearly dependent, since seeing many faces leaves fewer rolls for the others, and it does not matter at all.
Each of the six faces appears at least once with probability 66.5%, so the expected number of distinct faces is six times that, 3.99; the exact distribution peaks at four distinct faces and has all six only 1.5% of the time. How does the indicator trick work step by step?
Think of a teacher counting how many of six friends turn up to a party. Instead of listing every guest list, she asks for each friend separately how likely that friend is to come, then adds. Write the count as I1 + I2 + ... + I6, where I_k is 1 if face k appears; take expectations; each E[I_k] is just the probability face k appears. Face k is missed on one roll with probability 5/6, on all six with (5/6) to the 6th, 0.335. So each indicator averages 0.665 and the total averages 3.99.
The relationshipD the number of distinct faces seen in six rolls (5/6)^6 the chance a given face never appears in six rolls What it says in wordsThe expected number of distinct faces is six times the chance that any one face appears.Where does this pattern reappear?
The same shape answers how many distinct birthdays a group of n people has, how many of n hash buckets get used, and how many different stocks a random sample of trades touches. For n faces and n rolls, the expected share of faces seen is 1 - (1 - 1/n) to the n, which tends to 1 - 1/e, about 63.2%, as n grows. Six faces give 66.5%, already close. The exact enumeration of all 46,656 rolls gives a mean of 3.9906, the same number.
Where candidates lose it
The instinctive answer is 6, or something close to it, because six rolls over six faces feels like one of each. In reality repeats are the norm, and all six different faces happen in under 2% of runs.
The costlier trap is starting to enumerate cases under time pressure. Candidates who try to list exactly four distinct faces lose minutes. Say indicator variables and linearity in the first sentence.
What the interviewer asks next
- What is the expected number of faces that appear exactly once?
- How many rolls do you need, on average, to see all six faces?
- What is the variance of the number of distinct faces?
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.)
040Game: roll a fair die and receive its face in rupees; whenever you roll a six you also roll again and add the next result, with no limit on repeats. What is the expected payout of the game?Quant tradingOptions market making
Try it first
What is the game worth?
Show the worked solution
Rs 4.20. Every roll pays its face, averaging 3.5, and with probability 1/6 the game then starts again, worth the same V. So V = 3.5 + V/6, which gives (5/6)V = 3.5 and V = 4.2. A second route agrees: the number of rolls averages 1/(5/6) = 1.2, and each averages 3.5, so 1.2 x 3.5 = 4.2.
Why write the game in terms of itself?
A pass that gets a free renewal each time you use it on a lucky day is worth its first use plus, on lucky days, another pass exactly like it. When a game can repeat with no memory, the value after the repeat is the value of the whole game, so one equation replaces an infinite sum. Here, after a six you are paid 6 and then face precisely the game you started with, worth V.
Faces 1 to 5 end the game, and a six pays 6 and restarts the same game, so V = (5/6) x 3 + (1/6) x (6 + V), which solves to V = 4.2; the number of rolls averages 1.2, and 1.2 x 3.5 gives the same 4.2. How do you set up the equation without slipping?
Condition on the first roll. With probability 5/6 it shows 1 to 5, averaging 3, and you stop. With probability 1/6 it shows 6: you collect 6 and then expect V more. So V = (5/6) x 3 + (1/6) x (6 + V), which simplifies to V = 3.5 + V/6, and V = 3.5 x 6/5 = 4.2. The form 3.5 + V/6 is worth saying: every roll pays 3.5 on average, and one time in six you get another go at the whole game.
The relationshipV expected payout of the game, in rupees 3 average of faces 1 to 5 6 + V payout after a six: the six itself plus a fresh game What it says in wordsThe game's value is one roll's average plus a one-in-six chance of the whole game again.Check by counting rolls. The chance a roll triggers another is 1/6, so the number of rolls averages 1/(1 - 1/6) = 1.2, and each roll averages 3.5 whatever came before, giving 1.2 x 3.5 = 4.2. Summing the series directly, k sixes and then a stop, also lands on 4.2, but the recursion gets there in two lines. The limitation to name if asked to price it: 4.2 is a fair value for one play; the payout has a long right tail, since two sixes in a row, one time in 36, already pay at least 13.
Where candidates lose it
The usual loss is capping the chain: adding one re-roll, 3.5 + 3.5/6 = 4.08, and stopping. The re-roll can be a six too, and the question says there is no limit.
The second is writing V = 3.5 + V without the 1/6, which has no solution, or forgetting the six itself is paid before the restart. Condition on the first roll and write each branch in full.
What the interviewer asks next
- What would you pay to play if a six pays nothing but gives a re-roll?
- What is the probability the payout exceeds 12?
- Now a one ends the game with zero payout. What is the game worth?
052You roll a fair die repeatedly until the first six appears. What is the expected sum of all the rolls before the six, not counting the six itself?Quant tradingProp trading firms
Try it first
Pick your answer before working it.
Show the worked solution
15. The first six takes 6 rolls on average, so 5 rolls come before it. Each of those rolls is known not to be a six, so it is uniform on 1 to 5 and averages 3. Expected count times expected size gives 5 x 3 = 15. The check: all rolls including the six average 6 x 3.5 = 21, and taking off the final six leaves 15.
How many rolls come before the six?
Picture waiting at a stop where each minute a bus arrives with chance 1 in 6. On average you wait 6 minutes, and the sixth is the one where it comes. The number of rolls up to and including the first six is geometric with mean 1/p = 6, so the number strictly before it is 5. That is the first factor. Most candidates get this far; the loss comes in the second factor.
A typical game has five non-six rolls before the stopping six, and each of those rolls averages 3 because it is known not to be a six, so the expected sum is 5 x 3 = 15; the full-sum check of 6 x 3.5 less the final 6 also gives 15. Why is each of those rolls worth 3 and not 3.5?
Because you are told something about them. Every roll before the stopping six is, by definition, not a six, so its distribution is the die conditioned on 1 to 5, which averages exactly 3. Using 3.5 gives 17.5, the most common wrong answer. It is the same slip as averaging the income of people who did not win a prize with everyone's income, prize winners included.
The relationshipN the number of rolls before the first six, mean 5 X | X not 6 a roll known not to be a six, uniform on 1 to 5 E the expected sum from any fresh start What it says in wordsExpected count times the expected size of each piece gives 15, and the one-step recursion confirms it.How do you check 15 a second way in the room?
Two checks, both fast. The recursion: with chance 5/6 the next roll is not a six, adds 3 on average and you are back where you started, so E = (5/6)(3 + E), which solves to 15. The full sum: Wald's identityFor a stopping time N that does not look into the future, the expected sum of N independent identical draws equals E[N] times the mean of one draw. applied to every roll including the six gives 6 x 3.5 = 21, and the last roll is always exactly 6, so the rest must average 15. Say both; the second one shows you understand why the conditional mean is 3.
Where candidates lose it
The trap is 17.5: the right count, 5, multiplied by the unconditional mean of a die. The interviewer set the question up so that the rolls you sum are selected, not random, and wants to see whether you notice.
The second trap is multiplying 6 rolls by 3.5 and stopping at 21, which includes the six the question told you to exclude. Say what is counted before you multiply.
What the interviewer asks next
- What is the expected sum if you do count the six?
- What is the expected sum of the rolls before the first time you roll a 1 or a 2?
- What is the expected number of rolls until two sixes in a row?

