* This is one of the trickiest paradoxes I've ever heard. (Link goes to the standard version of the problem, but here's a more precisely formulated version.)
* Episode 8 of the Rationally Speaking podcast, "The Anthropic Principle."
* Slate's got a promising new blog called The Wrong Stuff, by Kathryn Shulz, author of the forthcoming Being Wrong: Adventures in the Margins of Error. As you all know, this is a favorite subject of mine. This week, she interviews Alan Dershowitz on being wrong.
* The New York Times magazine on the moral life of babies.
* Whoa, it's already 2 PM and I have yet to mock philosophy today! I'm slipping. Here, have a dinosaur comic.
* The brouhaha over South Park's attempt to depict Muhammad inspired a student group to protest by chalking stick figures on campus walkways and labeling them "Muhammad." That sparked another brouhaha, including a Huffington Post editorial arguing that depictions of Muhammad are offensive in the same way a swastika is offensive. My brother Jesse Galef wrote a post for Friendly Atheist disagreeing. Incidentally, for what it's worth, here's my contribution: ("Muhammad": O-|-<)
* An oldie but goodie: "The Last Question," by Isaac Asimov.
There's no paradox when the fact is that every choice we make is random. Every choice being in effect an assessment of random probability, without the apparentness of randomness, there would be no need for choice at all.
ReplyDeleteHahaha, that is a great puzzle. Thanks Julia.
ReplyDeleteI don't know the answer yet and haven't read it. But I can offer the following observation. It seems to me that the stated logic holds -- i.e. the expected gain should be $10000 per trial on average -- if one does repeated trials in which the chosen envelope always contains $40000. That is, if the person running the contest always hands you a $40000 envelope, but half the time the other envelope has $20000, and half the time it has $80000, then you should always switch.
But that's not the situation described in the puzzle. My difficulty is in conceptualizing the difference between the above situation and the situation described in the puzzle...
Oh good, does Dershowitz confess to being completely wrong about everything about Israel and the Palestinians?
ReplyDeleteSheldon: exactly what "everything" is Dershowitz wrong about with regards to Israel/Palestine? Are you referring to his carefully considered arguments on the subject?
ReplyDeletere tricky paradox:
ReplyDeleteIt's a variation on the Monty Hall problem, with only two doors, and the value ratio between the Goat and the Beautiful Person of Appropriate Sex is small. And you get to peak behind the chosen door, but you can't tell the difference. So unlike MH, the Host's offer to swap doesn't add any new information, assuming that the Host's strategy (offering a swap) was predetermined? Perhaps he, attempting to optimize his expenses, only offers the swap if the Guest picks the expensive option. In which case the Guest should only take the swap if it isn't offered.
I think the mistake (generic human fallacy) is in insisting on an optimal solution rather than a satisfactory one. In other words, if the Goat looks good to you, go with it; if not, you might as well take a chance.
Ritchie the Bear,
ReplyDeleteNo time to get into details. However I think it sufficient to say that if one values justice, human rights, and fairness, then Dershowitz's fanatical and biased defense of Israeli occupation and warfare can hardly be considered "carefully considered".
Marshall, the Monty Hall problem is actually unrelated to the Two Envelope problem. The former has a simple (if non-intuitive), clearly right answer. The latter is still puzzling mathematicians years after it was posed.
ReplyDeleteAnd the question isn't "what would be a satisfactory approach?" it's "Am I likely to end up with more money if I switch or if I don't?"
"Am I likely to end up with more money if I switch or if I don't?" is not a paradoxical question.
ReplyDeleteArtie, right - but the fact that the answer seems to be "you should keep switching forever" *is* paradoxical.
ReplyDeleteBut I don't see that as a logical improbability or a conflict between two apparent certainties. If you probably should keep switching forever, then you probably should, since it seems nobody has been more sure that you probably shouldn't.
ReplyDeleteThat Asimov short story was brilliant! Thanks for the recommendation. I passed that along to multiple people today.
ReplyDeleteHi Julia, I admit my tongue gets into my cheek sometimes; you're right, the MH problem isn't specificly applicable. But truly, knowing how much money is in one envelope doesn't help you decide what to do. That seems to be what Amos Storkey concludes, although I wasn't able to follow his notation: in the end, it's an even shot whether you improve by switching. He does suggest the interesting extension when the amount of money in the other envelope is not known: it doesn't change anything (I think he said).
ReplyDeleteConsider the real life problem: should I leave the Farm and move to the Big City? The upside is unlimited, whereas the downside is at most the loss of what I have now. If I average over all possible outcomes, apparently it will always turn out that I should cast my fate to the winds. One hip friend used to say, "You get what you settle for"... my corollary, "If you don't settle for something, you don't get anything." The temptation to constantly switch is a recipe for a Chronic Loser. We might call it the "Grass is Always Greener Fallacy", and many indulge it.
Apparently it is fatally wrong to try to compute "expected gain" in the presence of incomplete information... think of the banking communities disastrous attempt to quantify risk during the previous decade. This would seem to be a genuine problem for a "Scientific Ethic".
By the way Julia, since you like paradoxes, have you seen this one (due perhaps to Douglas Hofstadter?) ? It feels to me to be related, although I would have a hard time explaining how... something to do with Computability of Outcomes.
ReplyDeleteA certain Logician is condemned to death. To add spice, the Judge decrees that the execution will take place in June, but the day is not to be known to the Logician, so that he will be surprised when the event occurs. The Logician muses: "If I am still alive on the 29th, then I will know that I am to be executed on the 30th: since I am not to know ahead of time, the date cannot be set for the 30th. But hark! If I am still alive on the 28th, since the date cannot be the 30th, I will know that it must be the 29th... and I am not to know, so neither can the 29th be the date. Recursing through the month similarly, clearly the Judge's order cannot be complied with, and I cannot be executed at all! I can safely be at work on my next volume of Analytic Philosophy!" And that is where he is on the 12th, when he is genuinely surprised by the unpredictable fatal knock on his cell door.
In order to compute an expectation value, you need to know what the sample space is (along with the probabilities). In this case, you need to know the total amount in the envelopes.
ReplyDeleteIf you don’t know this, you can’t (correctly) compute an expectation value after opening one envelope, any more than you could before opening either envelope.
If you do know this, and you open one envelope, you know what is in the other.
If there are two envelopes with amounts X and 2X in them, the sample space is {X, 2X}. If I pick one with a coin flip, my expectation value is 3X/2. This is the amount my average will converge to if I repeat the process many times (of course, it is impossible to get 3X/2 on any single experiment).
Suppose I pick an envelope, and call the amount in it Y. Then either Y = X or Y = 2X. But my sample space is still {X, 2X}, because if Y = X then the other envelope MUST have 2X, and if Y = 2X then the other envelope MUST have X.
It is correct that the other envelope contains either 2Y or Y/2 but the scenarios {Y, 2Y} and {Y, Y/2} represent separate sample spaces. You can say, in your ignorance, that either one is equally likely, but this is not a probability, and can't be used to compute an expectation value. If the amount in the envelopes is fixed at the beginning (at 3X), then Y=X or Y=2X, and the expectation values must be computed from the respective sample spaces, both of which will come to 3X/2.
If the amount in the envelopes is not fixed at the beginning, and you would receive 2Y or Y/2 based on a coin flip, then you will win (on average) by taking the flip. But this is different from the problem stated, where the contents of the envelopes is established at the beginning of the game, defining a fixed sample space. The trick to the paradox is fooling you into thinking the sample space is {2Y, Y/2}, which is only true if it is a stochastic process.
The Bayesian solution at the first site you posted did little for me, and the above about sample spaces also left me uncertain. I finally grasped the problem in an intuitive way after reading its Wikipedia entry, although that entry also has problems. It seems to me that the error isn't nearly as deep as some people are trying to make it.
ReplyDeleteHere's what I think the derivation of expected gain should have looked like. Let me know if you think I'm mistaken:
i = initial value, in first envelope
x = value in second envelope
y = value in chosen envelope
z = value in swapped envelope
These values are established by two coin tosses. The first determines whether x = 2i or x = i/2. The second determines whether y = i or y = x.
The four possible results are as follows, each with equal probability:
a) x = 2i, y = i (so z = x = 2i)
b) x = 2i, y = x (so z = i)
c) x = i/2, y = i (so z = x = i/2)
d) x = i/2, y = x (so z = i)
In each of these cases, the expected gain for swapping is
a) z - y = 2i - i = i
b) z - y = i - 2i = -i
c) z - y = i/2 - i = -i/2
d) z - y = i - i/2 = i/2
For a total of
.25(i) - .25(i) - .25(i/2) + .25(i/2)
Which sums to 0, as expected.
The puzzle's derivation erroneously assumes that the second coin flip always yields y = i, which leaves only results a and c at .50 each, which sums to a positive .25(i).
It may indeed be that the initial distribution of i causes additional problems in this scenario, but the fundamental problem is much more basic.
I think intuition wins, and their math is wrong.
ReplyDeleteConsider how you'd simulate this.
Prepare two envelopes, one containing N, the other 2N. Pick one at random. If you don't swap, the expected value is 0.5(N)+0.5(2N)=1.5(N). If you swap every time, the expected value is 0.5(2N)+0.5(N)=1.5(N).
No matter how N is distributed, whether or not you swap, on average you'll get 1.5(mean(N)).
So, intuition agrees with the obvious approach and with the simulation. The only thing that doesn't agree is the weird math that was proposed to solve this.
Ok, I solved it for a special case. Brace yourselves.
ReplyDeletePick an integer N that has distribution P(N)=1/2^N, [1..inf]
In envelope A, place N dollars.
In envelope B, place 2*N dollars.
Flip a coin to pick a random envelope.
P(A)=0.5, P(B)=0.5
Open the envelope to reveal X dollars.
If it's envelope A, P(X|A)=1/2^X
If it's envelope B, P(X|B)=1/2^(X/2)
Here's the key: After seeing X, the envelope probabilities change!
For example, if X=1, it MUST be envelope A.
Use Bayes' theorem to find the envelope probabilities conditioned on X.
P(X)=P(X|A)P(A)+P(X|B)P(B) = .5[1/2^X + 1/2^(X/2)]
P(A|X)=P(X|A)*P(A)/P(X) = 0.5/2^X / P(X)
P(B|X)=P(X|B)*P(B)/P(X) = 0.5/2^(X/2) / P(X)
Calculate the expected value of swapping envelopes.
E = P(A|X)*2X + P(B|X)*X/2 = X (2P(A|X) + P(B|X)/2)
Swap envelopes only when E > X or (2P(A|X) + P(B|X)/2) > 1
This only happens when X=1, because it means you opened envelope A.
When X=2, E equals X, so swapping makes no difference.
For all other values of X, E is less than X, so don't swap.
Hi Max,
ReplyDeleteInteresting. This might be a minor point -- I'm actually not sure -- but if X=5, or indeed any odd integer, doesn't that mean it has to be envelope A? (Because if it were envelope B, it would be an even number.)
So your distribution would need to be all even integers...
Good catch, Scott.
ReplyDeleteWe can try a continuous distribution, P(N)=1/e^N, [0..inf]
I think the optimal strategy will be similar: Swap envelopes when X is small, don't swap when X is large. The intuition is that in this set-up, large values of N are much less probable than small values, so a large X is more likely to be envelope B (where X=2N), so don't swap.
But I still expect that swapping EVERY time produces the same result on average as never swapping.
Ok, I solved it for the continuous exponential distribution, 1/e^N. The math is pretty much the same, just replace 2^X with e^X and 2^(X/2) with e^(X/2).
ReplyDeleteSwap envelopes when X < 2 ln(2).
Otherwise, don't swap.
Now I'm starting to grasp what people mean when they say the problem describes an impossible distribution.
ReplyDeleteTo slightly restate my post above, the puzzle assumes a distribution such that y = i and y = x are statistically equivalent, and are therefore indistinguishable from the perspective of the person opening the envelope.
So what's the closest thing to such a distribution?
Here's one we haven't tried yet:
Say the host choses some n between 0 and 9 inclusive with equal probability, stuffs envelope A with 2 ^ n and stuffs envelope B with 2 ^ (n + 1). The possible values for A, then, are {1...512} and for B, {2...1024}. Then the contestant flips a coin to choose an envelope, opens it and sees the value X.
Here are the relevant probabilities:
P(1) = P(1|A)P(A) + P(1|B)P(B)
= .1 * .5 + 0 * .5 = .05
P(2)...P(512) = P(2|A)P(A) + P(2|B)P(B)
= .1 * .5 + .1 * .5 = .1
P(1024) = P(1024|A)P(A) + P(1024|B)P(B)
= 0 * .5 + .1 * .5 = .05
So excluding the degenerate cases at X = 1 and X = 1024, what is the expected gain for swapping envelopes?
Let's try a specific example: X = 16
P(A|16) = P(16|A)P(A)/P(16)
=.1 * .5 / .1 = .5
P(B|16) = P(16|B)P(B)/P(16)
=.1 * .5 / .1 = .5
So the expected gain for swapping is:
.5 * 16 - .5 * 8 = 4
If this line of reasoning is valid for 16, then it yields an average gain of .25X for any value of X between 2 and 512.
When you open the envelope, there is a .05 chance that you'll find 1024 dollars, in which case you obviously do not want to swap. But in all other cases, it appears that you should swap.
Have I gotten something wrong? Is this still a paradox?
Well done, Scott.
ReplyDeleteThe paradox stems from the notion that you stand to gain by swapping the envelope EVERY time without even opening it. But that's clearly false in your scenario, since 5% of the time you pick up $1024, and swapping it would just throw away $512, erasing the gains. The whole point of opening the envelope is to not miss the $1024.
Except that isn't it part of the conundrum that you only get one chance at the swap? (And note that a conundrum is not automatically a paradox.)
ReplyDelete