249 points · by niklasbuschmann · 4y ago · 300 comments
While this sounds like just a lazy intuitive explanation, it calls out the key component - a lack of information about the outcome - that can help avoid the paradox in more complex situations.
This is in contrast to the three-door problem where information is gained by opening the first door. https://en.wikipedia.org/wiki/Monty_Hall_problem
In imperfect information games you are in an information set, not a subgame. When the value is 2A and you have to make a keep or switch decision, the value A is still part of how you calculate the solution. When the value A is the game you are in, it doesn't matter, the value 2A is still part of how you calculate the solution. It has to be this way, because you don't have a way of discriminating between which game state you are in. This is one of the notable and counterintuitive (apparently) results of game theory and it really matters, because when you don't notice it you run into a contradiction.
Check out Noam's talk on solving imperfect information games at NIPS 2017 for a more detailed treatment of this subject. I'm going to handwave it to dive deeper into the exact logical contradiction.
So 2A and A both have to exist still for the correct calculation. The subgames are still connected. But notice what happens? What the failed solution does though is it creates two different subgames!
In one they set 2A. In another they have A/2. But its still two different subgames. Now why does this seem appropriate? Because this sort of reasoning is okay in perfect information games! You can reason about different subgames independently of each other.
But we're not in a perfect information game. We're in a null information set. So 2A and A coexist.
Since we can't state that we are in the 2A case or the A case, being in an information set that prevents us from discrimination between these two things, they error when they try to build their reasoning on the supposition they are able to do so. In particular, they create a logical contradiction.
The dependence means you are required to have the subgame from the 2A as the other side of the equation. Required, but they don't do that. Instead they evaluate one subgame as if they are in a perfect information context.
That is the missing equality symbol that people aren't seeing. That dependence. So what is really happening is this: They claim 2A=A; assuming A is not zero, they claim that 2=1. You can see this very clearly when you take the actual correct probabilities for expectation and place them beside the incorrect ones:
Observe.
They said: 5/4A = (1/2)2A + (1/2)A/2
Reality : 3/2A = (1/2)2A + (1/2)A
Equality : (1/2)2A + (1/2)A/2 = (1/2)2A + (1/2)A
(1/2)A/2 = (1/2)A
A/2 = A
A = 2A
1 = 2
It's a bit worse than that in the error, because they omit that expectation is a function of both policy and information set. Trying to make the decision based on expected value when expected value is not well defined without a policy choice is another very fundamental error. I mean seriously, ask yourself if you get the same result by slamming your head into a wall as opposed to doing something productive. You don't. Policy choice matters. In this case literally the only policy choice that has 0 EV is the one they claim is the best. Its silly. When you look at the game tree, when you actually evaluate the proper graph, its literally the only bad decision you can make. There are quite literally an infinite number of strategies that give the same EV solution. All except the one they chose.The reward for the game is only defined for R(KEEP) and it is defined as {0.5: A, 0.5: 2A}. R(SWITCH) ends up getting its valuation according to a bellman equation: R(SWITCH) = R(SWITCH) * P(SWITCH) + R(KEEP) * P(KEEP). This is obviously an infinite sequence if P(SWITCH) = 1. We actually tend to use a discount factor here like 0.9999999999*R(some_choice) because for this infinite sequence it lets us use limits to claim the case is defined as 0.
But this is like, an extension of why this is wrong - because game theory with information sets already solves for probabilities over action space. It already acknowledges it. So when you point to the information set problem? You point to game theory. And you point to the root of why their calculations were wrong: in an imperfect information game, you play both the game you're in and the game you're not in at the same time.
But this omits (loses) the information of "both envelopes contain >= $MONEY". That is, as soon as you switch to the other envelope, the situation is still true, the previous envelope contains >= $MONEY.
So if you forget that your current envelope also contains >= $MONEY you're stuck in an infinite loop, which you break out of only because you can only do a single iteration.
The way that they fool you is by saying that you either double your money or you halve it, leading you to think that your expected ratio is 2.5/2. But that isn't correct. That ratio doesn't mean anything. That's the wrong step.
This is the key difference between perfect information and imperfect information. In perfect information you can do the assumption of just one subgame and it works because you know what game you are in - its the one you are in. So you are playing over states and actions. In imperfect information you have to assume you are in both at the same time - so you can't assume one subgame, because you don't know which one you are in. You are playing over information sets - every state contained within that information set, not just one state.
I have a feeling that saying it like this, in the general way, is a lot more confusing to people than your phrasing. So thanks for sharing your phrasing.
If you have a tree:
0.5
/ \
A 2A
In a perfect information game you can do this thing where your like "assume a" and think ahead and then "assume 2a" and think ahead. But in the the imperfect information game world you don't know whether you have a or 2a. So you have to "assume a 2a" and you have to deal with your solution space using counterfactual reasoning. Picture a chain coming out from the A to the 2A. They are married. They cannot be parted.It is really counterintuitive, but the way I think about it is "you are playing every game at once" and "you are playing a game over information sets and strategy choices" not "state space and actions" so since you are playing every game at once already when they come in with that other game - well, you were already playing another game. They're overwriting that part of your solutions memory. Which in math terms declares an equality. In that case that equality is 2=1 because they say A = A/2 or that 2A=A depending on which framing you use to build the real game tree.
The actual recurrence relationship is obviously
R(KEEP) = {0.5: A, 0.5: 2A} = 3/2A.
R(SWITCH) = P(KEEP)*R(KEEP) + P(SWITCH)*R(SWITCH)
Solving the game from there is really trivial - you're only allowed one strategy selection per information set and you only one set the null set. You literally get to make only one decision as to a scalar between 0 and 1 to define P(KEEP) and P(SWITCH) which is going to be 1-P(KEEP).`R(SWITCH)` becomes `R(KEEP)` because of the way the markov chain drains into it. Literally the only thing you can't pick is `P(SWITCH)=1`. Everything else is an equivalent EV solution. P(SWITCH) <= P(KEEP) because there exists one P(SWITCH=1) is undefined or else 0 (in practice we take the limit after a horizon by multiplying by some term like 0.9999999 to avoid the infinite regress).
And since the problem didn't make this clear, your policy __influences your expected value__ and so their reasoning process is just so broken at a fundamental level. They literally declared 2=1 and therefore undefined solution is the best answer despite infinite solutions that aren't undefined. Its... really bad reasoning. Don't listen to the idea that switching is better. It can't be. Look at the actual relationship. Look at the actual graph. They skip some really important steps, like using the same gametree for the entire calculation.
The actual solution is explained right there on the page, the expectation for both envelopes (one has x, one has 2x) is x*3/2, so switching changes nothing.
The "solution" demanded is supposed to be pointing out the specific logical error in the erroneous calculation that says switching should win. Citing the correct logic is not considered sufficient.
> Denote by A the amount in the player's selected envelope.
which is information that we have not actually gained.
I tell you "These two envelopes contain money. One of the envelopes contains twice as much money as the other one. Pick one.". You pick one. I tell you the one you picked contains $60. You've now determined the amount in your selected envelope -- should you switch?
Select a power of 2 according to the probability
P(2^k) = 0.2 * 0.8^k
i.e. p(1) = 20%, p(2) = 16%, p(4) = 12.8%, etc.
Then place this amount in one envelope and twice that I'm the other envelope.
Then, randomly shuffle the envelopes and select one and open it. Say you see the number 16. It could have landed there in two ways: Either 16 was generated and the other envelope has 32. This happens with probability 0.2*0.8^4 ~ 8.192%. Alternatively 8 was generated and the envelope you have is already the largest one. This happens with probability 0.2*0.8^3 ~ 10.24%. Given that you see 16 already, the relative probability becomes 4/9 vs 5/9. In other words the chance that you have the largest envelope already is 5/9. The expected value of the other envelope is then 5/9*8 + 4/9*32 = 18.67 > 16 so you should switch.
In fact, try this for different initial envelopes and you'll see that you should always switch.
But, if you should always switch, why even look inside the envelope?
But, then you're back at the symmetry / no information argument.
Spherical cow problems often end in counterintuitive results.
That being said, even if you let k go negative I think it's still a paradox.
If you're curious the resolution to this is that before you look in the envelope the expected value of both envelopes is infinite. Only after you look inside one of them does that collapse to two finite values that you can subtract.
Once the probability gets around 7/9*.5X + 2/9*4X, then switching is no longer attractive.
- https://en.wikipedia.org/wiki/Boy_or_Girl_paradox
- https://en.wikipedia.org/wiki/Penney%27s_game
- Waiting time paradox
- Honorary mention: https://en.wikipedia.org/wiki/St._Petersburg_paradox
(feel free to add more)
This is in contrast to the earlier problem statement of Gardiner's wealthy men playing against each other as per the article, actually.
But the "possible values" they put in are A/2 and 2A, which makes no sense. A is a random variable.
Don't forget that random variables are really functions on a probability space with an implicit argument, so (1) when multiple random variables appear in a formula, they're implicitly evaluated at the same argument omega, and the formula must hold for all omega from the probability space, and more importantly, (2) there can't be free-standing omegas in a formula for expectation because expectation is an integral (or sum in this case where the probability space is discrete) over all possible omegas.
The big problem is that you can't have a uniform distribution on the natural numbers.
(And by extension, you can't have a uniform distribution on the rounded-to-integer version of a distribution on the real numbers.)
Or code that “obviously” has a bug only after it caused an issue in production.
Would be nice if someone warned me before I do a PR: “ok, fyi there is a subtle but devastating bug in the new_feature.cpp”
Cognitively, the mind filters out quite a bit of information for performance reasons.
Are we biased in favor of reasoning that "sounds plausible"?
My "hot dice" say "yes".
The case where switching gives you 2A and the case where switching gives you A/2 describe 2 completely different universes, not two different actions in one.
Take the practical example of $100 and $200: A is either $100 or $200 depending on which envelope you receive first, so the equation is either 0.5*A + 0.5*2A, or it is 0.5*A + 0.5*(A/2). It can never be 0.5*2A + 0.5*(A/2)
The thing that helped me reconcile this was realizing that the A in the two equations are different values; then replacing them.
(0.5⋅(0.5⋅A + 0.5⋅2.A)) + (0.5⋅(0.5⋅A + 0.5⋅0.5⋅A)) = 9/8 A
^ but the A in the left grouping (where it's 100) is different than the A in the right grouping (where it's 200).Replacing the As with their actual values
0.5⋅(0.5⋅100+0.5⋅2⋅100)+0.5⋅(0.5⋅200+0.5⋅0.5⋅200) = 150
And, since one envelope has 100 and the other has 200, an expected outcome across both envelopes is, as calculated, 150.> If A is the smaller amount, then the other envelope contains 2A. > If A is the larger amount, then the other envelope contains A/2.
These are conditional probabilities so you can't simply add them up and compute an expected value of switching like they show in the example.
`B = (2A if A=50, A/2 if A=100)`. Simplifying this to `B = 2A or A/2` loses important information: namely that when B is smaller, you expect A to be larger. Or alternatively, treating A as fixed (say A=100) conflates two different situations: one where the amounts are `100, 200` and one where they are `100, 50`. So you end up thinking B must have (200+50)/2 in it, which is incoherent. If you compute the expected B correctly then `A` is different in each branch.
It is subtle though. If this appeared in a paper, arguing something not obviously wrong, it'd be hard to convince everyone that the reasoning is bad.
However, suppose x is placed in an envelope and handed to you. Then a fair coin is flipped. If it comes up heads, 2x is placed in another envelope and if it comes up tail, x/2 is placed in that envelope. Then you should switch.
It's a subtle difference in how the envelopes are prepared, but it makes all the difference.
I’m not sure I’d have naively realized that the fixed amount in your envelope makes so much difference.
For people confused like me, think about the outcomes:
When the two are prepared together, say $2 and $4, then when you exchange your options are +2 and -2 with 50:50 odds.
When the second envelope is prepared based on $2 in your envelope, then when you exchange your options are +2 and -1 with 50:50 odds.
(I had to diagram this all out; unintuitive to me!)
The introduction of a second "stage" based on your action changes things in a non-obvious way. Your first action is less impactful than your second one, regardless of what you did.
I see that the article also says "commonly one writer proposes a solution to the problem as stated, after which another writer shows that altering the problem slightly revives the paradox." But it doesn't seem to elaborate on where the simple resolution falls down, if it does.
https://www.youtube.com/watch?v=_NGPncypY68
TL;DR (Spoiler alert): the expected value of the amount of money you end up with is an infinite series whose sum changes depending on the order in which you add up the terms, and so you can choose an order that makes this value come out to be positive, negative, or zero.
I believe mike_hock provides the clearest and simplest explanation in this thread: https://news.ycombinator.com/item?id=31567251
I also made this argument separately: https://news.ycombinator.com/item?id=31569991
When E[X], E[A], and E[X - A] are all well-defined, it is indeed the case that if E[X | A = a] > a for every particular value a, then E[X] > E[A].
What goes awry in this case is that E[X - A] is not well-defined (where X is the value in the unselected envelope and A is the value in the selected envelope). It is given by a conditionally convergent series, as noted.
That initial setup being, the act of starting the game with someone is(?) confers value in and of itself.
So I’m glad the real solution is wonky.
When the amount you multiply your money by depends on the amount of money you currently have, you have to factor in your initial money to each case to compute expected return.
In particular, I am disputing the fact that "no proposed solution is widely accepted as definitive" (exact quote). Indeed, the switching argument (or at least the argument as it is presented in the Wikipedia article) makes a clear and precise mistake that I claim any trained mathematician will immediately agree on once pointed to it.
This mistake is explained in the following comments: https://news.ycombinator.com/item?id=31566226, https://news.ycombinator.com/item?id=31567251 and https://news.ycombinator.com/item?id=31569991.
Once you have identified it, this mistake is all but subtle. It is not about infinite series or Bayesian reasoning. It does not require a 30 minutes rebuttal talk. It is simply about misusing the very definition of an expected value in a way that could be qualified as a typing error (see linked comments). This error can only go undetected because of the ambiguity of the English language. Most of the fancy mathematical discussions I've been reading are distractions. This paradox is about language and not about any deep mathematical fact of probability theory.
The issue in this case is that E[X - A] is not well-defined. The expected profit from switching is given by an infinite series whose positive and negative components are each of infinite total magnitude, thus yielding different sums when bracketed differently ("conditional convergence"; just a coincidence that the word "conditional" comes up here again).
The reason for the apparent disagreement is that in order to point out a logical flaw in an argument, one must make the argument formal and explicit enough first. There are several plausible ways that the Wikipedia argument can be translated into a machine-checkable formal proof (and this ambiguity is at the core of the paradox). When I make such an attempt in my head, I am not interpreting the expectation as a conditional one and the problematic step is about conflating a random variable with a fixed constant. In your attempt to formalize the Wikipedia argument, you try and use the iterated expectation theorem and the problematic step becomes different. Seeing from the comments, several people agree with my interpretation but clearly there is an ambiguity here that is part of the paradox.
Thanks for prompting me to add nuance to my comment.
There is no such thing in mathematics such as an unresolved dispute over whether or not a five line proof with elementary concepts is flawed or not. The only possible situations are: 1) the proof can be checked to be correct at the level of axioms, 2) an incorrect reasoning step can be pointed to or 3) the proof is ambiguous and/or people cannot agree on what is being proved.
There isn't really a mathematical literature about the two envelopes paradox because the paradox is not really interesting from a mathematical standpoint. Or at least, making it interesting from a mathematical standpoint would require presenting a different argument than the one presented in the Wikipedia article. There may be a scholarly debate about different philosophical or linguistic aspects of this paradox. However, there is certainly no debate about where the flaw is in the presented switching argument once you make it precise enough.
(And the answer should not involve infinite series unless you are looking at a different, strong-arm version of the argument.)
A better article would first introduce a more precise version of the switching argument and then precisely identify the flaw in it. The more advanced mathematical and philosophical discussion that explores variations of the basic argument should be separated and contextualized clearly.
Normally we would assume there is someone who owns the envelopes of money. Now their incentive could be to offer to switch only if the envelope you chose contains more money (so they have a chance of keeping more). More like Monty Hall.
Even without that, after switching, should you switch back? The equation given argues you should switch back, so obviously the equation must be wrong.
It is easier to think: if I switch I have a 50% chance of making $X and a 50% chance of losing $X. Switching doesn’t change expected $.
I actually think the later problem in the Wikipedia article is more clever:
Two people, equally rich, meet to compare the contents of their wallets. Each is ignorant of the contents of the two wallets. The game is as follows: whoever has the least money receives the contents of the wallet of the other (in the case where the amounts are equal, nothing happens). One of the two men can reason: "I have the amount A in my wallet. That's the maximum that I could lose. If I win (probability 0.5), the amount that I'll have in my possession at the end of the game will be more than 2A. Therefore the game is favourable to me." The other man can reason in exactly the same way. In fact, by symmetry, the game is fair. Where is the mistake in the reasoning of each man? — "Martin Gardner: Aha! Gotcha"But assuming a more surprise situation in which the game is suggested* the reasoning is pretty good for both if they're happy with a 50% chance at doubling their money + X. But I think maybe its the hidden prize that makes the logic work (or not work)? For one of them the prize is less then double their money (a prize they'd never win but still) so the deal isnt a good deal. Not sure how the math works for that, but a contest where you might win 2a or less then 2a is presumably a different reasoning.
*Where similar to the first point we should assume the suggesters wallet is empty.
Ah, that observation is very clever! Even if you let yourself be bamboozled by the logic for switching, there is no reason then not to switch again by using the same logic. And again.. and again!
Now what is the probability of each winning? Did adding that step actually change the problem?
Or reword the problem just like I did in my grandparent comment: call the amount in the larger wallet $X. If you lose then you lose $X, and if you win then you win $X. 50% chance and expected outcome $X/2 by playing.
Suppose the amount in the envelope you choose is $100. If your amount is the smaller one, the other one has $200. If your amount is the larger one, the other one has $50. So the expectation supporting the switching argument is computed over two different scenarios, where the amounts in the envelopes are {50, 100} and {100, 200} respectively.
This calculation seems to violate a hidden logical constraint: the set of amounts in the two envelopes must be the same no matter what conditional branches we consider for the expectation.
Another related issue - if you switch, the argument for switching back assumes the amount in your original envelope is 4x what you originally said it was.
If you wanted to, you could explicitly model all possible values of the envelopes, and all possible observations of A – and you'd get the right answer again, including in the case above. You just can't define A in a path-dependent way, and then treat it as having the same value in all paths.
The relative percentage "rule of thumb" doesn't even feel like a primitive in math. It seems wrong to reason from that.
this video explains the paradox properly, with a very reasonable explanation.
it doesn't really matter what the distribution of the amounts are, as long as there's an infinite number of possibilities in the distribution (ie., it's not a finite amount of possible envelopes).
For example if instead of halving the probability of each value as he does in the video we take 1/20 then we get the expected value as the sum of 9/20^2 - 9/20^2 + 90/20^3 - 9/20^3 + … Here the series is absolutely convergent since the positive terms sum to 9/10 and the negative terms sum to 9/10.
how would one prove that claim? it's not obvious to me. it seems like the specific conditions under which the series of terms in the total expectation has a well defined sum is important, but I didn't fully grasp those conditions
In programming terms, the switching argument (see original link) is incorrect because it does not typecheck. And it does not typecheck because variable A is used out of its scope when writing down the (5/4)*A expected value.
Indeed, variable A is tied to a specific random outcome and so it simply does not make sense to refer to it in an expected value ranging over this same outcome.
Trying to formalize the argument in a proof assistant makes the mistake clear and obvious. However, the ambiguity of the English language makes it possible for such typing errors to sneak in undetected.
But that's simply not true.
> variable A is tied to a specific random outcome and so it simply does not make sense to refer to it in an expected value ranging over this same outcome
No, it isn't. It is the value of the chosen envelope -- which is known. You can open the envelope and look inside.
> Trying to formalize the argument in a proof assistant makes the mistake clear and obvious.
Have you actually tried this?
Consider the following alternative scenario: I give you $20 and offer you the following wager: we will flip a fair coin. If it lands heads you lose $10, tails you win (an additional) $20. Would you take that wager? If so, how is that different from the envelope problem? (Note that the $20 grant is a no-op, all it does is serve to fix the amount of the payouts after the coin flip.)
I'm pretty sure this could be reduced to the secretary problem where there's a pool of 2 candidates, which yields an optimal hire with probability 50%.
Maybe you play word games and say, "I guess the other number is not higher," or "I guess the other number is not lower." Since the number you observed was produced once, there is some non-zero probability that it was produced twice, in which case the other number is neither nigher nor lower.
Here's a hint that is not a full solution. If you knew that the numbers in both envelopes were independently sampled from the same Gaussian (but not necessarily which Gaussian), then there is a simple strategy that wins more than 50% of the time: pick an envelope to peek at uniformly at random and guess that it is the larger one if and only if it shows a positive number.
Why does this work? If both numbers are positive, your strategy is equivalent to "pick a random envelope" and you're left with a uniformly random choice of envelope. If both numbers are negative, you're also left with a uniformly random choice of envelope. But if one is positive and the other is negative, you win 100% of the time.
What are the odds of the third case? Well every Gaussian has at least some mass on positive numbers and some mass on negative numbers. So there is some nonzero chance, even if you don't know what it is. So while the strategy might not always do better than a coin toss, some positive percent of the time you win every time. And so you get a distinct advantage over random guessing.
The problem is now how would one transfer such an approach to the original problem without the Gaussian assumption. Somehow the two problems are less different than they initially seem.
You pick an arbitrary threshold, if your envelope is below the threshold, you switch.
(You can add randomness as necessary.)
Choose a monotonically increasing function f with values between 0 and 1. Choose one of the envelopes at random. Then look at the number x in the envelope. Then, with probability f(x) say that you have the larger envelope.
A tangential question: real numbers are uncountably infinite. Are probability distributions over the real numbers likewise uncountably infinite, or do they form a higher infinity?
As for what uncountable cardinality they form, it's the same as the real numbers [0]. Roughly, a probability distribution is determined by the countable collection of real numbers P(X <= q) with q rational. That means the cardinality is no more than R^Q, which is isomorphic to R. (the cardinality is at least R due to, say, uniform distributions on [0, x] for x real).
[0] https://math.stackexchange.com/questions/3698864/why-does-th...
1. If the number you pick is positive, then there are technically (although arbitrarily small) more negative numbers that can be chosen for the other envelope. So you have a slightly larger than 50% chance of winning. 2. The inverse is true if you chose negative, however.
That said - I think this would generally imply you should always switch, which is why I'm not convinced I'm right. Consider a purely positive set, for example. If my number shows up as "12" - then I know there are infinitely more numbers larger than it, but only 11 numbers lower than it. But this starts to feel like the original two envelopes paradox.
--
tldr; I'm not sure of the answer, although I think if I saw the answer I would have an "Aha!" moment.
For whatever reason I can't get past my intuitive feeling that this problem is just a simple 50/50 and these proofs are just fancy window dressing.
"No proposed solution is widely accepted as definitive."
I mean for me this is totally a "cannot see the forest because of all the trees" situation and the intuitive solution is the right one.
But I thought the same of the monty hall problem (back in school) and only was convinved, after I wrote a small program to simulate it, which confirmed it.
But unlike in the monty hall problem, there is no new information here, when you are given the opportunity to switch. So the discussion seems weird to me.
Switching back and forth obviously doesn’t have any positive. What they mean by “is not definitive” is what explanation is the definitive one.
https://mindbowling.wordpress.com/2020/09/14/two-envelope-pa...
It all depends on how the envelopes are prepared.
That is, the probability is 1/2. That's all that matters to the decision making. Calculating an "expected value" at all is completely useless, whether or not you do it "correctly".
Am I missing something?
It just seems obvious to me that it's not the same situation. That is, I think the "paradox" is ultimately about the temptation to treat these as similar problems in the first place.
I'd be happy to take you up on that offer. Let's play some dice or card games that are set up such that you'll always have 9/10 probability of winning. You'll play, regardless of the expected value, right?
You play the following game (say for many rounds). Someone puts different values in two envelopes (they can pick the values arbitrarily, even maliciously, each round). You want to pick the higher valued envelope. You pick an envelope, they show you the value of the other. You can hold your value or you can switch.
It also works if the game is they show you your own value and you can choose to hold or switch. Actually, now that I think about it, you can even make the game such that you pick an envelope and tell them which envelope to show you, then you can hold or switch. More interesting :)
The questions is: is there a strategy where you get the higher value strictly more than 50% of the time?
The surprising answer is, yes, there is such a strategy. It's really neat, and I've tried to find other places to apply the reasoning, but have not found another interesting place.
And yes, this problem and strategy are mathematically correct, not cheating, not "out of the box" stuff.
Good luck :)
For envelopes with two different numbers n, m, the above is guaranteed to give you the higher one strictly more than 50% of the time.
For example, exp^{-x^2} with normalization factor is a simple choice.
Asking for a friend, I obviously fully comprehend what you're talking about here.
You cannot calculate the expected value (of the envelope you get, when you pick one randomly and then swap) like that, as A is not a constant and actually depends on if you took the less or more valuable envelope initially.
If you use A1=X in case you took the less valuable envelope initially and A2=2X in the other case, the expected value is (1/2)*(2*A1) + (1/2)*(A2/2) = 1.5X
and if you don't swap, you get: (1/2)*A1 + (1/2)*A2 = 1.5X
... which makes sense.
If you change the experiment so that the value of the second envelope does not depend on the first one (if you first chose and only then the value of the other envelope is randomly either double or half), A is constant and you actually should swap.
In point 2. the solution starts talking about probabilities without defining the sample space.
And this is why the solution is nonsensical. "One envelope contains twice as much as the other" does not define a sample space, so it is too early to start talking about probabilities.
If you say "the sample space is all pairs of natural numbers where one is twice as big as the other", then what are the probabilities assigned to each pair? They cannot be pairwise equal because the space is infinite.
So even if probabilities for (X, 2*X) and (X, X/2) happen to be equal for a particular X, they definitely cannot be equal for every X, so the "infinite swap" doesn't hold anymore.
https://en.wikipedia.org/wiki/Monty_Hall_problem
(except that problem has a more definite solution)
-> Keep -> 2A
2A -> Switch -> A
0.5 ->
A -> Keep -> A
-> Switch -> 2A
Switch and keep both have an expectation of 3A/2 because (1/2)2A + (1/2)A. In the equation in the article they use (1/2)2A + (1/2)*A/2. They count A/2 as half of what the actual outcome should be. The mistake was abusing the A to have different meanings.They created two trees one with 2A.
-> Keep -> 2A
2A -> Switch -> A
0.5 ->
A -> Keep -> A
-> Switch -> 2A
And another with 1/2A -> Keep -> A
A -> Switch -> 1/2A
0.5 ->
1/2A -> Keep -> 1/2A
-> Switch -> A
Than they treated the chance node as selecting from these two different trees at the same time with 1/2 probability. Which is nonsensical. You can't be in an entirely different game with 1/2 probability - it isn't the same game so for analysis purposes it has 0 probability of being reached.Some people are pointing at the error I mentioned above, but I think the problem is actually much deeper than that. Identifying this error is basically identifying the superficial reason for why they went wrong. It doesn't dig deep enough to systematically eliminate the error.
I want to point out something. Notice their logic when they call out why it is a paradox. You can switch multiple times and it would never terminate.
Mathematical formalism like markov decision processes and the bellman equations actually have the ability to capture this type of reasoning. They can even deal with infinite loops as happens here by including multiplication by a horizon term which makes the limit of the recursion equal to zero.
So the root problem is that, actually, the entire problem wasn't even using the right theoretical grounding.
To get really explicit on how it was not using the right grounding I want to point out the key error again, but stated a bit differently.
The author neglects information sets. He creates two game trees, discriminating on the basis of knowledge of which subgame he is in. This is a huge red flag. You can do that in perfect information games, but you can't in imperfect information games! You aren't playing over states in imperfect information games. You're playing over information sets.
You end up getting more insights into how this is wrong when you think about the problem in this way. For example, there might not be an error in this particular problem, but the choice to not express the action space as a probability vector is going to bite you in more complicated imperfect information decision problems.
So for every strategy selection except the one the article chooses, the EV is what I mentioned before. But for the last it is zero.
Its the same problem: they aren't walking the graph of the game tree. But its a bit different to my simplified version of the game that shows where there EV calculations went super wrong, because the actual game tree is of infinite length and there is /never/ a node with SWITCH that terminates in a reward, because every SWITCH recurses to another decision point.
You can solve it using various formalism by adding a discount factor. That lets the limit go to zero for the recursive cases. I guess technically its undefined since the game never ends, but I don't consider being stuck in a loop to be rational [1]. You really have to let your action probabilities vary as you solve imperfect information problems. It happens in MDP and MCCFR for a reason - you don't get the correct action without for the way your policy choice affects the outcome distribution. Your expectation is dependent on your policy it doesn't exist in a void.
That last statement, well, it should be very obvious in more complex situations. That it isn't obvious in this situation speaks to the problems deceptive simplicity.
[1]: Unlike people who think humans are irrational for having cognitive biases.
Well no, one doesn't contain one fourth of the other.
E.g. if the maximum volume of currency that could fit in an envelope is $10k, it would be possible to have a uniform prior between 0-10k, at which point I would stick if my envelope had $5.01k.
A more extreme prior could be one capped at the largest ever academic research grant (I bet it's not more than $100m).
It could also be that you have a prior that has infinite mean, in which case it is not surprising that you will always want to switch if you draw a specific value.
If you have risk aversion, this further increases the range that you would like to stick, since switching could decrease your expected utility, even if it increases your expected return. There is a separate paradox in decision theory that we should be approximately risk-neural for 'small' amounts.
There are two flaws. One is the omission of counterfactual reasoning. This produces the logical contradiction 2=1 at step 7, but you get there a bit earlier because the steps before it are where you do case based reasoning. The scenario where this happens is when you are in imperfect information contexts. You can reason about subgames in perfect information games without the subgames influencing each other. You can't reason about them in imperfect information games without the subgames influencing each other.
The lessons is this - you have to consider counterfactuals. To give a concrete example of someone doing this, think Jeff Bezos when he talks about how he decided to found Amazon. He says he considered the situation in which he founded it and failed and the situation where he founded it and succeeded and the situation where he didn't found it. He didn't get his expectation conditioned on one state, but over an information set that contained many counterfactual outcomes.
The second flaw is much deeper and is what leads to the paradox. The failure is that the entire framing fails to recognize that EV is a function of policy. You can see this by setting the policy to always switch, as they do, and noting that the actual EV for switch is now undefined. Therefore in claiming knowledge of EV without having policy as a higher order function of EV you get a contradiction. 3/2A=0 and/or 3/2A=undefined.
The lesson in this is that policy function influences EV. This should hopefully be obvious to most people in more complicated situations. For example, slamming your head into your table has a lower EV than enjoying a drink of water. You have to account for this whenever your policy choice isn't defined.
Below I did two runs with a million cases. One envelope has 1 unit; the other has 2 units. I shuffle the envelopes, and the "player" chooses an envelope. "noChange" means this is the payoff if the player doesn't switch envelopes. "yaChange" means this is the payoff if the player switches envelopes.
$ python3 ./twoEnvelopes_00.py 1000000 noChange = 1500023 yaChange = 1499977
$ python3 ./twoEnvelopes_00.py 1000000 noChange = 1499984 yaChange = 1500016
When modeling Monte Hall, the payoff for changing is obvious.
The Two Envelopes Problem: the most boring paradox in the world - https://news.ycombinator.com/item?id=6388645 - Sept 2013 (12 comments)
Two envelopes problem - https://news.ycombinator.com/item?id=6387044 - Sept 2013 (88 comments)
Two Envelopes Problem - https://news.ycombinator.com/item?id=1582219 - Aug 2010 (88 comments)
[edit] Now submitted: https://news.ycombinator.com/item?id=31568880
https://www.youtube.com/watch?v=0yjVv_iB1h0 (Interestingly, a lot of those DoND comments have gone. Did they delete them?)
let M be the maximum amount of money that a envelope can contain (at worst it can be the total amount of money in the world). You don't know the value of this upper bound M.
Most of the time, you get 2*x or x/2 with 50% chance if you choose the other envelope (which on average is a win)
But when x=M you get M/2 instead of M and therefore you loose M/2 with 100% chance. And when it happens you have lost much more than in the other cases (because exponentiel...)
If you do the math, you can see that what you win for 1 2 4 8 16 ... M/2 is equal to what you loose for M.
And so on average what win from switching is 0.
(The usual term is sample space; it's just more fun to split and eliminate universes than states.)
Three friends go out for dinner and decide they will split the bill threeways. The bill comes to $25. Each friend gives a $10 note with $30 pooled together to pay the bill. The waitress returns with five $1 bills in change. They leave a $3 tip for the waitress with $2 in change remaining.
The question is: Of the original $30 paid if we deduct $3 in tips paid, we get $27. Adding the $2 in change remaining we get $29. Where is the other $1?
At the end I constructed a super weird example where regardless of what you see in your envelope, you should switch (this seems to go against the symmetry argument, but is sort of saved by a divergence in the expectation value).
"Having chosen... you are given the chance to switch"
Nowhere does it say, you'll be offered the switch no matter which envelope you choose.
Same idea applies, to the very similar Monty Hall problem.
Then whatever trick is being played you still have a 50-50 chance.
Let's represent the poorer envelope by the value 0.5 and the more bountiful one by 1.0.
The expected value from the envelope draw is 0.75: 0.5 drawn with a 50% probability contributing 0.25 to the expected value, and 1.0 drawn with a 50% probability contributing another 0.5 to the expected value for a total of 0.75.
If you were to do a large number N of these draws, the value you will obtain will be from a distribution that is centered on 0.75 N. So far so good?
So the way to look at a draw is this: you're going to be getting the expected/average value of 0.75, together with either a 0.25 bonus if you pick the better envelope, or a else -0.25 penalty if you pick the poorer envelope.
So you see, those two situations are equal and opposite. By switching, you either turn a 0.25 bonus into a -0.25 penalty (- 0.5) or vice versa (+ 0.5) with equal probability.
If you need any more complex analysis than this, you need to be thwacked on the head.
The rhetoric about doubling versus halving the money is a distracting red herring. If you switch from the 1.0 envelope to the 0.5 envelope, you're down 0.5, and if you switch the other way, you're up 0.5. That's it.
Accounting is based on debits credits not halving and doubling. You would never update a ledger by crediting double some amount to one account, and debiting half the amount from another account. It's all purely additive.
You have to look at what you're potentially gaining or losing on its own not as a fraction of some guaranteed fixed portion that you're getting from either envelope.
If the envelopes contain, say, $50 and $100, it looks like a doubling/halving. But nothing materially changes if we add $1000 to each one to make $1050 and $1100. The probabilities don't depend on what is in the envelopes, and the win/loss is just a spread of the difference between their values.
Why would anyone, while solving some problem, worry about some unspecified more complicated situation which supposedly resembles that problem?
Give me the specific of that more complicated problem and I will knock it out of the ballpark using whatever reasoning fits that problem.
OK, but let's look at it:
1. Denote by A the amount in the player's selected envelope.
2. The probability that A is the smaller amount is 1/2, and that it is the larger amount is also 1/2.
3. The other envelope may contain either 2A or A/2.
OK, here is where this argument got seduced by the multiplicative thinking. The correct reasoning is: let's call the smaller base amount A and the larger one 2A. One envelope contains A, the other one 2A. That's it.
3. If A is the smaller amount, then the other envelope contains 2A.
4. If A is the larger amount, then the other envelope contains A/2.
Here, the argument is splitting into cases because of the IF, and in these two cases, A has a different meaning.
5. Thus the other envelope contains 2A with probability 1/2 and A/2 with probability 1/2.
6. So the expected value of the money in the other envelope is:
This is wonky. The overall two-envelope situation has an expected value, not the individual envelope.
The correct view is that if this is the richer envelope, it contains X more money. If it is the less endowed one, then it contains X less.
1 1 5
- 2A + - (A/2) = - A
2 2 4
7. This is greater than A so, on average, the person reasons that they stand to gain by swapping.That calculation is wrong though, by itself. That issue should be attacked directly.
Separate calculations have to be performed for the two cases: A is the smaller amount and A is the bigger amount. For each of these cases, the expected value from both envelopes has to be calculated.
The way the above formula is doing the expected value calculation is off because it's equivocating on A.
It ends up working with two unrelated quantities: 2A and A/2. 2A is four times bigger than A/2. A is simultaneously denoting the smaller amount and the larger one.
8. After the switch, denote that content by B and reason in exactly the same manner as above.
Yes, and if you do, you will end up with 5/4B. So that can't be right and the whole remaining argument about infinite switching being irrational compared to just opening an envelope is superfluous.
1. We have A; the other envelope has 2A; or else
2. We have 2A; and the other envelope has A.
In case 1, if we switch we gain A.
In case 2, if we switch, we lose A.
We have no idea which case we are in.
We cannot use the variable A to denote our initially selected envelope in both cases, because then A simultaneously represents the smaller amount and the larger amount, and we are absurdly mixing the quantities A/2 and 2A in the same calculation. No quantities in the actual problem are related by a factor of four!
People might be seduced into the A equivocation perhaps because they are initially thinking of A as being a label for the envelope, which is arbitrary and innocent enough. We have some envelope A and it has some money in it. Oh, but the other envelope then has either A/2 or 2A. At that point, A is no longer an envelope name, but a name for an amount. Then it has to pin down a specific number: it has to denote either the smaller value, or the larger one, and that value is found in different envelopes in the different cases; A cannot both be "name of initially chosen envelope" and "amount in that envelope".
let's imagine the first envelope contained between 1 andand 1000 dollars, the second double the first.
if you open your envelope and it contains a whole number of dollars between 1 and 1000, then you should swap, id take "250 or 750" over 500.
> Pigeons repeatedly exposed to the problem show that they rapidly learn to always switch, unlike humans.
Or to put it another way how many people would stick with their chosen door if instead of opening a door and showing a goat they were simply asked "would you like to stick with your current choice of door, or switch and take the best result from the other doors?"
That is, effectively, what the choice boils down to. But that being said, since the problem is stated as only getting to pick one "other" door, the "extra information" received is knowing which of the other 2 doors has the best result.
you make your guess Me: Ok, I will reveal that the number is either $YOUR_GUESS or 452,871. You may keep your original guess or switch to 452,871.
Of course, you would switch, because the chances you guessed correctly originally were 1 in a million.
2/3rds of the time, your initial choice will be a goat. In those cases the host deliberately avoids opening the remaining door with a car - thereby telling you where it is.
If you chose the car door initially, then indeed you get no new information. But that only happens 1/3rd of the time.
I am curious if that changes your opinion.
It's true that we can add other options (pick both doors) of equal likelihood, but it's because of our increased information that the reduced option of picking just one door isn't actually worse off.
This problem is completely different, since the number of degrees of freedom remains fixed throughout the decision process. As someone else pointed out, it is trivially resolvable by realizing that no matter how many times you switch envelopes, you're really only making one choice, and doing so with 50-50 odds of picking the more profitable envelope. The offer to switch amounts to meaningless magician's patter, whether the offer is made once or a million times.
Personally, I'm not sure that it would be easier to convince someone that the second formulation is equivalent to the original problem, but next time I find a dis-believer I will give it a shot!
I have a deck of a billion cards, one entitles you to the car, the others have a picture of a goat. You pick one at random but do not get to see it.
Of the remaining 999,999,999 cards, I discard 999,999,998 goats.
Do you want your initial card, or the remaining card in my deck?
Or to frame it another way, do you want the car iff you picked it first or iff you did not pick it first?
The way they put it, the strategy becomes obvious if you instead reformulate the problem like so: there are three doors with three different prizes. You get to pick one door, but are then given a choice: stick with your original choice, or choose to get the best prize from the other two doors.
The solution (switch!) is more obvious in the second formulation. I have no idea if it's easier to convince someone else of the reasoning in the first formulation, or to convince them that the second formulation is equivalent to the original.
You can lose money and that has to be reflected in the potential value of each envelope.
After the first selection, you must express the envelope value as the potential of what each envelope holds (the probabilities from the initial selection) which makes selecting again a wash.
Let A = 50 Envelope 1 is 100 Envelope 2 is 25
First selection 1/2(100) + 1/2(25) = 62.5
Great! Do it! 62.5 is bigger than 0, which is the expected value of not playing at all.
After that, it makes no difference to switch (the envelope value is recursive):
1/2(62.5) + 1/2(62.5) = 62.5
or
1/2(1/2(2A) + 1/2(A/2)) + 1/2(1/2(2A) + 1/2(A/2)) = 1/2(2A) + 1/2(A/2) = 5/4A
and the trick is that’s now the potential expected value you have (you now have 5/4A in your envelope), so switching is a wash. You never really “had” A as a value to compare against (by evaluating that 5/4A is bigger than A), we just get tripped up with the doubling and halving at the outset.
Said another way, the fact that 5/4A is bigger than A is irrelevant, no envelope contains A, they both contain the expected value of 5/4A.
No. The problem specifies that E1 is twice E2, but here you have E1 = 4 x E2.
A is the amount in one of the envelopes, so if A=50 then either E1 is 50 or E2 is 50, and the other E is 25 or 100. But under no circumstances can E1=100 and E2=25 at the same time.
The value of the other envelope must include the probability that it is the original A (not some sleight of hand new A’ that, itself, is based on an expected value).
Yes, that's right. That's exactly what I said: "A is the amount in one of the envelopes, so if A=50 then either E1 is 50 or E2 is 50, and the other E is 25 or 100. But under no circumstances can E1=100 and E2=25 at the same time."
I also don't think changing the problem to an analogous one is as helpful as this direct and simple solution. Using 100 doors could mean multiple things. Maybe it means at the next stage you have 99 doors left. Maybe it means at the next stage you have 2 doors left. Why should I think either is the correct analog? You can just see the simple answer I've stated and be done with it.
Probability of choosing the correct door at time of choice:
Two Envelopes: 1/2 -> 1/2
Monty Hall: 1/3 -> 1/2
...because Monty opens one of the doors, providing information.
What? I can literally take 2 envelopes right now - physical envelopes - and I can literally put $10 in one envelope and $20 in the other envelope. Then I can shuffle the envelopes and hand one of them to you. Now the other envelope has equal probability of having half or double the amount of money as the first. How is this premise contradictory in your opinion? I can physically arrange objects in this fashion, so where's the contradiction?
As soon as you assign a well-formed probability distribution to the money in the envelopes you will find that opening the first envelope is informative.
Here's a quote from Wikipedia: "Having chosen an envelope at will, but before inspecting it, you are given the chance to switch envelopes. Should you switch?" Note the part that says "before inspecting it". That means you can't open it.
However, I now have two random integers with no bits of information about either, where I have now removed information from the system (the relationship between the number of envelopes and the contents of one being twice the other), while leaving the states of the system intact.
The envelope I in effect already have yields no bits of information because I didn't choose it, it is just the random (no information) one I start with, whereas the fact of the existence of the second envelope contains more information than my current envelope selection, and I have a decision to make about whether to switch.
The null state of the system is me holding an envelope with no information, and addition of a second envelope is a new state of possibilities, where the information in this two envelope system is now non-zero.
The decision with the most information is to switch. This additional information is independent of the implied desire for (A|2A), whereas the original problem is defined as the best possible decision is the one with the most information.
Further, if I perform some operation with those two random integers (Za and Zb), the result has less "entropy" than the two random inputs in isolation, as by correlating them via a function I have produced some non-zero negentropy between them, say using xor, which is how I added information back into the system after removing it using the random numbers.
I get this new number N composed of my two random numbers ( N = xor(Za, Zb) ), and I need to apply it to my choice of, not which envelope to select first (A|B) - but whether I should switch. The only way to get this number with information in it is to have assigned a random number to both envelopes and used the two bits of negative information to cancel each other - and therefore the only choice with non-zero information is the one which includes both envelopes - hence the decision to switch is the only one that yields the non-zero information outcome.
Again, intuitively it seems related to how multiplying two negative integers yields a positive one, multiplying two entropy (negative information) sources yields negentropy (positive information). That could further imply that the information in the decision to switch is also based on whether the number of envelopes is even or odd, or maybe prime or composite? Sounding this out, it may also be related to graphs where the number of nodes/edges (where edges represent switching decisions and nodes envelopes) either forms a closed path or open one, and in the case of an even number of envelopes you get the max information by swtiching n-times, and in the case of odd ones, you switch n+1 times.
Short version is, the choice with the highest number of bits of information in the two envelope case is to switch because it is predicated on there being more envelopes than the one you have started with.
The game defines a graph and your path through that graph is going to lead to an outcome. You have a strategy, a choice of how to move through the graph. However, you have no information about where you are in the graph. So when we think about how we move through the graph, we must always think the same way. We can never think differently, because no action changes the information we have about where we are. However, the terminal case is defined thusly. R(STAY) = {50%: 2A, 50% A}. There is never a reward for R(SWITCH). Anyone telling you to always choose switch when that is the only solution that can never have a reward is obviously wrong.
But why? Why were they wrong?
Simple. In imperfect information games things work differently than in perfect information games. In chess when you make a move it is that move. If you make a move it is a different move. The subgames are independent of each other. In poker, it isn't so! If you make a bet in Poker, you don't know what subgame you are in. You have to play as if you're in multiple at the same time.
Now look at the fast con that seems to be tripping people up. They are pretending we have perfect information. 2A, A/2? Phaw. We can't have that, because that supposes we know which subgame we are in, but we can't know which subgame we are in, because we were never given that information. Even if we were - it doesn't matter. We're in an imperfect information game! The places we didn't explore are relevant to our calculation! We can't ignore them! But we did, by insisting on an inequality which didn't hold.
This is probably counterintuitive. Its trivial, but people argue about it. So lets talk about this more concretely.
This is what they pulled on you. They claimed that these two different game trees could be treated as the same game tree:
-> Keep -> 2A
2A -> Switch -> A
0.5 ->
A -> Keep -> A
-> Switch -> 2A
-> Keep -> A
A -> Switch -> A/2
0.5 ->
A/2 -> Keep -> A/2
-> Switch -> A
Two different game trees! Two different game trees and they acted like they were the same. But they aren't! They can't be! You can't tell which subgame you are in you have to treat them as equal in imperfect information games! So what is our actual situation with their reasoning? Our actual situation is a contradiction. Since subgames depends on each other when they do this combination they are secretly speaking nonsense. Look closely: They are claiming that 2A=A; that A=A/2. They have to be, because in imperfect information games we have to be in every subgame at once, but they made two different games, but then they combined them. Since the correct formulation has to have every solution treated as the same, but they took something from a different subgame, they declared that two subgames were equal, but they weren't.It is so trivial. That's why the correct calculation looks like only an expectation on one game tree. That's why it seems to make sense - your brain knows this sort of reasoning can be appropriate with perfect information. I realize a lot of people have argued about this, but frankly they should stop.
And if you're interested in exploring why you have to treat subgames as different in imperfect information, why you have to operate on information sets rather than state spaces in imperfect information, here is a great talk on the NIPS 2017 Best Paper award which happens to touch on the subject:
https://www.youtube.com/watch?v=tRiaGahlyy4
It is about solving poker, which is a much more complicated imperfect information game. But even the simple imperfect information games have this property.
> having chosen an envelope at will, but before inspecting it, you are given the chance to switch envelopes. Should you switch?
> because the person stands to gain twice as much money if they switch, while the only risk is halving what they currently have, a case can be made for switching the envelope
I dig this, but it seems like an unavoidable nonsense pattern that congeals in pools of otherwise practically useful logic / language systems.
Like Neo in the Matrix. Remember the Architect? That guy was cool.
Unless the imaginary “giver” shows you what was in the other imaginary envelope you’ll never know. We don’t even know if this imaginary person is telling the truth. How do you know that “One contains twice as much as the other?”
I have never been offered a choice of cash containing envelopes in my life – maybe because I have never worked in a job where bribes could be usefully employed.
The whole “problem” is about as worthwhile a subject of contemplation as, say, “Do flying pigs taste more like partridge than earth-bound pigs?”
Does anyone know of a paradox that works/exists in the real world? I mean something a bit more substantial than whether some random dude claims to be a liar and you supposedly bother to wonder whether or not he’s telling the truth.
But for what it's worth, there are a ton of thought experiments inspired by or lifted from the real world. The Monty hall problem is taken from a game show - it even has a contestant who must choose one of three doors...
What’s the problem with Monty Hall? The solution (switch to the other door) is demonstrably true. I believe it’s called a veridical paradox.