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
Statistics & Math
Quantitative Researcher
D. E. Shaw
November 29, 2026
Quantitative Researcher
Onsite
Statistics & Math
Hard

0

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
optimal stopping
dynamic programming
conditional expectation
options value
How to Approach This
  1. Define your hypotheses (H0 and H1) clearly before performing any test.
  2. Calculate required sample size BEFORE running an experiment, using power analysis.
  3. Remember the Central Limit Theorem: sample means become approximately normal with large n.
  4. Watch for Simpson's paradox. Always segment data by key dimensions.
  5. 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 Questions
Sample Answer
Clarify

Score changes only by the cards seen, and what matters for the future is the remaining composition (r,b)(r, b). Stopping locks in the current score, so we define V(r,b)V(r, b) as the expected additional gain...

Approach

Bellman equation: either stop (gain 0 more) or draw once and continue optimally. With n=r+bn = r + b:


Submit Your Answer
Markdown supported

Related Questions