paradox #6
In this lesson

Wide tables, equations, and code scroll sideways. Swipe, or Tab to focus them and use the left and right arrow keys.

Two envelopes paradox

You will learn: Specify the sampling and information protocol before comparing conditional gains.

Start with: Conditioning and independence · Expectation and variance

Two envelopes: one contains x dollars, the other contains 2x. You pick one at random and find y dollars inside. Should you switch to the other envelope?

The argument for switching: The other envelope contains either y/2 (if you have the larger) or 2y (if you have the smaller), each with probability 1/2. So:

E[other]=12⋅y2+12⋅2y=5y4>yE[\text{other}] = \tfrac{1}{2}\cdot\tfrac{y}{2} + \tfrac{1}{2}\cdot 2y = \tfrac{5y}{4} > y

Since 5y/4 > y, you should always switch. But then the same argument applies to the other envelope, and you should switch back — forever. Clearly something is wrong.

win rate by game0%20%40%60%80%100%100200300400500gamewin rate
Always switch (dashed)
48.6%
Always stay (solid)
51.4%

The flawed argument:

You see value y in your envelope. The other holds y/2 or 2y with equal probability, so E[other] = (y/2 + 2y)/2 = 5y/4 > y — always switch!

The error:

After seeing y, calculate the relative chances of y/2 and 2y from the prior. They may be equal for a particular y, but a fair initial envelope choice does not guarantee that. Before observing an amount, each strategy has probability 1/2 of obtaining the larger envelope. A finite run fluctuates; a conditional choice is a different strategy.

A fully enumerated finite prior

This second experiment chooses the smaller amount X from 1, 2, 4 (powers of two). Its prior mass at 2ⁱ is proportional to qⁱ. A fair choice of envelope is made independently, and its amount Y is revealed. All 6 possible prior-and-envelope outcomes appear below; this is separate from the log-normal simulation above.

Given observed Y = 2Value
Probability of observing Y0.333333
Probability this is the smaller envelope0.500000
Expected amount after switching2.50000
Expected gain from switching0.500000
Choice maximizing conditional expected amountSwitch
Smaller XSeen YOtherJoint probabilityCompatible with selected Y?
1120.166667No
1210.166667Yes
2240.166667Yes
2420.166667No
4480.166667No
4840.166667No

Before seeing Y, always stay and always switch have expected amounts 3.50000 and 3.50000. Choosing the higher conditional expectation after seeing Y gives 4.16667 under this known prior. Expected amount and probability of obtaining the larger envelope are different objectives. At the largest possible Y, you certainly hold the larger envelope and switching loses half; there is no universal conditional advantage.

The first simulation draws X from Lognormal(0, 0.7), then assigns X and 2X by a fair independent choice. Blue and orange record obtaining the larger envelope under unconditional switching and staying. The second experiment enumerates a separate finite prior.

What the simulation shows

Each strategy has a 50% probability of selecting the larger envelope before its contents are observed; empirical frequencies fluctuate. “Always switch” is not better than “always stay.” The paradox is entirely in the argument, not in the math.

Where the argument breaks

The flaw is treating 1/2 as automatic for every revealed amount. It can hold at particular amounts under particular priors, but does not follow from the fair initial envelope choice.

  • If x is a positive integer and y is odd, y cannot equal 2x: you hold the smaller envelope. Other conclusions depend on the specified prior and its support.
  • The correct conditional probabilities P(you hold larger | you see y) and P(you hold smaller | you see y) depend on the prior distribution of x.

The finite example below has equal conditional probabilities at some observations and unequal probabilities at others. What fails is asserting equal probabilities without doing that conditioning calculation.

Enumerate a proper finite prior

In the second experiment, X takes the powers of two 1, 2, …, 2^(L−1), with prior probabilities proportional to qⁱ. Independently choose one of X and 2X with equal probability and reveal its amount Y. There are 2L joint outcomes, all listed with their probabilities.

At L = 3 and q = 1, smaller amounts 1, 2, and 4 are equally likely. If Y = 2, the compatible cases are X = 1 with the larger envelope selected, and X = 2 with the smaller selected. They have equal joint mass, so the other amount is 1 or 4 with equal conditional probability and expected value 2.5. Switching has expected gain 0.5 here. Seeing Y = 8 instead identifies X = 4 and the larger envelope with certainty: switching loses 4.

Before revealing Y, both always-stay and always-switch have expected amount 3.5. Choosing by conditional expected gain has expected amount (2 + 1 + 4 + 2 + 8 + 8)/6 = 25/6 ≈ 4.16667 under this known finite prior. Positive gains at selected observations do not imply a gain at every possible observation.

Make a prediction

At L = 3, q = 0.1, and observed Y = 2, is switching still favorable in expected amount?

Explore the answer

No. The smaller-envelope case has conditional probability 0.1/1.1 = 1/11. The other amount’s conditional mean is (10/11)·1 + (1/11)·4 = 14/11 ≈ 1.27273, below 2. The observed amount is the same; the prior changed.

Write the conditioning calculation

For a discrete prior with mass p(x), the compatible joint masses are p(y)/2 for holding the smaller envelope and p(y/2)/2 for holding the larger. Normalize their sum. Missing support points have mass zero. For a continuous prior with density f, the doubled-value branch contributes f(y/2)/2 because of its change of scale:

P(smaller∣Y=y)=f(y)f(y)+f(y/2)/2.P(\text{smaller}\mid Y=y)=\frac{f(y)}{f(y)+f(y/2)/2}.

The formula describes a conditional density calculation; observing an exact continuous value is not a positive-probability point event. The demo’s discrete prior avoids that subtlety and makes every conditional denominator explicit.

Choose the objective and the information

The top chart measures the frequency of obtaining the larger envelope under two strategies chosen without using its amount. It draws a log-normal smaller amount, then a fair envelope choice. It does not plot monetary expected gain. The lower table uses a different, finite prior and chooses a strategy after observing Y. Its objective is expected amount, which can differ from maximizing the chance of holding the larger amount.

Unconditional symmetry is compatible with conditional gains and losses. Finite expectations also allow averaging conditional gains to recover the unconditional value. Infinite-mean models need separate care with expectation subtraction; the finite table makes no claim about all such variants.

Make a prediction

If only one smaller amount is possible and known, does observing your envelope help?

Explore the answer

Yes. Its amount identifies whether it is the smaller or larger envelope. Switch only when it is smaller. Always switching and always staying still each choose the larger envelope with probability 1/2 before observation, while the informed rule always obtains it.

Reference

The Two Envelope Problem: a Paradox or Fallacious Reasoning? discusses how conditioning and the formulation of the experiment affect the argument. The finite example above states its own prior, selection protocol, information, and objective so every result can be checked by summing its displayed outcomes.

Reset all settings