The two envelopes problem is one of the best-known puzzles in probability. The two envelopes paradox calculator takes the amount you see and a ratio describing how quickly large amounts become less likely, and gives the probability that you hold the smaller envelope, the expected value of switching, the expected gain and the margin that shows if the expected prize is finite.
How the calculation works
- Enter the amount in the envelope you opened.
- Enter the ratio of the prior: the pair of amounts (x, 2x) at each step up the doubling ladder is rr times as likely as the previous pair. A ratio near 0 means small amounts are very likely, and near 1 means large amounts are almost as likely as small ones.
- The calculator gives the probability that you hold the smaller envelope, which is ratio ÷ (1 + ratio), and the expected value of switching: P(smaller) × 2x + P(larger) × x ÷ 2.
- Compare the expected value with your amount. The break-even ratio is 1/2.
Example
You open an envelope with $40. The prior has a ratio of 0.4, so the chance that you hold the smaller envelope is 0.4 ÷ 1.4 = 28.6 %. If you switch, you expect 0.286 × 80 + 0.714 × 20 = $37.14, a loss of $2.86 or 7.1 %. At a ratio of exactly 0.5, the expected value of switching equals $40. Above 0.5, switching wins on average, but the expected prize is then infinite.
Why it matters
Working through the numbers shows why the naive argument fails: it ignores that a prior must make large amounts less likely. Changing the ratio shows when switching gains, when it loses, and why an infinite expected prize breaks the argument.
Good to know
The model uses a geometric prior on a ladder of doubling amounts, which is only one choice of prior. Other priors give other answers, and in real life no one knows the prior. The calculator is an illustration of the paradox and not a strategy for a game with money.
Related tools
The Monty Hall calculator is another famous puzzle about switching, the Bertrand box and boy or girl paradoxes involve conditional probability, and the expected value calculator handles general cases.