Dice reroll, for quant interviews
A die is on the table and you can reroll it. The number itself is trivial — what the interviewer is watching is whether you price the reroll correctly: do you compare the face in front of you to the value of playing on, or do you just chase a six?
For candidates learning reroll, threshold, and continuation-value prompts · Updated July 21, 2026
The setup, and what’s actually being tested
A fair six-sided die is rolled and you see the face. You may keep it and be paid that many dollars, or reroll once and be paid whatever comes up the second time — no going back. What is the game worth, and what is your rule?
The arithmetic is grade-school; the interviewer does not care about it. What they are testing is whether you can name the continuation value — the expected payoff of walking away from the number in front of you — and compare the bird in the hand to it. Every reroll question, every “should I take this offer” question, every American-option intuition on the desk is this same comparison. Say the phrase “I’ll keep the roll only if it beats what I expect from playing on,” and you have already answered better than the candidate who starts multiplying.
One reroll, worked
Play the one-reroll game. If you reroll, you are handing yourself a fresh die, worth . That number — — is the price of walking away. So keep any face strictly above it and reroll anything below: keep 4, 5, 6; reroll 1, 2, 3.
Now value the strategy. Half the time (faces 4, 5, 6) you keep, averaging . Half the time (faces 1, 2, 3) you reroll into . So
Equivalently, take the max of each face against the threshold and average: . The single reroll bought you of expected value.
The keep rule, stated once
Here is the whole thing in one line, and it is worth memorizing as a shape, not a number:
This is a one-stage-lookahead stopping rule, and it is provably optimal here because the problem is monotone: raising the continuation value can only enlarge the set of faces you’d reroll, never scramble it. You never need to reason two rerolls deep at the moment of decision — you compare the face to a single number that already summarizes the entire future. The only subtlety is what that number is, and it depends on how much game is left.
Stacking rerolls: the value recursion
Give yourself a second reroll. The value of “playing on” is no longer — it is the value of the one-reroll game, which we just computed as . So with two rerolls the threshold jumps: keep only faces above , i.e. 5 and 6, and reroll everything else. The value becomes
This is a recursion — each level’s continuation value is the previous level’s game value:
The increment is the expected exceedance above the current threshold, and it shrinks every step because fewer faces clear a higher bar. That produces a staircase — — that climbs with diminishing returns toward the ceiling of 6.
Take rerolls to infinity and the fixed point solves to : with unlimited retries you simply wait for a six. The bounded games are all just partway up that same staircase.
Why the keep set gets sticky
Notice something in the table: at two rerolls you keep , and at three rerolls you still keep — the keep set didn’t move, but the value rose from to . That is not a contradiction. The keep set only jumps when the continuation value crosses an integer face; between crossings the decision is unchanged even as the game gets more valuable, because the extra reroll improves what happens after you choose to reroll, not which faces you reroll. Interviewers probe exactly this: “you said keep 5 and 6 for two rerolls — does adding a third reroll change your action?” The right answer is “no, the action is the same, but the game is worth more, because a rerolled die is now itself a two-reroll die.”
Variants that move the threshold
The is not a fact about dice; it is a fact about a threshold sitting at the continuation value. Change the economics and recompute:
- A reroll costs something. If each reroll costs $0.50, the value of playing on drops to , so you keep any face and the game is worth . Costs lower the threshold and pull marginal faces into the keep set.
- Unlimited rerolls. The threshold rises until only a six clears it, and the value is exactly .
- A different die. On a fair -sided die the one-reroll threshold is the mean ; for that’s , keep 11–20, and the game is worth .
- A non-linear payoff. If you’re paid rather than the face, you compare to , not to — a convex payoff like makes you greedier for the top faces even though the die is unchanged.
- Forced vs. optional reroll. If a low roll forces you to reroll and take the result blind, there is no threshold and the value is just ; the entire edge came from the option, not the reroll.
Common mistakes
- Thresholding against 3.5 no matter how many rerolls are left. In the two-reroll game the bar is , not — keeping a 4 there is a real error that leaves value on the table.
- Chasing the six. Rerolling a 4 “because you might hit a 6” optimizes the maximum, not the expectation. A 4 already beats the continuation value; keep it.
- Forgetting the reroll is a commitment. You cannot reclaim the number you gave up. That irreversibility is exactly why the comparison is to an expected future, not a best-case one.
- Averaging the kept faces over the wrong base. The kept average (5 for faces 4–6) is a conditional average; weight it by the probability of landing there, or work straight from and you won’t slip.
Practice the pattern
The reroll is one instance of a whole family: the answer lives in the continuation value you compare against, not in the face you happened to roll. Drill that reflex on optimal-stopping and expected-value questions in the LeetQuidity curriculum, or take the free calibration to see where your reasoning breaks under time.