TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Two Envelopes Problem

112 点作者 atomon将近 15 年前

29 条评论

yanowitz将近 15 年前
Isn't the expected value of both envelopes, prior to picking either, 0.5 * X, where X is the sum of the envelopes' value?<p>So one way to argue this is a fallacious problem is that you can't take an unknown (the actual value of the envelope that you picked) and pretend it's a known. The value of the envelope you are holding, prior to opening it, is 0.5 * X. The value of the other envelope is also (0.5 * (.66 * X)) + (0.5 * (.33 * X)) == 0.5 * X.<p>This may be too ill-expressed -- but there's something wrong with treating the value of an unopened envelope as anything other than completely probabilistic.<p>Put differently, don't you have to say<p>0.5 chance I picked the bigger envelope (call that A). In which case, the other envelope is 1/2A. So if I switch, I lose 1/2A.<p>0.5 chance I picked the smaller envelope (A/2). So if I switch, I gain 1/2A.<p>Which means if I switch, half the time, I gain 1/2A and half the time I lose 1/2A, for an expected gain of 0 from switching.
评论 #1582581 未加载
评论 #1584057 未加载
评论 #1582789 未加载
评论 #1582968 未加载
评论 #1582633 未加载
评论 #1584692 未加载
评论 #1582783 未加载
评论 #1582666 未加载
Dove将近 15 年前
The wiki page doesn't explain the flaw in the logic. I think it is this:<p>Let X denote the value of the larger envelope, and A the value of the envelope we have in hand.<p>If we have the larger envelope, the other envelope is worth A/2 (where A=X).<p>If we have the smaller envelope, the other envelope is worth 2A'. (where A'=X/2)<p>So far so good, and this is all legal. The error comes when we try to add:<p>(0.5 A) + (0.5 A'/2) /= 5/4 A<p>The A's are not the same. You can't add them as if they were.
评论 #1582707 未加载
评论 #1582920 未加载
评论 #1582727 未加载
omaranto将近 15 年前
I like Raymond Smullyan's version even better, it removes all probability issues and is so simple you feel it must be easy to figure out.<p>The setup is the same: two envelopes, once with twice as much money as the other, you pick one and before you open you are offered to switch. If you do switch you might either win money or lose money relative to what was in the envelope you chose first. Let's compare the possible gain to the possible loss (without worrying about the probability of having a gain or a loss):<p>1. The possible gain is equal to the possible loss.<p>Proof: The two envelopes contain x and 2x, so you'd gain x if switching from x to 2x, and you'd lose x if switching from 2x to x. The possible gain and the possible loss are both equal to x.<p>2. The possible win is larger than the possible loss.<p>Proof: Say the envelope you chose first has y. Then the other envelope has either y/2 or 2y. So if you gain money by switching you gain 2y - y = y, but if you lose in the switch, you lose y - y/2 = y/2. Clearly y &#62; y/2.<p>This version kept up at night for days when I first read it. I never figured it out --not that I had any chance of doing so, given that Smullyan couldn't figure it out either--, I just got used to not understanding it...
评论 #1582935 未加载
评论 #1583634 未加载
robinhouston将近 15 年前
That Wikipedia article is really bad. Here is a good article about the Two Envelopes Paradox, by Keith Devlin: <a href="http://www.maa.org/devlin/devlin_0708_04.html" rel="nofollow">http://www.maa.org/devlin/devlin_0708_04.html</a>
te_platt将近 15 年前
While not exactly the same problem this is what cleared it up for me:<p>First pick a positive integer at random. Now pick a second integer at random. What is the probability that the second number is larger? The answer seems to be 1 because after the first number is chosen there are finitely many numbers smaller but infinitely many larger. But what if two people (A and B) choose two positive integers at random but don't tell anyone just yet. What is the probability that A&#62;B? By symmetry we can see it should be 0.5 . So A tells his number. Now the probability that A&#62;B seems to jump to 0 because there are finitely many numbers smaller than A but infinitely many larger. But why should the probability change when we don't even know what A is, just that it known?<p>The problem lies with the phrase "choose a positive integer at random". However you choose the number you will be hopelessly biased toward 0 because every number you choose will be finite. Now think about the envelope problem but add the condition that the largest amount that any envelope will have is X. Then if your envelope has N in it there is a chance that 2N is larger than X. That cut's down on the chance that switching gets you more. Magically (because I'm too lazy to actually write it all out) it turns out it cuts it down just so the probability of getting more money by switching works out to .5
评论 #1583601 未加载
评论 #1583138 未加载
btilly将近 15 年前
First a random observation. People use "expected value" to evaluate risky decisions far too often. In many investment situations a more appropriate measure is "expected value of the log of my worth". (See <a href="http://elem.com/~btilly/kelly-criterion/" rel="nofollow">http://elem.com/~btilly/kelly-criterion/</a> for an explanation of why.) That measure, in this problem, says that you should be indifferent about switching.<p>Admittedly that is coincidence - the investment reasoning for that rule has little to do with why that rule works for this problem.<p>But it turns out that there is an even crazier twist to this problem. Change the problem to say that you're allowed to look at the envelope you receive before deciding whether to switch.<p>Would you believe that there is an algorithm for deciding whether to switch that results in your getting the larger envelope more than 50% of the time? The catch is that those odds depend on the unknown amounts in the envelopes. But, no matter what is in the envelopes, you are guaranteed to get the larger one more than 50% of the time.<p>See <a href="http://www.perlmonks.org/?node_id=39366" rel="nofollow">http://www.perlmonks.org/?node_id=39366</a> for an explanation. Read it very carefully, because the problem is very subtle. Even a slight change in what is meant tends to render the problem ill defined and indeterminate. (And our intuition is very bad.)
评论 #1582554 未加载
jwegan将近 15 年前
I think the problem is they effectively change a problem from having 2 possibilities (either you get $X or you get 2 * $X) to a problem that has 3 possibilities: A/2 (1 possible amount in the other envelope), A (the amount in your envelope), and 2A (the other possible amount in the other envelope) by fixing A relative to the hypothetical amount you could have in your envelope.
评论 #1582548 未加载
trominos将近 15 年前
The flaw in the argument for switching comes in its second line:<p>"1. I denote by A the amount in my selected envelope.<p><i>2. The probability that A is the smaller amount is 1/2, and that it is the larger amount is also 1/2.</i>"<p>If we're gonna be taking expected values we need to assume that the monetary amounts in the two envelopes are generated from a probability distribution on the nonnegative reals. Then the probability distribution for the amount of money in the smaller envelope is going to be some kind of curve (call it S), and obviously the probability distribution for the amount of money in the bigger envelope is going to be the same curve only "stretched out" and "squashed" by a factor of two (we'll call it B).<p>Now if you say "my envelope contains exactly A dollars," you can tell what the probability is that your envelope is the smaller envelope by comparing the relative heights of the two curves at the value A; let's denote these heights by S(A) and B(A). It is certainly <i>possible</i> that the two heights are the same, in which case it's fifty-fifty that you have the bigger or smaller envelope, the rest of the logic holds, and you should indeed switch, getting an expected return of 5/4 * A.<p>But it is obviously impossible that <i>in general</i> the two heights are the same for any given A, because then the two probability distributions are the same -- and that can't be true, because B is a squashed, stretched-out version of S, and for a variety of fairly obvious reasons you can't squash and stretch out a finite curve on the positive reals and get the same curve (unless that curve is 0 everywhere). And so we can't conclude that <i>in general</i> you should switch, which is good because if you're not allowed to look at the money before you switch it obviously doesn't matter whether you do or not (unless the people running the game are messing with you).
mirkules将近 15 年前
There's a similar problem with three closed doors, one of which contains a prize behind it. You are asked to choose a door, and then shown one of the two remaining doors which does NOT contain the prize. The question is should you switch doors, given the opportunity? What is the probability that of getting the prize if you switch, and if you don't switch?<p>To illustrate, let A, B, C be doors, and door C be the door with the prize. You choose door A; the host tells you the prize is not in door B. What is the probability you will get the prize if you switch your door?
评论 #1582852 未加载
评论 #1583187 未加载
CJefferson将近 15 年前
The problem with this is very subtle.<p>The problem is saying that it is equally likely that the other envelope contains half, or double, the money of the envelope we have chosen.<p>It is impossible to choose a value from an infinite series (the list of possible monies), with every value having an equal opportunity of being chosen.<p>Therefore the probability of money distribution must be non-even in some way, and the argument falls to pieces.<p>It is not reasonable to say "Well, I don't know the probability, so I'll treat it as 50/50".
评论 #1582636 未加载
评论 #1582855 未加载
jatenate将近 15 年前
The swapping indefinitely does not work. For the first iteration, if I have A in my envelope, then yes, the other envelope will either have 1/2A or 2A, meaning the expected value is indeed 5/4A. The switching argument wrongly assumes this is again the case after I switch. After I have switched, the value of the original envelope is unchanged (meaning it is A with probability 1), so I should not switch back.
评论 #1582678 未加载
Ramfjord将近 15 年前
I believe there's some problem with assuming that, given an envelope containing X dollars, that the other envelope has a 50% chance of containing 2x, and a 50% chance of containing X/2. This step is clearly what leads us into the paradox.<p>Suppose you open the first envelope, and find $100, and are given the option to switch. If there is a 50/50 chance of the other envelope containing 200/50, we could easily model this problem a million times and find that it averages to 125.<p>The problem here is that the numbers have not been pre-determined in the start. If a naive player repeatedly played a game where the numbers are guaranteed to be 100 and 200, then the always switching strategy would be exactly the same as the always staying strategy.<p>In this case, let the difference between the two envelopes be x. When you switch, you have a 50% chance of losing x and a 50% chance of gaining x. There is really no problem if you define the two envelopes as differing by a fixed number, rather than one being a multiple of the other. When the two numbers have fixed, predetermined values, the two problems are the same.
aliston将近 15 年前
Interesting... here's my "gut reaction" as a non-statistician. The problem is that 'A' has a probabilistic component as well. If you let X be the "lesser of the 2 dollar amounts" and let A = X/2 + 2X, then you come out with equal expected values for switching and non-switching.
praptak将近 15 年前
I believe the root of the paradox is that there exists no distribution of two variables A,B for which:<p>a) (A,B) always fulfills A=2<i>B or A=0.5</i>B and b) For any value of A, the conditional probability of B=2<i>A is equal to the conditional probability of B=0.5</i>A.
mitko将近 15 年前
A friend of mine told me a similar problem that he got at D.E. Shaw interview.<p>Person A writes random real numbers in two envelopes. Then person B randomly 50/50 picks one envelope and sees the number X written there. Then, B has to guess whether X is the bigger of the two numbers or not. Show that B has a strategy, that even if A knows it, B can guess correctly in more than 50% of the cases.<p>The mathematical beauty of this problem is that you can derive what are the non-trivial steps towards the solution.
mitko将近 15 年前
For me, what is interesting in that problem (besides the obvious flaw that people here discussed) is that the answer changes is the value A is observed. I.e. :<p>If I have two envelopes, one of which has twice the money of the other, you pick an envelope AND YOU SEE the money inside, then it becomes better to switch (in expected money).
techiferous将近 15 年前
I found this paradox so compelling that I blogged about it a while ago. I tried to tease out the "intuitive" explanation without resorting to much statistics. <a href="http://techiferous.com/2010/06/the-two-envelope-paradox/" rel="nofollow">http://techiferous.com/2010/06/the-two-envelope-paradox/</a>
DannoHung将近 15 年前
Because you're negating a random choice and it's not like Monty Hall where a bad choice is removed for you.
评论 #1582849 未加载
uio将近 15 年前
You denote with A two different things, and this is not correct. Suppose you have a bag with two animals a dog and a fox. You choice an animal A ten times, and then another animal A ten times, so you have 20 A. The question is: Do you have twenty dogs or twenty foxs?
geuis将近 15 年前
Ok, I'm not a huge math wiz and after reading this article 2x, I'm still at a loss as to what the answer is. So after we have the nice breakdown in the form of a mathematical proof, we should keep switching envelopes forever? I'm the kind of guy that isn't as interested as to the joy of solving the problem. I just want the money!<p>If I were to break this down into layman's terms, would it be appropriate to say the following?<p>"There's equal odds whether you keep the envelope or exchange it for the other one. There's no difference either way, so flip a coin and decide."
drhodes将近 15 年前
The example seems to miss something critical. If the dollar amount of the first envelope is odd, then it can't be the doubled sum...
samd将近 15 年前
Key takeaway:<p><i>In the words of [David] Chalmers this is "just another example of a familiar phenomenon, the strange behaviour of infinity".</i>
jpwagner将近 15 年前
<p><pre><code> for all $X &#62; p, (price to play) myLifeQuality(p,X) &#62; myLifeQuality(X,2X) &#62; myLifeQuality(X,X/2) </code></pre> easy
klochner将近 15 年前
I got that in a tech interview and hadn't seen it before. Dirty.
评论 #1582424 未加载
pvg将近 15 年前
And that's Numberwang!
dmor将近 15 年前
can't eat your cake and have it too
imajes将近 15 年前
I think this is better posed as two random-drawn sets of numbers for the first drawing of an as-of-yet un-played lottery. Then, there's no value in considering extraneous data such as the mass of the envelopes, looking through them or other potential evidence.<p>Instead, you're left with two identical <i>chances</i>. Since there is no data to suggest that either has an advantage over the other, you have a probability of exactly 0.5 that you have the better chance of winning.<p>On the question of the switch, it's important to consider that you have no new data about the one you picked, so the odds are _exactly the same_ as they were at the beginning: there is no conditionality, nothing has changed since you picking it.<p>The probability then of the winning ticket is still 0.5. This is where the infinite probability problem kicks in.<p>I don't think this is an actual problem needing to be solved, unless we can find a way to mathematically express the probability modifiers of our gut feeling, which is impossible, as it comes into our own personal experiences.<p>Still, Gladwell might have something to say about it :)
richtofen将近 15 年前
Trouble is, we are making it a mathematical problem. It need not be. The same logic applies to human [as opposed to mathematic] problems like: 1. Don't you wish your girlfriend was hot like me? 2. How much money is in the first envelope, to begin with? Whatever there is, I can get it to work to better use in my business, than some class 8 formula. 3. How many birds are there in the bush? 4. What if...<p>All right. Comments notwithstanding. Seriously - how much money?
评论 #1605653 未加载
risotto将近 15 年前
The 'paradox' that is presented leads back to the right conclusion: there is no way to inform which envelope is better so just pick one at random.<p>These are non-causal random events, and the probability is always 50/50.<p>There is a twist to this problem, which is more interesting, where you open the first envelope, then decide whether or not to switch to the second envelope.<p>Believe it or not, there is a trick to beating 50% in this variant.<p>I'm too tired to try to fully explain it, but this conclusion comes from the fact that once you look at an envelope that presents information that can be used for deciding to switch. So it becomes a causal system that does not follow a random probability density function.<p>But think: if the envelope you opened had $7 million dollars in it, you probably wouldn't and shouldn't switch, and you'd probably be able to skew the odds in your favor on scenarios like this.