The *two envelope problem* is a famous
paradox from probability theory (which we first presented on *Plus* back in September). Imagine you are given two envelopes, one of which contains twice as much money as the other. You're allowed to pick one envelope and keep the money inside. But just before you open your chosen envelope you are given the chance to change your mind. Should you stick with the envelope you picked first or switch?

To find out write $x$ for the amount that's in your chosen envelope. This means that the amount of money in the other envelope is either $2x$ or $x/2$. The probability that it's $2x$ is $1/2$ and so is the probability that it's $x/2$. So the *expected* amount you'll get for switching is

### A resolution

Let's write $A$ for the envelope you picked at first and $B$ for the other one. We write $x$ for the amount of money in $A$. Now since we haven't opened envelope $A$, $x$ isn't a fixed amount: it's a random variable. It can take one of two values: the smaller amount of money that's hidden in the two envelopes or the larger amount of money. Let's write $y$ for the smaller amount and $2y$ for the larger amount (recall that one envelope contains twice as much money as the other). Since you have picked $A$ randomly, there's a 50:50 chance that $A$ contains either of the two amounts. This means that the expected amount of money $E(A)$ in envelope $A$ is $$E(A) = \frac{1}{2}\left(y+2y\right) =\frac{3y}{2}.$$ We said above that the expected amount in envelope $B$ is \begin{equation}E(B) = \frac{1}{2}\left(2x+\frac{x}{2}\right).\end{equation} But recall that $x$ isn't a fixed amount but can take one of two values. In the case that envelope $B$ contains $2x$, envelope $A$ contains the smaller amount of money, so $x=y.$ In the case that envelope $B$ contains $x/2$, envelope $A$ contains the larger amount of money, so $x=2y.$ So in formula (1) above, the first $x$ really stands for $y$ and the second $x$ stands for $2y$. The two $xs$ in the formula are actually different and shouldn't have been added up to give $5x/4.$ Substituting the $y$ for the first appearance of $x$ in (1) and $2y$ for the second gives $$E(B) = \frac{1}{2}\left(2y+y\right)=\frac{3y}{2}.$$ Thus $E(A) = E(B)$ so there is no incentive to switch envelopes and hence no paradox.### What if you open envelope A?

What if we had already opened envelope $A$, to find $\pounds x$ inside, before being offered the chance to switch? Can we still produce the apparent paradox? If you have opened envelope $A$ then $x$ is a fixed amount of money. There's a 50:50 chance of finding $2x$ or $x/2$ in envelope $B$, so the expected amount in envelope $B$ is $$E(B) = \frac{1}{2}\left(2x+\frac{x}{2}\right) =x+\frac{x}{4} = \frac{5x}{4}.$$We heard about the two envelopes problem in a talk by the Fields medallist Martin Hairer at the Heidelberg Laureate Forum 2017. Foto: Bernhard Kreutzer for HLF (c) Pressefoto Kreutzer.

To us the above resolution of the supposed paradox appears satisfactory, but not everyone would agree. People have spent a lot of time thinking and writing about the two envelopes problem. Its Wikipedia page is a good start if you'd like to find out more.