Optimal Switching in the Two Envelope Problem
Two envelopes contain $\$X$ and $\$2X$, where $X \sim U(0, a)$ for some known $a > 0$. You pick one envelope uniformly at random and look at the value inside. You then decide whether to keep it or switch to the other envelope.
What is the optimal strategy? Under this strategy, what is the probability that you end up with the envelope containing $\$2X$?
Work it out for general $a$, then verify with $a = 100$.
Hints
- If you observe a value greater than $a$ inside your envelope, what can you conclude with certainty about which envelope you are holding?
- When the observed value is at most $a$, both envelopes could contain that value -- but one is more likely. Compare how often each envelope produces a value $\leq a$.
- Condition on whether $v > a$ or $v \leq a$, find $P(\text{holding } X \mid v \leq a) = 2/3$, then apply the law of total probability.
Worked Solution
How to Think About It: This is a classic decision theory problem, and the key is to use the information you gain from looking inside the envelope. If you see a value greater than $a$, you know for certain you are holding the $\$2X$ envelope (since the $\$X$ envelope can only contain values up to $a$). If you see a value at most $a$, it could be either envelope -- but one is more likely than the other. The strategy is straightforward: use the observed value as a signal about which envelope you are holding.
Quick Estimate: Without any strategy (just random guessing), you get the $\$2X$ envelope with probability $1/2$. With the ability to observe and switch, you should do strictly better. Since you can perfectly identify the $\$2X$ envelope whenever $X > a/2$ (because only $2X$ exceeds $a$), and you can make an informed switch otherwise, a probability around $3/4$ feels right.
Approach: Analyze the optimal strategy by conditioning on whether the observed value exceeds $a$, then use the law of total probability.
Formal Solution:
The optimal strategy: If you see a value $v > a$, keep it (you must have the $\$2X$ envelope). If you see $v \leq a$, switch (you are more likely holding the $\$X$ envelope).
Why switching is correct when $v \leq a$: The $\$X$ envelope always contains a value in $[0, a]$. The $\$2X$ envelope contains a value in $[0, a]$ only when $X \leq a/2$, which happens with probability $1/2$. So conditional on seeing $v \leq a$, it is twice as likely that you are holding the $\$X$ envelope as the $\$2X$ envelope. Formally:
$$P(\text{holding } X \mid v \leq a) = \frac{2}{3}, \quad P(\text{holding } 2X \mid v \leq a) = \frac{1}{3}$$
So switching when $v \leq a$ gives you the $\$2X$ envelope with probability $2/3$.
Computing the overall probability:
First, find $P(v > a)$. The observed value exceeds $a$ only if you picked the $\$2X$ envelope AND $X > a/2$: $$P(v > a) = P(\text{pick } 2X) \cdot P(X > a/2) = \frac{1}{2} \cdot \frac{1}{2} = \frac{1}{4}$$
So $P(v \leq a) = 3/4$.
There are two ways to end up with the $\$2X$ envelope: 1. See $v > a$, keep it: probability $= 1/4$ (and you get $2X$ with certainty) 2. See $v \leq a$, switch to $2X$: probability $= 3/4 \cdot 2/3 = 1/2$
By the law of total probability: $$P(\text{get } 2X) = \frac{1}{4} + \frac{1}{2} = \frac{3}{4}$$
This holds for any $a > 0$, so for $a = 100$ the answer is also $3/4$.
Answer: The optimal strategy is to keep the envelope if the observed value exceeds $a$, and switch otherwise. Under this strategy, the probability of obtaining the $\$2X$ envelope is $3/4$.
Intuition
The power of this strategy comes from an asymmetry: the $\$X$ envelope is always in $[0, a]$, but the $\$2X$ envelope spills above $a$ half the time. When you observe a value in $[0, a]$, that observation is more consistent with the smaller envelope, so you should switch. When you observe a value above $a$, you know you have the larger one. This is a clean example of how even a single bit of information ("is it above $a$ or not?") can dramatically improve your decision -- going from 50% to 75% success.
In trading, this same logic appears whenever you have a signal that is informative but noisy. You do not need to perfectly identify the state of the world; you just need your signal to shift the posterior enough to make one action dominate the other. The threshold $a$ acts as a natural decision boundary, and the Bayesian update conditional on being below that boundary is what drives the edge.