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 for the amount that's in your chosen envelope. This means that the amount of money in the other envelope is either or . The probability that it's is and so is the probability that it's . So the *expected* amount you'll get for switching is

Since that’s bigger than , you should swap envelopes. But what if you are given another chance to swap envelopes after you have changed your mind once? By the same reasoning as above you should swap back again. And then, by the same argument again, you should swap a third time, and so on, forever. You end up in an infinite loop of swapping and never get any money at all. What’s wrong with this reasoning?

### A resolution

Let’s write for the envelope you picked at first and for the other one. We write for the amount of money in . Now since we haven’t opened envelope , 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 for the smaller amount and for the larger amount (recall that one envelope contains twice as much money as the other). Since you have picked randomly, there’s a 50:50 chance that contains either of the two amounts. This means that the expected amount of money in envelope is

We said above that the expected amount in envelope is

(1) |

But recall that isn’t a fixed amount but can take one of two values. In the case that envelope contains , envelope contains the smaller amount of money, so In the case that envelope contains , envelope contains the larger amount of money, so So in formula (1) above, the first really stands for and the second stands for . The two in the formula are actually different and shouldn’t have been added up to give

Substituting the for the first appearance of in (1) and for the second gives

Thus 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 , to find inside, before being offered the chance to switch? Can we still produce the apparent paradox?

If you have opened envelope then is a fixed amount of money. There’s a 50:50 chance of finding or in envelope , so the expected amount in envelope is

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.

The formula is now correct. It tells you that on average (if you repeated the same wager many times with the same amount in envelope ), you’d do better by switching. The paradox doesn’t arise. If after switching to envelope you are given the chance to switch back again, you won’t because you already know that the amount in is less than the expected amount in . The paradox arose in the original version because both envelopes could be treated the same — the situation was symmetric. Once you have opened envelope , however, the symmetry is broken.

Notice, however, that opening envelope and seeing the amount may change your mind about the probability that envelope contains or For example, if is a very large amount, then you might think it very unlikely that envelope contains the even larger amount . Writing for the probability that envelope contains the larger amount, the expectation becomes

This is greater than if and only if In other words, as long as you’re confident that is less than you should switch envelopes.

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.

## Comments

## Formula still wrong.

This problem causes us to confuse prior (before information is learned) and posterior (after information is learned) probabilities. The prior probability that A has the lower amount is 1/2. The same posterior probability is:

Pr(A=x & B=2x)/[Pr(A=x & B=2x) + Pr(A=x & B=x/2)].

The posterior probability that A has the higher amount is:

Pr(A=x & B=x/2)/[Pr(A=x & B=2x) + Pr(A=x & B=x/2)].

These are the expressions you must use in the expectation under "What if you open envelope A?". In general, they can't both be 1/2 - your benefactor would have to possess an infinite supply of money.

## Why is it wrong?

I'm inclined to agree and suggest going a bit deeper. The confusion between prior and posterior probabilities results from the fact that no decision is in fact made, however much we think we're seeing into what would happen were it made, so no new information is in fact ever learned. And that decision was never made because it was revoked before being implemented and nothing changes, including information. If a decision does change anything, then it can't be revoked or switched, at least not without cancelling the resulting information changes too.

In this crucial respect the two envelopes problem differs from Monty Hall (which some people compare it to), since in the latter the first decision does result in new information which the player can then use for their next. But switching doors doesn't mean they're revoking their first decision. They can't.

(When I finally hit the SAVE button, I can't change anything either. Oh well, here goes)

## Opening the envelope doesn't change much

If only notes are involved then if you open an envelope with say £1 that will limit the choices. If the envelopes are filled with care, so that the smaller one does not contain 1 (or an odd amount) of the minimum denomination, then all is good.

Try my solution: http://lesliegreen.byethost3.com/articles/TwoEnvelope.pdf

## It does change "much" ...

... but what it changes is unknown. This is why the issue is indeed the distribution.

An example might help. Say your monk (from the link) put a $10 bill in one envelope. He then put nine $5 bills and one $20 bill into a bucket. With his eyes closed, he picked one bill from the bucket and put it in the second envelope.

The statement "one envelope contains either half, or twice, what is the in other" is still a true statement. The chances that you pick the higher, or lower, envelope are indeed both 50%. But if you open your envelope and see $10, the chances are 90% that you have the larger envelope, not 50%.

The formula Exp(other) = (X/2)*Prob(higher) + (2X)*Prob(lower) is correct. What is wrong in the calculation is assuming Prob(higher) = Prob(lower) = 1/2 when you claim your envelope contains X. They are actually the relative probabilities that the pair of envelopes contained (X/2,X) and (X,2X), which you have no way of knowing.

## The last "Notice, however" part is right.

Opening the envelope does change the possibility of 2x or x/2. They can't believed to be same as 1/2 anymore.