First a random observation. People use "expected value" to evaluate risky decisions far too often. In many investment situations a more appropriate measure is "expected value of the log of my worth". (See http://elem.com/~btilly/kelly-criterion/ for an explanation of why.) That measure, in this problem, says that you should be indifferent about switching.
Admittedly that is coincidence - the investment reasoning for that rule has little to do with why that rule works for this problem.
But it turns out that there is an even crazier twist to this problem. Change the problem to say that you're allowed to look at the envelope you receive before deciding whether to switch.
Would you believe that there is an algorithm for deciding whether to switch that results in your getting the larger envelope more than 50% of the time? The catch is that those odds depend on the unknown amounts in the envelopes. But, no matter what is in the envelopes, you are guaranteed to get the larger one more than 50% of the time.
See http://www.perlmonks.org/?node_id=39366 for an explanation. Read it very carefully, because the problem is very subtle. Even a slight change in what is meant tends to render the problem ill defined and indeterminate. (And our intuition is very bad.)
That blog post is wrong. If N is the difference between the values in the two envelopes, then the chance that you will guess a value in this range is N/∞ which is 0.
Not so. The only stipulation was that you must be able to guess a number in any range (which is not possible in practice). It doesn't matter that the probability of picking any particular number will be 0, as long as the probability of picking any one between the two in the letters isn't 0. Any time your guess hits the correct range, you win. Any other time, it depends on whether you got the big envelope or the small one.
So knowing just one endpoint of a range is, oddly, evidence as to which way the other endpoint lies - as long as it might be either one. You just take a guess that depends on the number you know in such a way that the smaller the number you see, the more likely you are to guess it's the smaller of the two, but are never certain. Presto, guaranteed you'll get more than 50% right, as long as you get fed both the small and the large envelopes in equal proportion.
If you can't be sure the other guy is playing fair and might favor giving you the low envelope, you need to look at something like the Monty Hall problem.
If N is the difference between the values in the two envelopes, then the chance that you will guess a value in this range depends on the actual values. If you average over all possible intervals it averages out to 0, but for every single interval the odds are greater than zero.
The non-intuitive (yet mathematically straightforward) fact that you can average an infinite set of positive numbers and get 0 is part of why our intuition is so badly mislead in this case.
Admittedly that is coincidence - the investment reasoning for that rule has little to do with why that rule works for this problem.
But it turns out that there is an even crazier twist to this problem. Change the problem to say that you're allowed to look at the envelope you receive before deciding whether to switch.
Would you believe that there is an algorithm for deciding whether to switch that results in your getting the larger envelope more than 50% of the time? The catch is that those odds depend on the unknown amounts in the envelopes. But, no matter what is in the envelopes, you are guaranteed to get the larger one more than 50% of the time.
See http://www.perlmonks.org/?node_id=39366 for an explanation. Read it very carefully, because the problem is very subtle. Even a slight change in what is meant tends to render the problem ill defined and indeterminate. (And our intuition is very bad.)