Home / 🚀 Probability Theory & Odds/ Two Envelopes Paradox Calculator

Two Envelopes Paradox

Print Page
Choose an Envelope to pick your initial cash!
✉️
Envelope 1
✉️
Envelope 2
Tally Analysis
Net Cumulative Earnings
$0
Keep Outcomes Selected: 0 times
Switch Outcomes Selected: 0 times
Times Cash Doubled: 0
Times Cash Halved: 0

Understanding the Paradox

The Two Envelopes Paradox is a famous puzzle in probability theory:

Suppose you pick Envelope A and reveal it has value \(Y\) (e.g. $100). The other envelope contains either \(2Y\) ($200) or \(Y/2\) ($50) with equal probability.

Naive expectation dictates that switching yields: \[E = 0.5 \times (2Y) + 0.5 \times (Y/2) = 1.25Y\] Since \(1.25Y > Y\), it appears switching is *always* mathematically beneficial. But if you switch to B, the same logic holds for switching back to A, leading to an endless loops of switching.

The Resolution: The values in the envelopes are fixed beforehand. Let the smaller envelope have amount \(x\) (so the other has \(2x\)). Your initial envelope has either \(x\) or \(2x\) with 50/50 probability. If you switch, you either gain \(x\) or lose \(x\) with equal probability, meaning the net expected gain is exactly **0**! The simulation above confirms this empirical convergence.

A Two Envelopes Paradox Calculator (also known as a Two Envelope Paradox Simulator, Exchange Paradox Utility, Bayesian Expected Value Analyzer, or Cover’s Threshold Strategy Simulator) evaluates and resolves one of the most famous paradoxes in decision theory and Bayesian probability. In the standard scenario, two sealed envelopes contain cash amounts X and 2X. After opening one envelope containing A dollars, you are offered the choice to keep A or swap for the unopen envelope.

The naive expectation argument suggests that the unopen envelope contains either 2A (with 50% probability) or 0.5A (with 50% probability), yielding a flawed expected value of E[Swap] = 0.5(2A) + 0.5(0.5A) = 1.25A. This implies that switching is always beneficial regardless of what value A is revealed! However, since both envelopes are symmetric before opening, swapping cannot logically increase expected payoff. Resolving this paradox requires Bayesian prior distributions or Thomas Cover’s randomized threshold strategy.

Our free online Two Envelopes Paradox Calculator provides instant simulation across envelope values, mathematical proofs, and threshold strategies:

  • Naive Expected Value Fallacy: E[Swap] = 0.5 · (2A) + 0.5 · (A / 2) = 1.25A (Flawed because A is treated as a fixed constant rather than a random variable!).
  • Correct Bayesian Posterior Expectation: E[Other | A] = P(X = A | A) · (2A) + P(X = A/2 | A) · (A / 2).
  • Cover’s Randomized Threshold Strategy (1987): Picking a random threshold Z from a continuous probability distribution guarantees a win rate P(Win) > 50.0%!

Master Envelope Strategy & Expected Payout Simulation Table

The table below displays the mathematical formulas, expected payouts, and simulated win rates across different envelope decision strategies for cash amounts of $100 and $200 (X = $100):

Envelope Decision Strategy Decision Rule Mechanism Win Rate (% Larger Envelope) Average Payout ($100 / $200) Mathematical Paradox Resolution
Strategy 1: Always Keep Opened Envelope Never swap envelope regardless of value A 50.00% $150.00 Baseline symmetric baseline
Strategy 2: Always Swap Opened Envelope Always swap envelope regardless of value A 50.00% $150.00 Proves naive 1.25A gain is zero!
Naive Fallacy Calculation Assumes P(2A) = 50% and P(A/2) = 50% for all A N/A (Flawed Math) $187.50 (Fake Expectation!) IMPOSSIBLE (Requires improper prior)
Strategy 3: Cover’s Threshold (Z ~ Normal[150, 50]) Swap if A < Z; Keep if A > Z 68.26% (Beats 50/50!) $168.26 PROVEN OPTIMAL STRATEGY!

Step-by-Step Mathematical Explanation & Cover’s Threshold Proof

To understand why the naive calculation E[Swap] = 1.25A fails, and how Thomas Cover’s 1987 Threshold Strategy guarantees a >50% win rate:

Step 1 (The Flaw in 1.25A): The calculation 0.5(2A) + 0.5(A/2) assumes that for ANY value A you see, the other envelope is equally likely to be 2A or A/2. But A is a random variable tied to X. If A is the maximum possible envelope value, the probability of the other envelope being 2A is EXACTLY 0.0%. Thus P(2A) cannot be 0.5 for all A.

Step 2 (Bayesian Correction): Under any valid probability distribution P(X) where total probability sums to 1.0, high values of A make it increasingly likely that A is the LARGER envelope (2X). When integrated across all A, E[Swap] = A exactly.

Step 3 (Cover's Randomized Threshold Strategy): Pick a random number Z from a continuous distribution (e.g. Normal Distribution with mean $150).

Step 4 (Case Analysis): If envelopes contain $100 and $200, there are 3 possibilities for Z:

- Case A: Z < $100 &implies; Player keeps both $100 and $200 (50% win rate).

- Case B: Z > $200 &implies; Player swaps both $100 and $200 (50% win rate).

- Case C: $100 < Z < $200 &implies; If player opens $100, $100 < Z &implies; SWAP to $200! If player opens $200, $200 > Z &implies; KEEP $200! (100% win rate!).

Because Case C occurs with positive probability, Cover’s threshold algorithm guarantees an overall win rate strictly greater than 50.0% ($168.26 average payout)!


Paradox Resolution Methods: Bayesian vs. Information Theory

Below is a comparative reference chart detailing the three major mathematical resolutions to the Two Envelopes Paradox:

Resolution Approach Mathematical Framework Why It Resolves the Fallacy
1. Variable Variable Equivalence Algebraic Variable Substitution Shows that A in (2A) is NOT the same variable as A in (A/2). The envelopes contain X and 2X, so swapping gives E[Swap] = 0.5(X) + 0.5(2X) = 1.5X, which is identical to keeping!
2. Bayesian Prior Updating Bayes’ Theorem & Proper Priors Proves that an improper uniform prior over (0, ∞) is mathematically illegal. Any proper prior causes P(X=A) to decrease for large A, canceling out the 1.25 gain.
3. Cover’s Randomized Threshold Randomized Decision Theory Exploits the gap between X and 2X using a random threshold Z, achieving >50% win probability without knowing X!

History & Mathematics: 1953 Kraitchik to 1987 Thomas Cover

1953 Maurice Kraitchik & The Necktie Paradox

In 1953, Belgian mathematician Maurice Kraitchik published the precursor to the two envelopes paradox in Mathematical Recreations, known as the Necktie Paradox, where two men compare neckties to see whose tie is more expensive.

1987 Thomas Cover & Randomized Thresholds

In 1987, Stanford information theorist Thomas M. Cover published a breakthrough paper in Open Problems in Communication and Computation, introducing the randomized threshold algorithm that allows players to win the two envelopes game more than 50% of the time.


Popular direct tools:


Frequently Asked Questions (FAQ)

What is the Two Envelopes Paradox?

The Two Envelopes Paradox is a probability puzzle where two envelopes contain cash amounts X and 2X. A naive calculation suggests that switching envelopes always yields an expected gain of 1.25A, which contradicts symmetry.

Why is the 1.25A expectation formula wrong?

Because it assumes that the probability of the other envelope being 2A or A/2 is always 50% for any opened value A. Under any valid probability distribution, seeing a very high value A increases the probability that A is already the larger envelope.

Can you beat 50/50 odds in the Two Envelopes Game?

Yes! By using Thomas Cover’s 1987 Threshold Strategy (picking a random threshold Z and swapping if A < Z), you can achieve a win probability strictly greater than 50.0%.