# Solving the two envelopes problem

Sup­pose you are pre­sented with a game. You are given a red and a blue en­velope with some money in each. You are al­lowed to ask an in­de­pen­dent party to open both en­velopes, and tell you the ra­tio of blue:red amounts (but not the ac­tual amounts). If you do, the game mas­ter re­places the en­velopes, and the amounts in­side are cho­sen by him us­ing the same al­gorithm as be­fore.

You ask the in­de­pen­dent ob­server to check the amounts a mil­lion times, and find that half the time the ra­tio is 2 (blue has twice as much as red), and half the time it’s 0.5 (red has twice as much as blue). At this point, the game mas­ter dis­closes that in fact, the way he chooses the amounts math­e­mat­i­cally guaran­tees that these prob­a­bil­ities hold.

Which en­velope should you pick to max­i­mize your ex­pected wealth?

It may seem sur­pris­ing, but with this set-up, the game mas­ter can choose to make ei­ther red or blue have a higher ex­pected amount of money in it, or make the two the same. Ask­ing the in­de­pen­dent party as de­scribed above will not help you es­tab­lish which is which. This is the sur­pris­ing part and is, in my opinion, the crux of the two en­velopes prob­lem.

This is not quite how the two en­velopes prob­lem is usu­ally pre­sented, but this is the pre­sen­ta­tion I ar­rived at af­ter con­tem­plat­ing the origi­nal puz­zle. The origi­nal puz­zle pre­scribes a spe­cific strat­egy that the game mas­ter fol­lows, makes the en­velopes in­dis­t­in­guish­able, and pro­vides a para­dox­i­cal ar­gu­ment which is ob­vi­ously false, but it’s not so ob­vi­ous where it goes wrong.

Note that for sim­plic­ity, let’s as­sume that money is a real quan­tity and can be sub­di­vided in­definitely. This avoids the prob­lem of odd amounts like \$1.03 not be­ing ex­actly di­visi­ble by two.

### The flawed argument

The flawed ar­gu­ment goes as fol­lows. Let’s call the amount in the blue en­velope B, and in red R. You have con­firmed that half the time, B is equal to 2R, and half the time it’s R/​2. This is a fact. Surely then the ex­pected value of B is (2R * 50% + R/​2 * 50%), which sim­plifies to 1.25R. In other words, the blue en­velope has a higher ex­pected amount of money given the ev­i­dence we have.

But no­tice that the situ­a­tion is com­pletely sym­met­ric. From the in­for­ma­tion you have, it’s also ob­vi­ous that half the time, R is 2B, and half the time it’s B/​2. So by the same ar­gu­ment the ex­pected value of R is 1.25B. Uh-oh. The ex­pected value of both en­velopes is higher than the other?...

### Game mas­ter strategies

Let’s muddy up the wa­ter a lit­tle by con­sid­er­ing the strate­gies the game mas­ter can use to pick the amounts for each en­velope.

##### Strat­egy 1

Pick an amount X be­tween \$1 and \$1000 ran­domly. Throw a fair die. If you get an odd num­ber, put X into the red en­velope and 2X into blue. Other­wise put X into blue and 2X into red.

##### Strat­egy 2

Pick an amount X be­tween \$1 and \$1000 ran­domly. Put this into the red en­velope. Throw a fair die. If you get an odd num­ber, put 2X into blue, and if it’s even, put X/​2 into blue.

The differ­ence be­tween these strate­gies is fairly sub­tle. I hope it’s suffi­ciently ob­vi­ous that the “ra­tio con­di­tion” (B = 2R half the time and R = 2B the other half) is true for both strate­gies. How­ever, sup­pose we have two peo­ple take part in this game, one always pick­ing the red en­velope and the other always pick­ing the blue en­velope. After a mil­lion rep­e­ti­tions of this game, with the first strat­egy, the two guys will have won al­most ex­actly the same amounts in to­tal. After a mil­lion rep­e­ti­tions with the sec­ond strat­egy, the to­tal amount won by the blue guy will be 25% higher than the to­tal amount won by the red guy!

Now ob­serve that strat­egy 2 can be triv­ially in­verted to favour the red en­velope in­stead of the blue one. The player can ask an in­de­pen­dent ob­server for ra­tios (as de­scribed in the in­tro­duc­tion) all he wants, but this in­for­ma­tion will not al­low him to dis­t­in­guish be­tween these three sce­nar­ios (strat­egy 1, strat­egy 2 and strat­egy 2 in­verted). It’s ob­vi­ously im­pos­si­ble to figure out which en­velope has a higher ex­pected win­nings from this in­for­ma­tion!

### What’s go­ing on here?

I hope I’ve con­vinced you by now that the in­for­ma­tion about the like­li­hood of the ra­tios does not tell you which en­velope is bet­ter. But what ex­actly is the flaw in the origi­nal ar­gu­ment?

Let’s for­mal­ize the puz­zle a bit. We have two ran­dom vari­ables, R and B. We are per­mit­ted to ask some­one to sam­ple each one and com­pute the ra­tio of the sam­ples, r/​b, and dis­close it to us. Let’s define a ran­dom vari­able called RB whose sam­ples are pro­duced by sam­pling R and B and com­put­ing their ra­tio. We know that RB can take two val­ues, 2 and 0.5, with equal prob­a­bil­ity. Let’s also define BR, which is the op­po­site ra­tio: that of a sam­ple of B to a sam­ple of R. BR can also take two val­ues, 2 and 0.5, with equal prob­a­bil­ity.

The flawed ar­gu­ment is sim­ply that the ex­pected value of RB, E(RB), is 1.25, which is greater than 1, and there­fore E(R) > E(B). The flawed ar­gu­ment con­tinues that E(BR) is 1.25 too, there­fore E(B) > E(R), lead­ing to a con­tra­dic­tion. What’s the flaw?

### Solution

The ex­pected value of RB, E(RB), re­ally is 1.25. The puz­zle gets that one right. E(BR) is also 1.25. The flaw in the ar­gu­ment is sim­ply that it as­sumes E(X/​Y) > 1 im­plies that E(X) > E(Y). This im­pli­ca­tion seems to hold in­tu­itively, but hu­man in­tu­ition is no­to­ri­ously bad at prob­a­bil­ities. It is easy to prove that this im­pli­ca­tion is false, by con­sid­er­ing a sim­ple counter-ex­am­ple cour­tesy of

So there you have it. The pro­posed ar­gu­ment re­lies on an im­pli­ca­tion which seems true in­tu­itively, but turns out to be false un­der scrutiny. Mys­tery solved?… Al­most.

##### Im­pre­cise lan­guage’s con­tri­bu­tion to the puzzle

The ar­gu­ment con­cern­ing the origi­nal, in­dis­t­in­guish­able en­velopes, is phrased like this: “(1) I de­note by A the amount in my se­lected en­velope. (2) The other en­velope may con­tain ei­ther 2A or A/​2, with a 50% prob­a­bil­ity each. (3) So the ex­pected value of the money in the other en­velope is 1.25A. (4) Hence, the other en­velope is ex­pected to have more dol­lars.”

Depend­ing on how pedan­tic you are, you might say that the state­ment made in the third sen­tence is strictly false, or that it is too am­bigu­ous to be strictly false, or that at least one in­ter­pre­ta­tion is true. The ex­pected value 1.25A is “of the amount of money con­tained in the other en­velope ex­pressed in terms of the amount of money in this en­velope”. It is not “of the amount of money in the other en­velope ex­pressed in dol­lars”. Hence the last sen­tence does not fol­low, and if the state­ments were made in full and with com­plete ac­cu­racy, the fact that it does not fol­low is a lit­tle bit more ob­vi­ous.

In clos­ing, I would say this puz­zle is hard be­cause “in terms of this en­velope” and “in terms of dol­lars” are typ­i­cally equiv­a­lent enough in ev­ery­day life, but when it comes to ex­pected val­ues, this equiv­alence breaks down rather counter-in­tu­itively.

• But we know from ba­sic prob­a­bil­ity the­ory that for two in­de­pen­dent ran­dom vari­ables, E(X/​Y) > 1 does ac­tu­ally im­ply E(X) > E(Y).

This does not fol­low; a coun­terex­am­ple:

Sup­pose X and Y are in­de­pen­dent ran­dom vari­ables, with X tak­ing the val­ues {2,100}, and Y the val­ues {1,150}, each with equal prob­a­bil­ity (i.e., each of X and Y fol­lows the Bernoulli dis­tri­bu­tion with p = 0.5). Then we have
E(X/​Y) = (2/​1 + 1001 + 2150 + 100150) /​ 4 = 25.67 > 1,
but
E(X) = 51 < 75.5 = E(Y).

Keep in mind that the equa­tion E(1/​Y) = 1/​E(Y) does not hold in gen­eral, be­cause tak­ing the in­verse is not a lin­ear trans­for­ma­tion. To eval­u­ate the ex­pec­ta­tion af­ter a non­lin­ear trans­for­ma­tion, one re­quires not just the orig­nal ex­pec­ta­tion, but also the pdf of the dis­tri­bu­tion. (I can’t be sure this is what you did, but mis­ap­ply­ing this gives: E(X/​Y) = E(X)E(1/​Y) = E(X)/​E(Y). The first equal­ity holds if X and Y are in­de­pen­dent or by defi­ni­tion if X and 1/​Y are un­cor­re­lated, but the sec­ond equal­ity does not hold in gen­eral.)

• Thanks, good point. Hope­fully I don’t turn out to be falsely com­pla­cent about this con­clu­sion too :)

• Ad­dressed by mak­ing a few ed­its to the “Solu­tion” sec­tion. Thank you!

• An even eas­ier ex­am­ple: X is always −4 and Y is always −2.

• Since amounts of money are pos­i­tive, this is a coun­terex­am­ple to a mis­take not in the origi­nal ar­ti­cle.

• Thanks, this is in­deed a sim­pler coun­terex­am­ple. Note that it is a coun­terex­am­ple to a differ­ent er­ror in the origi­nal state­ment. In par­tic­u­lar, the er­ror you’ve caught here is that from
X/​Y > 1,
one can­not con­clude that
X > Y.

• Gen­er­ally, peo­ple do take `R` and `B` to be fixed amounts of money—then, it’s worth point­ing out that the ex­pected value of the blue en­velope is not `.5*.5R+.5*2R`, be­cause `R` there stands for 2 differ­ent amounts of money.

If the amounts of money are `\$5` and `\$10`, then `R` in the first case stood for `\$10` and `R` in the sec­ond case stood for `\$5`, so it should re­ally be `.5*.5(\$10)+.5*2(\$5)`, and the ex­pected value is just `\$7.50`.

• Yes, I like your sim­plifi­ca­tion.

To am­plify it and make the re­sults ex­plicit, Sup­pose my en­velope strat­egy is to flip a fair coin and­
tails: R=\$10 B=\$5.

Then
E(R) = E(B) = \$7.50
E(B)/​E(R) = E(B)/​E(R) =1
E(R/​B) = E(B/​R) = 1.25

• Another com­men­tary I once read re­gard­ing the “two en­velopes para­dox”:

In or­der to make any sense out of this prob­lem, you have to as­sume some prior prob­a­bil­ity dis­tri­bu­tion over the amount of money in the two en­velopes. For many of these pos­si­ble dis­tri­bu­tions, once you open one of the en­velopes and learn how much money is in­side, you now know more about whether the other en­velope has more or less money than the one you opened. For ex­am­ple, if you as­sume that nei­ther en­velope has more than \$1,000 and then open an en­velope with \$800, the other en­velope has to have \$400, so, con­trary to the line of rea­son­ing in the “para­dox”, switch­ing would be bad.

On the other hand, per­haps you only want to think about dis­tri­bu­tions for which it seems the para­dox still holds: ones in which that, re­gard­less of how much money you find in en­velope A, en­velope B still has an equal chance of be­ing twice as much or half as much. Well, it turns out that you can prove that this crite­rion also im­plies that the ex­pected value of the amount of money in en­velope A is in­finity. This makes the para­dox seem much less para­dox­i­cal: first, when your ex­pected value is in­finity, any spe­cific finite re­sult is dis­ap­point­ing (which is why switch­ing is always cor­rect), and sec­ond, any finite num­ber mul­ti­plied by in­finity is still in­finity (which ex­plains how each en­velope can have an ex­pected value of 1.25 times the other).

(Ap­par­ently, my origi­nal source was David Chalmers, of all peo­ple.)

• On the other hand, per­haps you only want to think about dis­tri­bu­tions for which it seems the para­dox still holds: ones in which that, re­gard­less of how much money you find in en­velope A, en­velope B still has an equal chance of be­ing twice as much or half as much

I don’t see your con­clu­sion hold­ing. I am in­clined to say: There­fore there are no dis­tri­bu­tions which that, re­gard­less of how much money you find in en­velope A, en­velope B still has an equal chance of be­ing twice as much or half as much.

• I don’t see your con­clu­sion hold­ing. I am in­clined to say: There­fore there are no dis­tri­bu­tions which that, re­gard­less of how much money you find in en­velope A, en­velope B still has an equal chance of be­ing twice as much or half as much.

I sup­pose “num­bers se­lected from all the num­bers in the se­ries 2^n” and so forth are ruled out of be­ing dis­tri­bu­tions based on the “in­fini­ties and un­com­putable things are just silly” prin­ci­ple? (I am fairly con­fi­dent that) some­thing on that or­der of difficulty is go­ing to re­quired to provide the en­velopes. A task that is be­yond even Omega in the uni­verse as we know it but per­haps not be­yond an in­tel­li­gent agent in the pos­si­ble uni­verses that rep­re­sent com­pu­ta­tional ab­strac­tions na­tively.

• Ac­tu­ally there are no uniform dis­tri­bu­tion in this set (an in­finite enu­mer­able set). You may se­lect num­bers from this set, but some of them will have higher prob­a­bil­ity than oth­ers.

• Ac­tu­ally there are no uniform dis­tri­bu­tion in this set (an in­finite enu­mer­able set).

That is what I was get­ting at with ‘ruled out of be­ing dis­tri­bu­tions’.

• Oh… I mi­s­un­der­stood you then.

• More­over, this means that if we want to do this with util­ity rather than money, you’d need an un­bounded util­ity func­tion, which can’t hap­pen if you’re obey­ing Sav­age’s ax­ioms.

• It is aimed at peo­ple with only ba­sic com­mand of probabilities

Such peo­ple have prob­a­bly not heard of the two en­velopes prob­lem and thus the ti­tle is not in­for­ma­tive for them.* It seems to me that it would be use­ful to put some­thing in the ti­tle to in­di­cate that this post is about prob­a­bil­ities and maybe that it is fairly in­tro­duc­tory. I could be wrong about how peo­ple read this site. Maybe ev­ery­one clicks through to the ar­ti­cle and reads as far as the ital­i­cized sec­tion, but it seems low cost to give it a more in­for­ma­tive ti­tle.

* Also, I doubt that peo­ple who do as­so­ci­ate “two en­velopes” with prob­a­bil­ity are not very likely to think of this par­tic­u­lar prob­lem, for what it’s worth.

Added: “this site” = dis­cus­sion. If the plan is to move this to main, the struc­ture makes more sense. But I still think the ti­tle could be bet­ter.

• All fair points. I did want to post this to main, but de­cided against it in the end. Didn’t know I could move it to main af­ter­wards. Will work on the ti­tle, af­ter I’ve fixed the er­ror pointed out by Vin­cen­tYu.

• One of the en­velopes con­tains 2 glort’s worth of dol­lars, and the other en­velope con­tains 4 glo­rts’ worth of dol­lars. I don’t know the ex­change ra­tio of glo­rts to dol­lars, ex­cept that it is pos­i­tive.

Now it is clear that the ex­pected value is 3 glo­rts’ worth of dol­lars, re­gard­less of the en­velope picked. It’s still pos­si­ble that the game mas­ter is us­ing some var­i­ant of “if the value of the glort is low for the du­ra­tion of this trial, put the larger amount of money in en­velope B; if the value of the glort is high, put the larger amount of money in en­velope a” that fa­vors one en­velope over the other.

• Nice.

• There is an­other very cool puz­zle that can be con­sid­ered a fol­lowup which is:

There are two en­velopes in which I, the host of the game, put two differ­ent nat­u­ral num­bers, cho­sen by any dis­tri­bu­tion I like, that you don’t have ac­cess. The two en­velopes are in­dis­t­in­guish­able. You pick one of them (and since they are in­dis­t­in­guish­able, this can be con­sid­ered a fair coin flip). After that you open the en­velope and see the num­ber. You have a chance to switch your num­ber for the hid­den num­ber. Then, this num­ber is re­vealed and if you choose the greater you win, let’s say a dol­lar, oth­er­wise you pay a dol­lar.

Now, be­fore ev­ery­thing I said hap­pens, you must de­vise a strat­egy that guaran­tees that you have a greater than 12 chance of win­ning.

Some notes:

1- the prob­lem may be ex­tended for ra­tio­nal, or any set of con­struc­tive num­bers. But if you want to think only in prob­a­bil­ities this is ir­rele­vant, just an over for­mal­ism.

2- This may seem un­cor­re­lated to the two en­velopes puz­zle at first, but it isn’t.

3- I saw this prob­lem first on EDITthis post on xkcd blag. Thanks for Vaniver for point­ing out.

• I be­lieve you’re think­ing of this blag post.

• Yes, that’s it! Thanks.

• Isn’t there an ad­di­tional re­quire­ment that there is a min­i­mum el­e­ment in the set?

• No, you can think on the ra­tio­nals, for ex­am­ple.

• There are two en­velopes in which I, the host of the game, put two differ­ent nat­u­ral num­bers, cho­sen by any dis­tri­bu­tion I like, that you don’t have ac­cess.

Now, be­fore ev­ery­thing I said hap­pens, you must de­vise a strat­egy that guaran­tees that you have a greater than 12 chance of win­ning.

Well nat­u­ral num­bers and sim­ple greater than satis­fy­ing makes it easy. “If one THEN swap ELSE keep.”

• Maybe I didn’t ex­press my­self well, but this strat­egy should work re­gard­less of the dis­tri­bu­tion I choose. For ex­am­ple, if I choose a dis­tri­bu­tion in which 1 has prob­a­bil­ity 0, than your strat­egy yield 12 chance.

• Maybe I didn’t ex­press my­self well, but this strat­egy should work re­gard­less of the dis­tri­bu­tion I choose. For ex­am­ple, if I choose a dis­tri­bu­tion in which 1 has prob­a­bil­ity 0, than your strat­egy yield 12 chance.

If that kind of se­lec­tion of dis­tri­bu­tions is pos­si­ble then there is no free lunch to be found.

For any strat­egy of en­velope switch­ing a hos­tile dis­tri­bu­tion se­lec­tor who knows your strat­egy in ad­vance can triv­ially se­lect dis­tri­bu­tions to thwart it.

• Have you looked at the “solu­tion”? There re­ally isn’t a counter-strat­egy that re­duces it to 12 chance, al­though there are strate­gies mov­ing it ar­bi­trar­ily close to 12.

• It is easy to prove that this im­pli­ca­tion is false, by con­sid­er­ing a sim­ple counter-ex­am­ple cour­tesy of Vin­cen­tYu.

Even sim­pler counter ex­am­ple: X and Y take val­ues 1 and 100, in­de­pen­dently and with equal prob­a­bil­ity. Then E(X/​Y) = 14 ( 11 + 1100 + 100100 + 1001), which is ba­si­cally 25.5. Ditto for E(Y/​X).

Ex­pec­ta­tion is a mean, and in means, large terms dom­i­nate—for E(X/​Y), the (X=100,Y=1) situ­a­tion dom­i­nates, while for E(Y/​X), the (X=1,Y=100) situ­a­tion dom­i­nates.

In fact, if X and Y are in­de­pen­dent, iden­ti­cally dis­tributed, strictly pos­i­tive and non-triv­ial (ie not just con­stants), then I think that we always have E(X/​Y) > 1.

• I think you reached the wrong con­clu­sion in your fi­nal para­graphs. Can you show how the ex­pected value calcu­la­tion could be differ­ent for “the amount of money con­tained in the other en­velope ex­pressed in terms of the amount of money in this en­velope [which is in dol­lars, BTW]” ver­sus “the amount of money in the other en­velope ex­pressed in dol­lars”?

I see that Wikipe­dia says that there is no gen­er­ally ac­cepted solu­tion to the para­dox. That al­most cer­tainly means peo­ple are in­ter­pret­ing it differ­ently. I’ll give my opinion. But let me re­cast the prob­lem in more pointed terms.

Mr Money­bags writes a check for some real pos­i­tive amount of money and puts it in an en­velope. Then he writes a check for dou­ble the amount of the pre­vi­ous check and puts it in an­other en­velope. He shuffles the en­velopes. You pick one and open it, and you find \$N. He offers to let you switch to the other just this once. Should you?

On first glance it ap­pears that the other en­velope could have \$N/​2 or \$N*2, and that you are en­tirely ig­no­rant about which is the case, so your ig­no­rance pri­ors are 12 for each pos­si­bil­ity. Then the ex­pected value calcu­la­tion comes up all wrong! Call the hy­poth­e­sis that you opened the lower value en­velope L and the hy­poth­e­sis that you opened the higher value en­velope H.

``````E(switch­ing)=P(H)*(N/​2)+P(L)*(N*2)=(1/​2)*(N/​2)+(1/​2)*(N*2)=(5/​4)*N.
``````

But that’s non­sense. My opinion as to what went wrong was that it’s false that you are en­tirely ig­no­rant af­ter open­ing the en­velope, be­cause you can now do an up­date on your ig­no­rance prior.

We’ll start, of course, with Bayes’ for­mula P(H|N)/​P(L|N) = P(N|H)/​P(N|L) * P(H)/​P(L) * P(N)/​P(N). The last ra­tio can­cels. The sec­ond-to-last ra­tio also can­cels be­cause the shuffling of the en­velopes made it equally likely you’d open ei­ther one. We know ba­si­cally noth­ing about the dis­tri­bu­tion that the lower value was first drawn from, so a con­ve­nient ig­no­rance prior on it is that it was some uniform dis­tri­bu­tion over the in­ter­val \$A to \$B. Con­se­quently, the higher value would be de­scribed by a uniform dis­tri­bu­tion over the in­ter­val 2*\$A to 2*\$B. The dis­tri­bu­tions may or may not over­lap. I’ll take each case sep­a­rately.

Com­mon start: A=0.

``````P(N=k|H)={1/​3 for 0<k<=B; 1 for B<k<=2B}
P(N=k|L)={2/​3 for 0<k<=B; 0 for B<k<=2B}
In­te­grate each with re­spect to k from 0 to 2B, then plug in
P(H|N)/​P(H|L) = (4/​3*B)/​(2/​3*B) = 2
and con­vert back to prob­a­bil­ities
P(H|N)=2/​3, P(L|N)=1/​3.
``````

Separate start: A>0 and 2A<B.

``````P(N=k|H)={0 for A<k<2A; 1/​3 for 2A<=k<=B; 1 for B<k<=2B}
P(N=k|L)={1 for A<k<2A; 2/​3 for 2A<=k<=B; 0 for B<k<=2B}
In­te­grate each with re­spect to k from A to 2B, then plug in
P(H|N)/​P(H|L) = P(N|H)/​P(N|L) = (4/​3*B-2/​3*A)/​(2/​3*B-1/​3*A) = 2
and con­vert back to prob­a­bil­ities
P(H|N)=2/​3, P(L|N)=1/​3.
``````

No over­lap: B<2A.

``````P(N=k|H)={0 for A<=k<=B; 1 for 2A<=k<=2B}
P(N=k|L)={1 for A<=k<=B; 0 for 2A<=k<=2B}
In­te­grate each with re­spect to k from A to 2B, then plug in
P(H|N)/​P(H|L) = P(N|H)/​P(N|L) = (2B-2A)/​(B-A) = 2
and con­vert back to prob­a­bil­ities
P(H|N)=2/​3, P(L|N)=1/​3.
``````

So view­ing your prize, you sud­denly feel it’s twice as likely that you got the higher amount. Bizarre, huh? And your ex­pected value calcu­la­tion becomes

``````E(switch­ing)=P(H|N)*(N/​2)+P(L|N)*(N*2)=(2/​3)*(N/​2)+(1/​3)*(N*2)=N,
``````

so there’s no point switch­ing af­ter all. Even weirder is that, be­fore you open the en­velope, this is a situ­a­tion where you know for sure what you will be­lieve in the fu­ture, but you nev­er­the­less can’t make that up­date till then.

• This is a re­ally good ex­po­si­tion of the two en­velopes prob­lem. I re­call read­ing a lot about that when I first heard it, and didn’t feel that any­thing I read satis­fac­to­rily re­solved it, which this does. I par­tic­u­larly liked the more pre­cise re­cast­ing of the prob­lem at the be­gin­ning.

(It sounds like some credit is also due to Vin­cen­tYu.)

• The flaw in the ar­gu­ment is sim­ply that it as­sumes E(X/​Y) > 1 im­plies that E(X) > E(Y).

I didn’t un­der­stand this sen­tence very well at first, be­cause the in­equal­ity on the right is two steps re­moved from the one on the left. I find this ver­sion clearer:

The flaw in the ar­gu­ment is sim­ply that it as­sumes E(X/​Y) > 1 im­plies that E(X) /​ E(Y) > 1. (If E(X) /​ E(Y) > 1, that would im­ply that E(X) > E(Y).)

• Here’s a solu­tion to a more gen­eral ver­sion of the prob­lem:

Let’s say that the red en­velope con­tains N times as much money as the blue en­velope with prob­a­bil­ity p, and the blue en­velope con­tains N times as much money as the red en­velope with prob­a­bil­ity (1 - p).

Without loss of gen­er­al­ity, N is at least 1.

If N = 1, both en­velopes con­tain the same amount, and there is no point in switch­ing.

If N > 1, let the vari­able s rep­re­sent the smaller amount of money be­tween the amounts of the two en­velopes. So one en­velope con­tains s, and the other en­velope con­tains Ns.

Sce­nario 1: The blue en­velope con­tains s, and the red en­velope con­tains Ns. This sce­nario oc­curs with prob­a­bil­ity p.

Sce­nario 2: The red en­velope con­tains s, and the blue en­velope con­tains Ns. This sce­nario oc­curs with prob­a­bil­ity (1 - p).

As­sume s is not less than 0.

The ex­pected amount of money in the blue en­velope, E(B) = sp + Ns(1 - p) = s(p + NNp).

The ex­pected amount of money in the red en­velope, E(R) = s(1 - p) + Nsp = s(1 - p + Np).

If s = 0, both en­velopes con­tain the same amount, and there is no point in switch­ing.

If s > 0, com­pare the ex­pec­ta­tions of the amounts of money in the en­velopes in terms of s:

E(B) > E(R) when

s(p + NNp) > s(1 - p + Np)

p + NNp > 1 - p + Np

2p − 2Np > 1 - N

2p(1 - N) > 1 - N

2p < 1, be­cause (1 - N) < 0

p < 12

Similarly, E(B) < E(R) when p > 12, and E(B) = E(R) when p = 12.

The ra­tios of the ex­pected amounts of money in each en­velope de­pend only on p when s > 0 and N > 1.

Both en­velopes con­tain the same amount of money when s = 0, N = 1, or both.

So if your de­gree of be­lief that the red en­velope con­tains more money than the blue en­velope is the same as your de­gree of be­lief that the blue en­velope con­tains more money than the red en­velope, don’t bother switch­ing, un­less you need to kill time (which you already knew in­tu­itively, but Q.E.D.)

I got the idea of us­ing the vari­able s to rep­re­sent the smaller of the amounts in the two en­velopes from R Falk 2008: “The Un­re­lent­ing Ex­change Para­dox”.