Two Envelopes Paradox Calculator
To switch or not to switch? That is the question! Use this two envelopes paradox calculator to determine whether it's wiser to swap or stick with your initial envelope selection ✉
Continue reading to discover:

What the two envelopes problem is;

The solution to the two envelopes problem;

Does it make sense to swap envelopes?; and

How to use this two envelopes paradox calculator for a deeper understanding of the problem.
Let's explore this paradox!
What is the two envelopes paradox?
Imagine you're presented with two envelopes, Envelope A and Envelope B, each containing an unknown amount of money. Your only information is that one envelope holds twice the amount of money as the other. Which envelope do you choose?
Let's say you select Envelope A initially. Now, you're given the option to change your mind. Would you swap to Envelope B? Why should you change?
Consider this: If your current Envelope A contains an amount $X$, then the other envelope (Envelope B) holds either $2X$ or $X/2$, each possibility with an equal probability. Then, the expected value $E_B(X)$ of Envelope B is:
This reveals that, on average, the expected value of envelope B is 25% higher than the value in your current envelope selection 😮
After seeing this result, you decide to switch to Envelope B. Once again, you're given the opportunity to swap envelopes or stick to your current selection. Just to be sure, following the same reasoning as before, you calculate the expected value of the other envelope (Envelope A) only to realize that the expected value of A is now 25% greater than the expected value of B:
Does this mean that your initial selection had the higher amount of money? It seems like every time we switch, the other envelope becomes the one with the greater amount of money. Something seems absurd here. What's happening? 🤔
You can explore more about probability and expected value use with the poker ev calculator.
🙋 In a variant of this paradox, you can see the amount of money in your initial selection before deciding whether to switch or stick. Does this additional information change anything?
The two envelopes problem solution
Is there something wrong with our initial reasoning? Before we proceed, let's establish some key points that we know for sure:

The problem is symmetrical, meaning there's an equal 50% chance for each envelope to contain either the larger or, the smaller amount of money.

Switching one envelope for the other won't change its contents.
So, what are we missing? Where does our solution fail? The problem lies in the calculation of the expected value. If we go back to the previous calculation of $E(X)$, we'll notice that the random variable $X$ is representing two different values simultaneously in the same equation:
🙋 Take a moment to check the expected value calculator if you'd like to learn more about this concept.
Here, we are mixing two possible scenarios: one where our current envelope contains $X$ and the other envelope contains $X/2$, and the scenario where our envelope contains $2X$, and the other $X$.
A better approach is to express this in terms of the envelope with the larger amount $L$ and the envelope with the smaller amount $S$. Since we established that each envelope has a 50% chance of being either one, we can express the expected value as:
Considering that one envelope contains double the amount of the other, i.e., $S = L/2$, and if we assume the envelope with the larger amount of money contains $2x$, then $L = 2x$, and $L/2 = x$. Thus, we have:
When we establish that one envelope contains $x$ and the other $2x$, the total amount of money is $3x$. The expected value calculation simply tells us that we should expect to obtain a value that falls right in the middle between the minimum and maximum possible amounts, which intuitively makes sense.
If we apply the same reasoning to the other envelope, we'll discover that both have the same expected value of $\tfrac 32 x$.
🙋 We intentionally use capital $X$ and lowercase $x$ in our equations, as they represent different concepts. We use $x$ to represent a fixed value, while $X$ denotes a random variable.
Let's illustrate this with an example. Suppose we know that Envelope A contains $20. What should be the expected value of Envelope B? and should we switch envelopes?
We need to consider two scenarios: 1) A contains the larger amount, and 2) A has the smaller amount.
A contains the larger amount
Using the initial equation for expected value:
Since A is the larger envelope, $L = \$20$ and $S = \$10$. Therefore:
This result of $\$15$ is reasonable as it represents the average of the two possible amounts.
A contains the smaller amount
Now let's consider the case where A is the envelope with the smaller amount. Referring back to the initial equation:
With A as the smaller envelope, $S = \$20$ and $L = \$40$. Thus:
This result lies right in the midpoint between the two possible amounts, as we would expect.
However, the question remains: Does it make sense to swap envelopes or stick with the initial selection? The answer is that it doesn't matter whether you change or stick, as there's always a 50% chance of receiving the envelope with the greater amount of money or the smaller amount.
🙋 When can switching your selection result in a higher probability of winning? To explore scenarios where this is possible, check out the Monty Hall problem calculator 🐐
Using the two envelope paradox calculator
With this two envelopes paradox calculator, you have two options to explore this intriguing paradox: simulation mode and calculation mode. Let's take a closer look at each one:
Simulation mode
In simulation mode, you can experience the process of swapping envelopes firsthand to understand this paradox better. Here's how it works:

Choose your initial envelope, either A or B.

Once you make your selection, the calculator will reveal the expected value of the other envelope, indicating that, on average, it contains 25% more money than your current choice.

The calculator will give you the opportunity to change your selection.

Decide whether to change or not.

Every time you switch envelopes, the calculator will inform you that the other envelope holds 25% more money than your current selection.

As you continue switching back and forth, you'll eventually return to your initial selection – Did you notice something is not quite right? 🤔

Finally, the calculator will reveal the contents of each envelope and provide an explanation of the paradox.
Calculation mode
In calculation mode, we explore a scenario where you have the chance to know the exact amount of money contained in your initial envelope. Follow these steps to use this mode:

Enter the amount of money you saw in your initial envelope. Since most likely you won't have these envelopes in front of you in real life, simply picture a number and enter it.

The calculator will display the possible envelope content arrangements based on your input. It will show the case where your initial selection has the larger amount of money and the case with the smaller amount.

Voilà! Does it make sense to swap? 🤔
FAQ
What's the expected value of envelope A if B contains $10?
The expected value of envelope A can be either $7.5 or $15. To obtain these values, we consider two scenarios:

When B > A, it means that the content in envelope B is the greater amount, while A contains half of B, $5.

The expected value of envelope A is:
E_{A}(X) = ½ × $10 + ½ × $5 = $7.5

When B < A, envelope B contains the smaller amount, and A the greater amount, $20.

The expected value of envelope A is:
E_{A}(X) = ½ × $20 + ½ × $10 = $15
What's the two envelopes fallacy?
The two envelopes fallacy, or two envelopes paradox, involves two envelopes with unknown amounts of money, one double the other. Switching envelopes is mistakenly believed to guarantee more money. This derives from misunderstanding the calculation of the expected value. The correct analysis shows the expected value as the average of the two possible amounts. However, this information does not determine whether switching or sticking is better.
For more details, check Omni's two envelopes paradox calculator.
What's the expected value in the two envelopes paradox?
The correct expected value in the two envelopes paradox is 3x/2 or 1.5x. This means that, on average, the amount of money in the envelopes is at the midpoint between the higher and lower possible amounts.
While it may seem logical and intuitive that swapping envelopes doesn't result in the other envelope having more money, understanding the correct calculation of the expected value supports this idea and helps debunk the paradox.
What's a random variable?
A random variable is a variable whose value is unknown and can take on different values during different trials or experiments. Random variables are associated with the outcomes of random processes. They're commonly denoted using capital letters, such as X.
Do you choose Envelope A or Envelope B? ✉