Skip to content
Statistics

Two Envelopes Paradox Calculator: Expected Value and the Switching Fallacy

Open your envelope, enter the amount you see, and this calculator shows you two things side by side: the naive switching argument that claims you should always switch (and why it is mathematically wrong), and the correct expected-value analysis that proves staying and switching are equally good. The step-by-step panel walks through the exact algebra so you can see where the famous fallacy breaks down.

Your details

The dollar amount you found when you opened your chosen envelope. Must be positive.
Choose whether to work with a specific dollar amount or the general algebraic form of the paradox.
If you know the smaller of the two envelopes must be at least this much, enter it here. Leave at 0 if unknown. This affects the threshold strategy analysis.
Naive switching EV (the fallacy)Classic paradox
125$

The flawed expected value of the other envelope: 0.5 * 2X + 0.5 * X/2 = 1.25X. This argument is wrong.

Correct EV if you stay100$
Correct EV if you switch125$
Illusory gain from switching25$
If your envelope has the larger amount (2x)50$
If your envelope has the smaller amount (x)200$
Implied minimum envelope amount75$
Threshold strategy verdictWithout a known minimum, neither staying nor switching has an expected-value advantage. The paradox: the naive argument says switch, but the correct analysis says it does not matter.
Stay (your certain value)100
Naive switch EV (the fallacy)125
If yours is the larger envelope50
If yours is the smaller envelope200
0187.537511631
Amount scenario (left = 10% of your amount, right = 3x)
  • Naive switch EV (1.25 * amount)
  • Correct stay value (your amount)
  • Switch if yours is larger (amount / 2)

You see $100.00. The naive argument says switching nets you $25.00 more - but this is wrong.

  • The flawed reasoning: the other envelope is either $200.00 (if yours is smaller) or $50.00 (if yours is larger). Averaging those gives $125.00, which beats $100.00.
  • The error: the variable X is used inconsistently. In one branch it represents the smaller amount; in the other, the larger. They cannot both equal your observed $100.00 simultaneously.
  • The correct view: label the envelopes m and 2m. E(yours) = E(other) = 1.5m regardless of which you hold. Switching does not improve your position in expectation.
  • Your envelope contains $100.00 with certainty. The other envelope is either $50.00 or $200.00, each with 50% probability.

Next stepIf you can set a threshold T before looking: switch only when your amount is below T. This threshold strategy provably achieves better than 50% accuracy at picking the larger envelope, even without knowing the amounts in advance.

What is the two envelopes paradox?

Two sealed envelopes sit on a table. One contains some amount of money; the other contains exactly twice that amount. You pick one at random and peek inside. You see, say, $100. Now you are offered a chance to switch to the other envelope. Should you? The naive reasoning says yes: the other envelope is either $200 (if yours was the smaller) or $50 (if yours was the larger), each with probability 1/2. The expected value of the other envelope is therefore 0.5 * $200 + 0.5 * $50 = $125, which beats the $100 you are holding. But by the same logic, if you had opened the other envelope first and seen $125, you would calculate an expected value of $156.25 for switching back - and so on forever. This circular conclusion is the paradox: you should always switch, yet switching is symmetric and cannot always be beneficial.

Where the switching argument goes wrong

The flaw is a subtle equivocation. Let the two envelopes hold amounts m and 2m, where m > 0 is unknown. You open yours and see X dollars. There are two mutually exclusive scenarios:

  • Scenario A: your envelope holds 2m, so X = 2m, meaning m = X/2, and the other envelope holds X/2.
  • Scenario B: your envelope holds m, so X = m, and the other envelope holds 2X.
When the naive argument writes E(other) = 0.5 * (2X) + 0.5 * (X/2), the symbol X is being used as if it represents the same quantity in both branches. But it does not: in Scenario A, X is the larger amount (2m), while in Scenario B, X is the smaller amount (m). You cannot set both 2m = X and m = X simultaneously. The moment you condition on which scenario you are in, the X in each branch refers to a different value of m.

The correct expected-value analysis

Fix the two amounts as m (smaller) and 2m (larger), where m is drawn from some unknown prior distribution. You pick an envelope uniformly at random, so:

  • E(your envelope) = 0.5 * m + 0.5 * 2m = 1.5m
  • E(other envelope) = 0.5 * 2m + 0.5 * m = 1.5m
Both envelopes have exactly the same expected value. Switching does not improve your position. The apparent gain of 25% in the naive calculation arises because the naive formula mixes two different values of m under one letter X, artificially inflating the average. A proper Bayesian analysis confirms that no matter what prior distribution you place on m (as long as it is a proper probability distribution with finite expectation), E(switch) = E(stay).

The threshold strategy: when you actually can do better

There is a surprising result from decision theory: even without knowing m, a randomized strategy lets you select the larger envelope with probability strictly greater than 50%. Before you open your envelope, choose a random threshold T from any continuous probability distribution that covers all positive numbers (for example, a log-normal distribution). After opening the envelope and seeing X:

  • If X < T, switch to the other envelope.
  • If X ≥ T, stay with yours.
Why does this work? If X = m (the smaller amount), then T > X with some positive probability p, causing you to switch (correctly). If X = 2m (the larger amount), then T < X with probability 1 - p, causing you to stay (correctly). Because T is random and independent of m, P(correct decision) = 0.5 + (probability T falls between m and 2m) / 2 > 0.5. This never guarantees you get the larger envelope, but it does beat 50/50 on average. The threshold strategy does not contradict the correct expected-value analysis: it improves the probability of identifying the larger envelope, not the expected dollar value of switching blindly.

Real-world applications and related paradoxes

The two-envelopes problem is a vivid example of how conditional expected values can mislead. Related paradoxes include the St. Petersburg paradox (an infinite expected value from repeated coin flips), Bertrand's paradox (ambiguous probability of geometric events), and the Monty Hall problem (where switching genuinely does help because a door is deliberately revealed). Unlike Monty Hall, no new information is revealed in the two-envelopes problem that breaks the symmetry, so switching yields no advantage. The paradox is used in philosophy of probability to illustrate the dangers of improper prior distributions and the importance of grounding expected-value calculations in a well-defined sample space.

Two-envelope paradox: key scenarios

Your envelope (X)If yours is the smaller (m)Other envelope = 2XIf yours is the larger (2m)Other envelope = X/2Naive EV of switching
10Yes20No512.5
50Yes100No2562.5
100Yes200No50125
500Yes1000No250625
1000Yes2000No5001250
10000Yes20000No500012500

For each amount seen in your envelope, the table shows both possible states of the world and the implied values.

Frequently asked questions

Should I switch envelopes if I open mine and see a large amount?

No. The correct expected-value analysis shows that both envelopes have the same expected value, regardless of what you see. Switching does not improve your expected payoff. The naive argument that says you should switch is mathematically flawed: it treats the same symbol X as if it simultaneously represents both the smaller and the larger of the two unknown amounts, which is an equivocation.

Why does the naive switching argument give 1.25X as the expected value?

The naive formula averages two scenarios: other envelope = 2X (if yours is the smaller) and other envelope = X/2 (if yours is the larger), each with probability 0.5. That gives 0.5 * 2X + 0.5 * (X/2) = 1.25X. The problem is that X in the two branches refers to different base amounts - in one branch it is the smaller amount m, in the other it is the larger amount 2m - so averaging them as if they are the same quantity is invalid.

Is the two-envelopes paradox the same as the Monty Hall problem?

No, they are different paradoxes with different resolutions. In Monty Hall, the host deliberately opens a losing door after your choice, adding new information that genuinely changes the probability distribution and makes switching beneficial (2/3 vs. 1/3 chance of winning). In the two-envelopes problem, no new information is added that breaks the symmetry between your envelope and the other, so switching offers no advantage.

What is the threshold strategy and does it really beat 50/50?

Yes, provably. Before opening your envelope, pick a random number T from any continuous distribution over positive numbers. After seeing your amount X, switch if X < T, stay if X >= T. Because T is independent of the envelope amounts and is drawn from a continuous distribution, there is always a positive probability that T falls strictly between the smaller and larger amounts. When that happens, the strategy correctly identifies which envelope is larger. The overall probability of picking the larger envelope exceeds 0.5, though you can never know exactly by how much without knowing the envelope amounts.

What prior distribution do the envelopes require for the naive argument to work?

For the naive conditional expectation E(other | you see X) > X to hold for every possible value of X, the prior distribution on the envelope amounts would need to be improper - meaning it cannot integrate to 1 over the positive reals. In practice, this means the expected value of the envelopes would be infinite. With any finite, proper prior distribution, the expected values of both envelopes are equal, and the switching argument collapses.

Does seeing the actual amount in your envelope give you any useful information?

In the abstract setting where you have no prior knowledge of the envelope amounts, no: the symmetry between the two envelopes means that whatever you see, you cannot tell whether you are holding the smaller or the larger. However, if you have some prior belief about the likely range of amounts (for example, if you know the amounts are between $1 and $100), then seeing $90 gives you reason to believe you are probably holding the larger envelope, and you might rationally decide to stay.

What is the connection between this paradox and improper priors in Bayesian statistics?

The two-envelopes fallacy is essentially an improper Bayesian prior in disguise. For the naive argument to hold universally - for every possible amount X you might see - the distribution over the base amount m must assign equal probability density to every positive number, which is impossible for a normalized probability distribution. This is an improper prior, and reasoning with it produces nonsensical results such as the infinite chain of 'always switch' conclusions. The lesson is that Bayesian reasoning requires proper, normalizable priors to produce valid expected values.

Sources

Written by Dr. Hannah Brandt, PhD Statistician · Munich, Germany

Applied statistician translating rigorous probability theory into clear, accurate tools for researchers and practitioners.

Search 3,500+ calculators

Loading search…