SGV I assure you that there is no advantage in swapping. No disadvantage either but definitely no advantage. It is not like the Monty Hall problem. The great thing about this problem is that it will only trick people who are quite good at maths and logical. Someone who doesn't get the Monty Hall problem would probably stick but for the wrong reason.
Please read the explanation I posted. Or better this one that I just googled.
http://works.bepress.com/cgi/viewcontent.cgi?article=1006&context=raam_gokhale
This is your reasoning to swap in mathematical form. It is independent of the amount found in the first envelope (A).
0.5*2A + 0.5*0.5A = 1.25A (i.e it looks like you get a greater expected return)
or with 50 inserted instead of A as someone above stated.
0.5*(2*50) + 0.5*(0.5*50) = 62.5
It doesn't matter the value of A. Using this reasoning you always get a greater expected return by swapping. Therefore if you didn't look in the envelope it is still worth swapping and if you are then asked again, using the same reasoning you would swap again and again ad infinitum. This can't be right so there must be a flaw in the above calculation.
Its all about the fact that you have already chosen either the bigger or smaller envelope which already have the money in. If you have already chosen the bigger one you cant expect it to get bigger by swapping. The above expected formulae calculation is therefore wrong and the two instances must be separated. Your expected return is decided by which envelope you chose first.
If you chose the bigger one, X first your expected return by swapping is 0.5 X.
If you chose the smaller one Y first you expected return by swapping is 2Y.
There are lots of much cleverer and probably clearer mathematical explanations out there. Perhaps someone could explain this more simply. I am interested to see.