Live data from Hacker News

Two envelopes problem

en.wikipedia.org

81–90 of 96 posts

Re: Two envelopes problem

#81
post #78
post #65

Earlier quoted context omitted.

The problem here is that you are adding together two values for a specific case of x and then adding together the result for all values of x (is that clear? probably not). It's analogous to another age old problem: what is the value of 1 + (-1) + 1 + (-1) + 1 + (-1) ... You could argue that (1 + -1) + (1 + -1) ... = 0 + 0 ... = 0. You could also argue that 1 + (-1 + 1) + (-1 + 1) = 1 + 0 ... = 1. There are actually w…

In my original version of the post I had intended to argue for a geometric mean, which was sort of a joke, as it only works where f(x) is a constant k*x. So the statement "A false resolution follows, first to spot the problem..." appears in the post. Upon seeing this an enterprising and intelligent person may have clicked "reply" While writing this I realized that inverting the definition of A gave a different resolu…

Goddamn, what does it take to get a cookie around here? :D

Re: Two envelopes problem

#82

All the probability math therein, for a problem whose solution is highly intuitive (if you swap, you'd be just as inclined to swap envelopes indefinitely, is all you need to realize), reminds me of this quote: "The intuitive mind is a sacred gift and the rational mind is a faithful servant. We have created a society that honors the servant and has forgotten the gift." - Albert Einstein Shameless plug for a blog I lik…

Terence Tao has some interesting writing on the interplay between rigour and intuition:

http://terrytao.wordpress.com/career-advice/there%E2%80%99s-...

Nevertheless, this problem is interesting because people tend to trip up on the maths. The actual behaviour, even in simulation, is very unintuitive (the mean gain from swapping envelopes does not converge to zero over time, and in fact does not converge to anything at all but oscillates wildly). It's a good introduction to the subtleties of probability theory in non-finite spaces.

Re: Two envelopes problem

#83
post #34

Earlier quoted context omitted.

Once you have the second envelope in hand, since you don't actually know what's in it, the exact same expected-value argument applies to switching back: there might be $10 or $40 in the other (first) envelope, "so it's in your interest to swap since the benefits outweigh the risk". While the second swap would reverse any advantage possibly gained, it would also reverse any possible harm sustained You dont know. The s…

Env A has $20 (we have it and know). Env B has $10 or $40 (equal chance). We swap. Now we hold Env B, which has $10 or $40 in it. We know the other envelope (Env A) is $20. Why would we switch again?

The original statement of the problem says you're offered the choice before you open the envelope. I guess I was sloppy about the $20 assumption too. As for the case you do know, I still feel wrong about the conclusion that you should switch, but I can't formalize it.

Re: Two envelopes problem

#85
post #58

Earlier quoted context omitted.

Go ahead and run a few million simulations of the problem and graph the running mean over time. You might be surprised :) Be sure to use exact arithmetic (eg http://docs.python.org/2/library/fractions.html )

https://gist.github.com/tedtieken/6567112 Run the simulator and you'll see, the ev is 3x/2, regardless of switching behavior. Feel free to modify if you think I've innacurrately conceptualizer the problem. Also, please excuse some non pythonic names, I'm writing the code on an iPhone.

Sorry, I should have been more specific :S

You have assumed a fixed amount in each envelope. The article leaves the amount unspecified but implicitly assumes that there is no maximum amount that could be in the envelope. The problem only becomes interesting for certain distributions.

Try this code:

https://gist.github.com/jamii/6567205

If you run it with the uniform distribution the running mean will eventually converge to 0. If you comment that out and uncomment the exponential distribution it is much more interesting :)

With the exponential distribution the expected value of switching does not even exist.

EDIT Doh, the original gist was totally wrong. That'll teach me to argue on the internet at 3am. The updated gist is correct.

Re: Two envelopes problem

#86
post #85

Earlier quoted context omitted.

https://gist.github.com/tedtieken/6567112 Run the simulator and you'll see, the ev is 3x/2, regardless of switching behavior. Feel free to modify if you think I've innacurrately conceptualizer the problem. Also, please excuse some non pythonic names, I'm writing the code on an iPhone.

Sorry, I should have been more specific :S You have assumed a fixed amount in each envelope. The article leaves the amount unspecified but implicitly assumes that there is no maximum amount that could be in the envelope. The problem only becomes interesting for certain distributions. Try this code: https://gist.github.com/jamii/6567205 If you run it with the uniform distribution the running mean will eventually conve…

Fixed amount vs variable amount is irrelevant, variable amount just requires higher n.

Either way, the gain from switching approaches zero as n approaches infinity.

Re: Two envelopes problem

#87

Here's my contribution: ----------------- Approach 1: Absent new information, we cannot improve our outcomes. In the montey hall problem there is either obscure new information, or a obscure change in the rules between firs choice and second choice. Montey hall collapses to an initial choice of the prize behind door A or the prizes behind both door B and C. When the true, collapsed, choice is revealed the common sens…

Approach 1: There is in fact new information when you look into the envelope it's also very valuable because it allows you make judgement taking into account your knowledge about the world and specific situation (who puts money in the envelopes, what are general preferences of people in such situations etc.). Approach 2: You made the same mistake. Seeing the money is actually valuable and very real information. The p…

If the new information is relevant, how is this simulation code wrong? https://gist.github.com/tedtieken/6567112

Re: Two envelopes problem

#88
post #8

That is a very long article based on flawed argument. Given no other information, assuming someone gave you 2 envelopes and told you one has $40 vs $20, common sense dictates choose 1 randomly and walk away - with no other information it is illogical to reason any other way. The chance you choose the lower value is 1/2. Now, if you are allowed to look inside the envelope (which gets introduced further down) then it b…

Yes, it's not a paradox it's just seductive flawed reasoning. Yes, at any point EV of picking an envelope at random is 3/4n (n being higher amount of money out of the two). It is all there is to it. The "paradox" is introduced by silent assumption that distribution of amounts put in envelopes is uniform which is impossible (because you can't pick numbers from infite set uniformly even if there was infinite amount of…

Code that shows ev stays at 3x/2 (if x is the lower amount) or 3n/4 (if n is the higher amount)

https://gist.github.com/tedtieken/6567112

Re: Two envelopes problem

#89

If it is possible to switch and gain on the average we could write a 10,000 or so iteration monte-carlo simulation of this switching algorithm to demonstrate the gains. The envelope has either x or 2x. One envelope has amount z, but the agent doesn't know if z = x or z = 2x. If it is true that not switching leads to an EV of 3x/2 but switching leads to a higher EV: then a single switch each round should come back wit…

Err, that last ratio was supposed to be 3x/2 again

Re: Two envelopes problem

#90
post #85

Earlier quoted context omitted.

Sorry, I should have been more specific :S You have assumed a fixed amount in each envelope. The article leaves the amount unspecified but implicitly assumes that there is no maximum amount that could be in the envelope. The problem only becomes interesting for certain distributions. Try this code: https://gist.github.com/jamii/6567205 If you run it with the uniform distribution the running mean will eventually conve…

Fixed amount vs variable amount is irrelevant, variable amount just requires higher n. Either way, the gain from switching approaches zero as n approaches infinity.

It does make a difference but I messed up the code :S

If you try the updated gist you will find that the second distribution appears to converge for a while but always jumps away again. I've run it now for 20540000 rounds and its further away than it started.

Post reply on HN