Value of Optimally Stopping a Red and Black Card Game
Last updated: November 29, 2026
Quick Overview
A shuffled deck has 26 red and 26 black cards. You flip cards one at a time, gaining 1 for each red and losing 1 for each black, and may stop at any time. What is the value of the game under optimal play and what is the optimal rule?
D. E. Shaw
November 29, 20260
0
0 solved
A shuffled deck has 26 red and 26 black cards. You flip cards one at a time, gaining 1 for each red and losing 1 for each black, and may stop at any time. What is the value of the game under optimal play and what is the optimal rule?
A harder probability question in the style of D. E. Shaw quantitative research onsites, testing dynamic programming over states and the instinct to compute exactly rather than guess. Strong candidates frame it as optimal stopping, write the recursion, and explain why the answer is positive even though the deck is balanced.
What the Interviewer Expects
- Defines the state as remaining reds and blacks, not the running score alone
- Writes $V(r,b) = \max(0, \frac{r}{n}(1+V(r-1,b)) + \frac{b}{n}(-1+V(r,b-1)))$
- Gets the base cases right (only blacks left, only reds left)
- Computes small cases by hand and the full value numerically, about 2.62
- Explains why the value is positive: the option to stop is worth something
Key Topics to Cover
How to Approach This
- Define your hypotheses (H0 and H1) clearly before performing any test.
- Calculate required sample size BEFORE running an experiment, using power analysis.
- Remember the Central Limit Theorem: sample means become approximately normal with large n.
- Watch for Simpson's paradox. Always segment data by key dimensions.
- Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
- Why is the value of the game with no option to stop exactly zero?
- Describe the shape of the optimal stopping boundary in terms of (reds left, blacks left).
- How does the value grow with the deck size 2n?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Statistics QuestionsSample Answer
Clarify
Score changes only by the cards seen, and what matters for the future is the remaining composition . Stopping locks in the current score, so we define as the expected additional gain...
Approach
Bellman equation: either stop (gain 0 more) or draw once and continue optimally. With :