First 12 vs Two 7s in Dice
Probability sum 12 before two sevens is a medium quant interview question on Stochastic Calculus.
This interview question describes a head-to-head dice game where each player's winning condition is defined by different patterns in the sums of repeated rolls. The candidate must reason about a sequential process in which the timing and ordering of specific outcomes matter, rather than just their overall frequencies. The game continues until one of the two patterns appears first, so the focus is on path-dependent events and how the chance of eventual victory shifts as partial progress toward each pattern accumulates.
To tackle this, the problem leans heavily on Markov chain thinking or carefully structured recursive conditioning. The key idea is to encode "memory" in a small number of states that summarize whether you are currently close to triggering one pattern. From there, the candidate sets up transition probabilities and solves a system of equations for the eventual winning probabilities. Interviewers watch for clear state definitions, correct handling of dependence between successive rolls, and an ability to translate an informal game description into a mathematically tractable model without getting lost in brute-force enumeration.
What it tests
This problem class is governed by the principle of modeling sequential random processes with memory using Markov chains or recursive conditioning. The key is to recognize that the outcome depends not just on the current roll, but on the sequence of relevant past events—here, whether the previous roll was a 7 or not. By partitioning the process into well-defined states that capture all the information needed to determine future evolution (the Markov property), you can write equations relating the probability of winning from each state. The structure is recursive: the probability of winning from a state is expressed in terms of the probabilities from subsequent states, weighted by transition probabilities. This approach works because, in such processes, once the state is known, the future is independent of the past, allowing for a closed system of equations.
Practise this question with written feedback, or hear it in a spoken mock interview.
Get started free