Optimal Stopping in the Red and Black Card Game

Last updated: November 29, 2026

Quick Overview

A shuffled deck has 26 red and 26 black cards. You turn cards one at a time, winning one dollar for each red and losing one dollar for each black, and may stop at any time. What is the game worth with optimal play? Solve small cases by hand and then the full deck.

DRW
Statistics & Math
Quantitative Researcher
DRW
November 29, 2026
Quantitative Researcher
Onsite
Statistics & Math
Hard

0

0

0 solved


A shuffled deck has 26 red and 26 black cards. You turn cards one at a time, winning one dollar for each red and losing one dollar for each black, and may stop at any time. What is the game worth with optimal play? Solve small cases by hand and then the full deck.

This is a classic DRW onsite expected value game that rewards dynamic programming thinking under pressure. The interviewer looks for the right state, a correct recursion, exact small cases, and the insight that the option to stop is what creates value since the deck itself is fair.

What the Interviewer Expects
  • Defines state as remaining reds and blacks
  • Writes V(r,b) = max(0, weighted continuation)
  • Computes V(1,1) = 1/2 and V(2,2) = 2/3 by hand
  • Implements the recursion and gets about 2.62 for the full deck
  • Explains why the value is positive even though the deck nets to zero
Key Topics to Cover
optimal stopping
dynamic programming
expected value
backward induction
game valuation
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
  • What is the optimal stopping rule in words?
  • How does the value grow with deck size n?
  • If you must pay 10 cents per card flipped, what changes?
  • What price would you quote to buy or sell this game?
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

State is the remaining deck composition. Current profit equals reds drawn minus blacks drawn, but since total remaining is known, the future value depends only on (r,b)(r, b) remaining. Stopping locks in...

Approach

Let V(r,b)V(r, b) be the expected additional profit from optimal play with rr reds and bb blacks left. Base cases: V(r,0)=rV(r, 0) = r (draw everything), V(0,b)=0V(0, b) = 0 (stop now). Recursion:


Submit Your Answer
Markdown supported