Two Envelopes Paradox Simulator

Simulate the two envelopes paradox with Monte Carlo trials. Compare switch vs keep strategies, visualize convergence, and understand the probability fallacy.

Always Switch
149.91
Win rate: 49.9% | Avg per trial: 149.91
Always Keep
150.09
Win rate: 50.1% | Avg per trial: 150.09
Random (50/50)
150.59
Win rate: 50.6% | Avg per trial: 150.59
Theoretical E[X]
150.00
E[envelope] = 1.5 ร— 100 = 150
Switch Advantage
-0.1800
Expected: 0 (no advantage by symmetry)
Trials Simulated
10,000.00
Base amount X = 100.00

Running Average Convergence

\u25CF Switch\u25CF Keep--- E[X] = 150.0

Strategy Comparison

StrategyAvg PayoutWin %Loss %Total Wonvs Keep
Always Switch149.9149.9%50.1%1,499,100-0.12%
Always Keep150.0950.1%49.9%1,500,9000.00%
Random150.5950.6%49.4%1,505,900+0.33%
Planning notes, formulas, and examples

About the Two Envelopes Paradox Simulator

The Two Envelopes Paradox Simulator lets you explore one of probability theory's most debated puzzles through hands-on Monte Carlo simulation. Two sealed envelopes contain money โ€” one holds X dollars, the other 2X. After picking one, you're offered the chance to switch. A seemingly valid argument says switching always increases your expected payout by 25%. But that can't be right if both players are told to switch!

This calculator simulates thousands of envelope games, tracking the average payout under three strategies: always switch, always keep, and random choice. As the simulation runs, you can watch the running averages converge to the same theoretical value โ€” proving the switching argument is fallacious.

The detailed analysis mode breaks down the paradox step by step, identifying exactly where the reasoning goes wrong: applying equal 50/50 probabilities to the conditional scenario after observing a specific amount. The resolution involves understanding that you cannot simultaneously define the problem symmetrically and then reason asymmetrically about the observed value.

When This Page Helps

The Two Envelopes Paradox is a powerful teaching tool for understanding conditional probability, expected value, and the role of prior distributions. Unlike dry proofs, this simulator lets you see the resolution empirically โ€” watching two supposedly different strategies converge to identical payouts.

Students in probability courses use it to grasp why E[X|observed info] requires specifying a prior distribution. Decision theorists use it to illustrate how seemingly rational arguments can lead to absurd conclusions. The step-by-step paradox breakdown identifies the exact logical error that makes the switching argument fail.

How to Use the Inputs

  1. Set the number of trials (more trials = smoother convergence).
  2. Enter a base amount X for the smaller envelope.
  3. Click a preset for quick simulations at different scales.
  4. Compare avg payouts across switch/keep/random strategies.
  5. Watch the convergence chart โ€” both strategies converge to 1.5X.
  6. Enable detailed analysis to see the step-by-step paradox breakdown.
  7. Experiment with different trial counts to see convergence speed.
Formula used
Envelopes: {X, 2X}. E[any envelope] = (X + 2X)/2 = 1.5X. The fallacious argument: E[switch | see A] = 0.5(2A) + 0.5(A/2) = 1.25A. Resolution: the 50/50 split is incorrect after conditioning on A.

Example Calculation

Result: Switch avg: ~150.0, Keep avg: ~150.0, Advantage: ~0.0

With X = 100, envelopes are {100, 200}. Both strategies yield E = 1.5 ร— 100 = 150 on average. Over 10,000 trials, the empirical averages converge to this theoretical value, demonstrating that switching provides no real advantage.

Tips & Best Practices

  • Run at least 10,000 trials for smooth convergence curves.
  • The switch advantage hovers near zero โ€” any deviation is random noise.
  • Compare win rates: both switch and keep win about 50% of the time.
  • The detailed analysis mode explains exactly where the fallacious argument breaks down.
  • This paradox highlights why Bayesian reasoning requires specifying prior distributions.
  • Try different base amounts โ€” the paradox holds regardless of scale.

History of the Problem

The Two Envelopes Problem has roots in the "Exchange Paradox" described by mathematician Maurice Kraitchik in 1953. It gained prominence through a 1989 paper by Barry Nalebuff and has since generated hundreds of academic papers. The paradox touches on deep issues in probability theory, decision theory, and the foundations of Bayesian reasoning.

The Role of Prior Distributions

The resolution relies on understanding that the statement "the other envelope has 2A or A/2 with equal probability" implicitly requires a prior distribution where all amounts are equally likely โ€” a so-called improper uniform prior over all positive real numbers. Such a distribution cannot exist (it doesn't integrate to 1), which is why the derived expected value is meaningless.

Connections to Other Paradoxes

The Two Envelopes Paradox belongs to a family of probability paradoxes involving self-referential reasoning. Related problems include the St. Petersburg Paradox (infinite expected value), the Surprise Examination Paradox (self-defeating predictions), and the Necktie Paradox (a simpler version of the same switching fallacy). Understanding one helps illuminate the others.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • The argument assumes that if you see amount A, there's a 50/50 chance the other envelope has 2A or A/2. But these probabilities aren't both 50% โ€” they depend on the prior distribution of X. Without specifying the prior, the 1.25A calculation is meaningless.