Optimal Switching in the Two Envelope Problem

Probability · Medium · Free problem
Two envelopes contain $\$X$ and $\
X$, 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 $\ X$? Work it out for general $a$, then verify with $a = 100$.

Open the full interactive solver, hints, and worked solution →