How to calculate
Before opening either envelope, each contains the smaller amount or its double with equal probability. After observing an amount, the other envelope contains half or double that amount. Weight these possibilities by their conditional probabilities to calculate a switching expectation.
Worked example
Use What is known? The smaller amount before choosing · Smaller or observed amount 20. The result is 30.
Input and result notes
Use any currency consistently. In observed mode, enter a conditional probability derived from how the amounts were generated, or leave it blank to see the possible amounts.