---
title: "Optimal Stopping Problem"
type: concept
related: [Martingale Model]
source: https://www.jemoka.com/posts/kbhoptimal_stopping_problem/
confidence: high
status: active
---

Shuffle cards Keep revealing cards &ldquo;Stop&rdquo; when there&rsquo;s &gt;50% chance the next card to be revealed is black We can Frequentist Definition of Probability calculate the probability of a given card remaining is black:
\begin{equation} pblack(b,r) = \frac{26-b}{52-(r+b)} \end{equation}
now:
\begin{equation} pwin(b,r) = \begin{cases} 0, b+r = 52 \\ \max \qty[ \begin{align}&amp;pblack(p,r), \\ &amp;pblack(b,r)pwin(b+1,r) + (1-pblack(b,r)pwin(b, r+1) \end{align}] \end{cases} \end{equation}
&ldquo;with the theory of the Martingales, this comes out to be 50%&rdquo;
