SongMonk's Journal - The box switching problem [entries|archive|friends|userinfo]
SongMonk

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

The box switching problem [Tuesday 2004.02.17|14:23]
Previous Entry Add to Memories Tell a Friend Next Entry
[Current Mood | jubilant]
[Current Music |Michelle Branch - Tuesday Morning]

Some of you may recall me talking about the box switching problem before.

In case you don't remember, it goes like this:

The setup is that someone flips a fair coin until it comes up tails. The number of flips it takes until a tails shows is N. He then takes two identical boxes and puts 3N dollars in one box and 3N+1 in the other. All this is done without your observation, though you are aware of the mechanism of the setup.

You are then presented with the two boxes. You get to open one box and see the amount. You are given the option of keeping the money in that box. Alternatively, you may forfeit the money in that box and take the money in the other box, whether it be less or greater.

The question is: should you switch?


Other questions to ask are: Does it matter if you switch? What is your expectation if you switch? What is your expectation if you don't switch? What if you don't look at all? Does that change your expectation?

There are various paradoxes that seem to occur if you follow different paths and compare your conclusions.

If this appears simple, you are either very smart or you're not thinking the problem through thoroughly enough. I thought I had it figured out before (after a *lot* of thinking and discussion with other people), but I couldn't resolve all of the contradictions.

This morning, I think I have finally have it all resolved. Writing it up seems to be an immensely formidable task because there are so many thought paths to pursue. Discussing it with someone is much simpler, because then I can address only the objections that a person has, or bring up the points he or she hasn't thought of already. I have a desire to design a website with links that you follow according to what you think is the right answer at certain points, but that's an ambitious undertaking as well. (Not from a technical standpoint of writing the pages, but from the standpoint of designing the graph.) Should I do this? I should.
LinkReply

Comments:
[User Picture]From: [info]mafamba
2004-02-17 23:12 (UTC)

SPOILER!

(Link)

I think the flips do matter b/c if I see $3 in the box, then that could only happen when the first flip ends it. That means the other box definitely has $9 in it, so I'm all over the switcheroo.

If the box has $9 in it, then the number of flips was either 1 or 2.
Given only these two outcomes, the conditional probability that we were 1 flip, given that the total number of flips was either 1 or 2 is 2/3, while the cond. prob. that we were 2 flips is 1/3. heh, I don't explain conditional probability here, oh well. =)

So now it is just an expected value thang.
If we take this box, we get $9 (== 3^2)
If we take the other, our expected value is 1/3 * 3^(3) + 2/3 * (3^1),
which is 3^2 + 2, thus more. So we should switch if all we care about is maximizing expected value.

So for the decision making algorithm, we'll just generalize the process a bit. take log base 3 of the amount of money you see in the first box and call that M. Let's say you see C=$27, so that M=log3(C), M=3. N (total number of flips) is either M or M-1 (N=3 or N=2 for this example).

It is always true that the M-1 is more likely than M (by probability of 2/3 to 1/3). So expected value if you switch is always
1/3 * (3^(M+1)) + 2/3 * (3^(M-1)) = 3^(M) + 2*(3^(M-2))

and that is always more than 3^M, so it is always better to switch, by an expected value of 2*(3^(M-2)), except for when we see $3 in the first box, in which case we'll know that we should switch to the other box, and the difference in expected value there is just $6.
[User Picture]From: [info]songmonk
2004-02-17 23:18 (UTC)

Re: SPOILER!

(Link)

I'll just talk to you in person. :-)
[User Picture]From: [info]songmonk
2004-02-17 23:25 (UTC)

Re: SPOILER!

(Link)

Btw, haven't we talked about this before? :-)
[User Picture]From: [info]mafamba
2004-02-17 23:32 (UTC)

Re: SPOILER!

(Link)

if we did talk about this before, then i forgot that we did. =)
did I say anything that was incorrect?
[User Picture]From: [info]songmonk
2004-02-17 23:32 (UTC)

Re: SPOILER!

(Link)

Anyway, I can't resist.

I acknowledge everything that you said, and the math is sound. However, tell me what is flawed about this alternative viewpoint, if it is flawed at all.

You've basically explained why you should always switch after looking at the first box. Stubborn Stan insists that it doesn't matter and you should just stick with the first box you see.

So I do my coin flipping (without either you or Stan seeing the results), and I present you and Stan with two boxes. We know the boxes contain x and 3x. Which box you pick originally is random (they are indistinguishable), so there is a 50% chance you pick the box with x and switch to 3x. And there is a 50% chance that you pick the box with 3x and switch to x. Likewise, there is a 50% chance that Stan picks the box with x and keeps x, and there is a 50% chance that Stan picks 3x and keeps 3x. It appears that you and Stan do equally well with your different techniques! And yet you previously explained why looking and then switching will increase your expectation. How can this be?
From: [info]saragon
2004-02-18 20:26 (UTC)

Re: SPOILER!

(Link)

I think you should switch, because I believe the math which says once you've looked at one box, you stand to gain by that everpresent 2/9 factor.


The symmetry argument regarding me & Stan is the most problematic paradox, I agree. It seems correct (and headache-inducing) because it's clear than given two boxes with differing amounts, an always-switcher is essentially equivalent to a non-switcher who also happens to look at the box he "didn't pick" before opening the box he did pick.


However, Stan isn't a non-switcher. He's only a non-switcher if he doesn't see $3 in the first box. If we were to *force* Stan to be a *true* non-switcher, *then* he & I would be symmetric - but that would mean that sometimes he's standing on $3. And $3 shows up more than half the time and standing on $3 is always stupid.


But isn't it possible that Stan catches up to me (or whatever) as long as he patches his obstinate non-switching strategy with a switch-on-$3 special rule? I guess it's *possible*, but it turns out not to be, mathematically. 2/3 (x/3) + 1/3 (3x) = x + 2/9 x, after all. But remember, now we're no longer blindly symmetric to each other, we've *both* got conditional strategies. It's just that mine is better. So I think perhaps there's no paradox.


A few more notes to get out there.


1. I think to say "we know the boxes have x and 3x" is misleading. Ok, mathematically, it's fine, I mean, call them whatever. But I'd rather say "we know the boxes have either x and 3x, or *possibly* x/3 and x, as long as at least one Heads was flipped". Of course, half the time, that doesn't happen.


2. Given that there was one heads, your expected value for the *first* box (with this "x/3 & x" or "x & 3x" notation) is actually x + 1/9 x (which makes sense by symmetry, 1/9 being just half the expected 2/9 conditional gain after switching). Of course in our setup one can never open a box and actually see a number of the form x + 1/9 x. This is hand-wavy and would need to be cleaned up but I'd say (except for the $3 case) "5/6 of the time" you'll see a number *less than* that upon opening the first box. Which may help give you the moral support needed to Believe that switching is a good idea: 5/6 of the time you didn't meet the expectation for that first box, you fell below it. But that expectation must have been higher for a *reason*. So, try that second box... (Or, this reasoning may be bogus. I dunno. But I'm sold anyway. I'm switching.)


From: [info]saragon
2004-02-20 00:19 (UTC)

Re: SPOILER!

(Link)

by the way, lack of confidence in the truth of my solution led me to look on the web. these two links (spoilers..) are the most relevant I have found:

The Two-Envelope Paradox: A Complete Analysis?
The St. Petersburg Two-Envelope Paradox

I think (but am not sure) that in your scenario (which is sort of a special case of his, but with the factor changed from 2 to 3) he would agree with me, one should switch. The apparent paradox is resolved by noting (as you already have) that the expected-value of one's winnings in this game is infinite. This means

(1) no absurdity comes from reasoning by symmetry that E(A) = 1.22 E(B) and E(B) = 1.22 E(A), since both E(A) and E(B) are actually infinite;

(2) *intuitively*, it makes sense you'd always want to switch. After all you're playing a game with an infinite expected-value but (after opening the first box) obtained only a finite result... don't you want to try again????
From: [info]saragon
2004-02-20 01:01 (UTC)

Re: SPOILER!

(Link)

BTW upon reading that second link again i'm again unsure as to whether one should switch
From: [info]saragon
2004-02-20 01:28 (UTC)

Re: SPOILER!

(Link)

argh

now I've totally lost my faith in my answer.

the "switcher" is not a "switcher" at all, he's a sticker. he "picks" a box (#1) but doesn't use it, he keeps the amount in box #2. so it's just as if he picked box #2 to begin with. (Yes, I know you said this elsewhere, and even I already knew this, but now I'm *using* it.)

meanwhile,

Stan is also a "sticker". if that were the end of the story, they'd be the same. BUT: Stan can guarantee that he'll end up with at least $9 by appending the "switch on 3" rule to his strategy. Stan can never end up with $3 but the "switcher" can.

so Stan does better!!??

argh
[User Picture]From: [info]songmonk
2004-02-20 01:35 (UTC)

Re: SPOILER!

(Link)

Hehheh, I'd love to partake in this dicussion right now (and I still haven't posted the thoughts I had from last night), but I gotta go eat! And then play poker. I have my priorities. :-)
From: [info]saragon
2004-02-20 01:43 (UTC)

Re: SPOILER!

(Link)

oh wait. I see. phew.

with any "strategy", the expected winnings for this game is infinite. so okay, in expected-value sense, Stan's overall strategy is "better" than mine, *and* mine is better than his... depending on how you look at it (i.e. group terms). which really just indicates that this kind of reasoning doesn't work for infinite expectation. which I now see is probably what the guy from the links I gave is saying, with better lingo. but ok.

*meanwhile*

i'd still "switch" on any given iteration of this game.

i think the point is that the "Stan" thought-experiment doesn't really shed any light, because of the infinite expectations.
[User Picture]From: [info]harryh
2004-02-22 10:03 (UTC)

Re: SPOILER!

(Link)

But in the base case (open a box and see $3) Stan is obviously behaving non-optimaly. The rest is just induction.
[User Picture]From: [info]abostick59
2004-02-17 23:48 (UTC)

(Link)

The coin-tossing algorithm you describe implicitly defines the probability distribution for N. Thus, the coin-tossing algorithm gives an a priori EV for the content of a box. For purposes of a LiveJournal post, I'm too lazy to work out this EV.

But my handwaiving opinion is this. If you get to look at the contents of a box and it is smaller than this a prioriEV, my intuition is that you should switch. [info]mafamba has already pointed out that you MUST switch if the box you open contains $3, because, by the specified coin-tossing algorithm the other box MUST contain $9.
[User Picture]From: [info]songmonk
2004-02-18 00:05 (UTC)

Re:

(Link)

Well, you bring up a point which is something that I didn't consider the first time I thought about this problem (maybe about a year ago?) but which I did think about a couple days ago.

And that is the fact that the a priori EV (before opening any box) is in fact infinite. You can see this by looking at the first few terms of the series which yields the a priori EV. Let's just consider the smaller valued box. (The fact that you might get the larger valued box only increases the EV.) The EV would then be 1/2 * 3 + 1/4 * 9 + 1/8 * 27 + ...
The terms are increasing and so the sum is infinite.

However, I don't think that your hypothesis holds in general. Unless I'm misunderstanding what you're saying.
[User Picture]From: [info]plizak
2004-02-18 00:20 (UTC)

Re:

(Link)

I love infinite series
[User Picture]From: [info]abostick59
2004-02-19 07:13 (UTC)

A Priori EV

(Link)

So the a priori EV of a box, before you choose and open it, is infinite. Therefore, if you choose and open a box and find a finite quantity of money, you should be dissatisfied, and switch.
[User Picture]From: [info]songmonk
2004-02-19 07:18 (UTC)

Re: A Priori EV

(Link)

Is that really a compelling reason to switch though?

What if I noted that you will always pick the higher valued of the pair of boxes? (Yes, I am changing the conditions of the problem.)

However, the a priori expectation before you open the first box is still infinite. And yet you obviously shouldn't switch.

Now, I realize I did just change the problem, and the original problem is different. But what is different about it that makes you claim that you should switch simply b/c your expectation for not switching is less than the a priori expectation? Is it simply that you don't know what's in the other box? Not knowing still isn't sufficient. You have to think that your expectation for switching will be even or go up.

And there *is* reason for believing that, but it's not simply because your expectation for seeing what you will get if you don't switch is less than infinite. I don't buy your reason for wanting to switch.
[User Picture]From: [info]plizak
2004-02-18 00:19 (UTC)

(Link)

Maybe you should write a Monte Carlo simulation for this?

Would you like me to write one up?

[User Picture]From: [info]songmonk
2004-02-18 00:23 (UTC)

Re:

(Link)

I did it before when I was talking about it before w/ you and Kristy and Dook.

What I found was that no matter how long I ran it, it was difficult to get anything conclusive, because an outlying term on the end would dominate everything else.

And that makes sense because this is a series that grows. The expected value is infinite. So a Monte Carlo simulation won't help you here *for the general case*. You can, however, run it to see whether you are better off switching or not once you see, say, $9 in the first box. But I don't even need to run it to know what the answer is.
[User Picture]From: [info]songmonk
2004-02-18 00:20 (UTC)

(Link)

Here is a much simpler problem which is easier to get your head around. It's not the same problem (and so not directly extensible), but it maybe be an easier place to start.

I hand you two indistinguishable envelopes and I tell you that one contains twice the amount of money as the other. (Maybe one has a check for twice the amount of the other, or whatever.) That much is a given. You're allowed to open one envelope and look at the amount, and then decide whether you want to switch.

In this case, there is no infinite sequence or series, and there is no "base case" where the decision is obvious.

However, you can do the same expected value calculation that Han did above and figure that you gain 25% by switching. But you can also come up with an argument that switching and not switching yield the same expectation.

For this problem I have a lot easier time explaining why looking then switching doesn't actually increase your expectation. While I feel that always switching is not a favorable strategy in the box problem (nor is it unfavorable), it also seems indisputable that *once you have opened a box and seen $9*, you have a greater than $9 expected value if you switch.

Btw, I thought I had it all reconciled in my head, but I guess I don't. So I'm back to thinking again. :-)
[User Picture]From: [info]songmonk
2004-02-18 00:49 (UTC)

(Link)

Anyway, even though I'm skipping past several steps that you (the reader) may or may not have already gone through on your own, I'll just say what I *thought* was the revelation that I had earlier today.

It's already a given in my mind that if you're *always* going to switch no matter what you see when you open the first box that you have the same expectation as if you *never* switch. (This is due to the fact that you have a 50/50 chance of picking either box, and if you switch you end up with the other box...which you had a 50/50 chance of opening in the first place. It seems like what you see influences what you do, but no matter what you're switching, so really it's as if you picked the other box without looking at the first one...you're in fact a non-switcher!)

The issue is reconciling what I just said against the fact that if you open a box and see x, it appears that you increase your expectation by 22.2% over what you would get by staying with what you see. I thought that there was some way to reconcile that result by saying that your expectation is 22.2% greater over what the amount you're looking at, but no different than if you came in with the non-switching strategy. (A non-intuitive result, to be sure.) But after further thought, that doesn't work, because I'm asserting that the non-switcher -- who is staring at that same amount in the first box, clearly has an expectation of x. (vs. the 1.22x that you're going to have by switching.) After all, while the analysis that people have done above seems to imply that you should always switch no matter what you see (including the base level $3 which even the non-switcher must admit should be switched on), there is nothing that says you have to decide beforehand. Maybe you choose not to do your analysis until you've actually seen the amount in the first box. (Even though what you see doesn't actually affect your analysis.)

So confusing!!
[User Picture]From: [info]cpk
2004-02-18 01:26 (UTC)

Re:

(Link)

I think the confusion is that the 22% is the % EV you get when N=1 and you picked the $3 box amortized over infinity. The strategy is insignificant when you see anything else, because in that case the only genuine information you have is that there are two boxes with different amounts of cash.
[User Picture]From: [info]cpk
2004-02-18 01:10 (UTC)

(Link)

When you open the box and see $9, you know that you threw the coin either once or twice, it is true. But you know with 100% certainty that the tail was thrown. The only significant probability is whether you threw a head the first time. And that probability is 0.5. In fact, that's true no matter how many times you throw the coin--the only difference between N and N+1 is whether you threw the head the previous time before throwing the tail.

Also, you're evaluating the strategy of always switching versus always not switching. And the fact is, they're equivalent. The problem is simply that you have two boxes, one with a higher amount and one with a lower amoount. The EV of either approach is based on which box you choose first, and is always just the average of the two amounts.

It's not the same problem as the Monty Hall problem at all--in the Monty Hall problem, Monty gives you additional information based upon what you select. In this problem, you get no additional information--you have the same information no matter which box you select.
[User Picture]From: [info]songmonk
2004-02-18 03:40 (UTC)

Re:

(Link)

When you open the box and see $9, you know that you threw the coin either once or twice, it is true. But you know with 100% certainty that the tail was thrown. The only significant probability is whether you threw a head the first time. And that probability is 0.5. In fact, that's true no matter how many times you throw the coin--the only difference between N and N+1 is whether you threw the head the previous time before throwing the tail.

This is not correct.

But even if it were correct, you could apply your 50% probability and still decide that you increase your expectation by switching. [EV = .5 (1/3 x) + .5 (3x) ]

I agree that this is not like the Monte Hall problem. But none of the arguments have referenced anything having to do with that.

I also agree that the always-switching strategy is equivalent to the always-staying strategy. The difficulty is reconciling the seemingly contradictory results.
[User Picture]From: [info]cpk
2004-02-18 10:42 (UTC)

Re:

(Link)

This is not correct.

It most certainly is. If N=1 or 2, then the two situations are:

T = 50% of the time
HT = 50% of the time

Why is it this way? Because a flip of HH is simply not possible. If HH was flipped, N could not be 1 or 2.

This is very similar to calculating the probability of choosing three random letters and having them all be the same: the probability is 1 x 1/26 x 1/26, not 1/26 x 1/26 x 1/26.

I also agree that the always-switching strategy is equivalent to the always-staying strategy. The difficulty is reconciling the seemingly contradictory results.

It's because you're treating the switching as a random event. All the randomness was resolved the minute you chose the first box. Looking at the contents of the box removes all the random variables, and it gives you no new information, unless the box contains exactly $3.
[User Picture]From: [info]songmonk
2004-02-18 11:15 (UTC)

Re:

(Link)

Think of it like this. We're going to keep flipping the coin but only care when the first tail shows up.

TT
TH
HT
HH

Those four possibilities are equally likely, yes? Now consider the cases where the tails showed up in the first flip. There are two of them. Now consider the cases where the tails showed up in the second flip. There is one of them. If you actually follow the method outlined, you'll find that of the times where you pick a box and find $9 inside, the other box will have $3 twice as often as it has $27.

This should make sense deductively, but if you still don't believe it, try performing the experiement by hand (though this would be tedious), or write a program to simulate it a few thousand times. You'll see that it bears out.
[User Picture]From: [info]cpk
2004-02-18 01:13 (UTC)

(Link)

Oh, but wait--you should always switch if you see that you have chosen $3--the reason is that you now have information you didn't have before.
[User Picture]From: [info]songmonk
2004-02-18 04:17 (UTC)

(Link)

Oh yeah, I forgot that I actually had collected data from my previous simulations. Lest you doubt the analysis above, it's quite clear that there is an expectation gain for each individual number that you see -- over a large number of trials.

Over a million trials, this is quite well established. And yet, even at a million trials, there are always the outliers. Inevitably there are. And that one failure at the top can undo all the gains established down below.

And no, you can't "beat the system" by sticking on the big numbers and staying on the small numbers. The question is simply what gives you the greatest expected value. :-)

I'll write more later. Gotta get back to watching American Idol. :-)
[User Picture]From: [info]cpk
2004-02-18 11:39 (UTC)

Re:

(Link)

This is almost impossible to simulate fairly--as you have noted, if you get N=40 even once, whereas every other game is N=3 or so, then results are horribly skewed. So the way I dealt with it is to discard any trial where N >= 10. This way, low probability events don't dominate the outcome. The results are inconclusive:

>>> stuff = boxhack.experiment(1000000)
never switch:
236376190

always switch:
237863556


>>> stuff = boxhack.experiment(1000000)
never switch:
234069166

always switch:
236736822


>>> stuff = boxhack.experiment(1000000)
never switch:
233834636

always switch:
232218234

_____[the code]_____

import math
import random

def coinflip():
    n = 0
    while random.random() < 0.5 and n < 10:
        n += 1
    return n

def trial(seq, n):
    values = [3**n, 3**(n+1)]
    choice1 = int(random.random()*2)
    choice2 = 1 - choice1
# 0 = switch only if x = 3
# 1 = always switch
    if values[choice1] == 3:
        seq[0] += 9
        seq[1] += 9
    else:
        seq[0] += values[choice1]
        seq[1] += values[choice2]

def experiment(trials):
    results = [0,0]
    x = 0
    while x < trials:
        n = coinflip()
        if n < 10:
            trial(results, n)
            x += 1
    print "never switch: "
    print results[0]
    print "\nalways switch: "
    print results[1]
    print "\n"
    return results


[User Picture]From: [info]songmonk
2004-02-18 11:43 (UTC)

Re:

(Link)

I just meant to simulate to find the answer of the following question: "Of the times where I see $9 in the first box I open, how often does the other box contain $3?" For that you can throw out any N>2, since you won't be seeing $6.

Like I said, I'm on board with you that in the general case, you neither gain nor lose by switching.

However, the answer (oddly enough) very much is, "If you see $6 in the first box you open, your expectation will increase by switching boxes."

Do you disagree?
[User Picture]From: [info]songmonk
2004-02-18 11:45 (UTC)

Re:

(Link)

And now I notice you were responding to a different comment. My apologies. :-)
[User Picture]From: [info]songmonk
2004-02-18 11:50 (UTC)

Re:

(Link)

And the truth of the matter is that you can't really disregard N >= 10 (though it still can be illustrative though not definitive). Because the reality of the situation is that those large values of N is what makes a big difference.

Here is one sample of data that I saved from before:

result for each number seen:
              3 0.25040         1502418          0     250403
              9 0.37486          750066     249893     124968
             27 0.18709         1111716     124877      62213
             81 0.09322         1664334      62206      31009
            243 0.04706         2509704      31419      15637
            729 0.02360         3896748      15694       7904
           2187 0.01198         5808672       7986       3990
           6561 0.00595         9185400       3939       2013
          19683 0.00289        12570876       1925        961
          59049 0.00146        18344556        977        481
         177147 0.00073        37909458        471        264
         531441 0.00038        31177872        260        116
        1594323 0.00019        48892572        131         59
        4782969 0.00011        86093442         72         33
       14348907 0.00003       -57395628         27          7
       43046721 0.00003       746143164         13         13
      129140163 0.00002       258280326         12          5
      387420489 0.00001      1807962282          8          5
     1162261467 0.00000       774840978          2          1
     3486784401 0.00000     -2324522934          1          0
    10460353203 0.00000    -20920706406          3          0
    31381059609 0.00000     41841412812          1          1

result for each pair seen:
3              - 9               0.50030            3060     249893     250403
9              - 27              0.24985            1638     124877     124968
27             - 81              0.12442             378      62206      62213
81             - 243             0.06243          -66420      31419      31009
243            - 729             0.03133          -27702      15694      15637
729            - 2187            0.01589         -119556       7986       7904
2187           - 6561            0.00793          223074       3939       3990
6561           - 19683           0.00394         1154736       1925       2013
19683          - 59049           0.00194         -629856        977        961
59049          - 177147          0.00095         1180980        471        481
177147         - 531441          0.00052         1417176        260        264
531441         - 1594323         0.00025       -15943230        131        116
1594323        - 4782969         0.00013       -41452398         72         59
4782969        - 14348907        0.00006        57395628         27         33
14348907       - 43046721        0.00002      -172186884         13          7
43046721       - 129140163       0.00003        86093442         12         13
129140163      - 387420489       0.00001      -774840978          8          5
387420489      - 1162261467      0.00001      2324522934          2          5
1162261467     - 3486784401      0.00000               0          1          1
3486784401     - 10460353203     0.00000    -20920706406          3          0
10460353203    - 31381059609     0.00000    -20920706406          1          0
31381059609    - 94143178827     0.00000     62762119218          0          1
average for switching: 133731
average for sticking: 111344


Sadly, I failed to label the columns, but I bet you can figure out what each of the columns are. The last two columns on the top table are the number of times you end up going up and going down respectively if you switch after seeing the number in the first column. That's what I was talking about above when I was saying it's not 50/50.

[User Picture]From: [info]songmonk
2004-02-18 11:54 (UTC)

Re:

(Link)

Also illustrative:

The first table clearly shows that in the long run, you gain by switching if you look at it from the perspective of the amount of money that there is in the first box that you open.

The second table clearly shows that in the long run, you neither gain nor lose by switching if you look at it from the perspective of a "box pair" -- which should be obvious since for any given box pair, you have a 50/50 chance of choosing either the larger or smaller amount in the pair for your initial pick.
[User Picture]From: [info]songmonk
2004-02-18 11:59 (UTC)

Re:

(Link)

And that, I feel, is the crux of the paradox. If there is one.

Looking at it from that dual perspective, it seems to make sense to me. Until I phrase it back how it originally was. After I open the first box and see how much is in there, am I better of switching or does it matter? According to the first table, the answer is clearly yes. According to the second table (and the aggregate results), it doesn't matter.

I belive that overall, your expectation doesn't change. But it appears that for each individual number, your expectation is positive for switching. (Even in the cases for large N where there weren't enough samples to show that. Because even though the samples were small, the math is the same, and you will show a 22% gain in expectation by switching.) So how can all the individual cases show that you gain my switching (including the $3 case where you show even greater that a 22% gain), and yet the aggregate is that it doesn't matter? It can't just be an issue of grouping, can it? I think maybe it can...because it's an infinite series. Perhaps it is possible to deceptively group and never have it appear to be false, because the series goes on forever. And remember, it's difficult to say whether we're actually increasing our overall expected value, b/c right from the start, the expected value is infinite.
[User Picture]From: [info]mafamba
2004-02-18 19:06 (UTC)

Re: simulation info

(Link)

I still feel that always switching is better, so let me try to point out what I think is wrong with the dual-box perspective.

First, let me say that I agree that if we open the first box, and it gives us no information, then there is no reason to switch. But this is the crux of the failure of the dual-box perspective. I believe there *is* information that we gain when we open the first box that the dual-box perspective tries hard to convince us to ignore.

Altho the information we gain *does not* tell us whether we "picked the box with more or less", it does allow us to now use the probability distribution function from what we know about the amount selection process, to determine the probability distribution function for the unopened box.

In as much of a non-mathematical way as I can describe it, opening the first box lets us use the information we had before to determine whether to take what we've got, or try the other box.

The math for this problem works out in such a way so that it is always better to switch, altho with a different way of determining values, it could easily be the opposite.

This problem is complicated for another reason and that is the infinite expected value. Probabilities with infinite expected value are non-intuitive. For example, if someone asked if you wanted a million dollars or if you wanted to play this game (let's say you just do the coin flipping part, but you get the money at the end, instead of the two boxes), most of us would take the million dollars. After all, half of the time you play the game, you end up with $3.

But it turns out that since the expected value is infinite, there is no finite value that would make you *not* play the game, unless you are a silly human and are interested in lowering risk variance...

Songmonk noted that the expected value for whether you switch or not is infinte, and that is correct. However, switching always gives a higher expected value than if you did not. I don't know how you ran your simulation, but it is always possible to ignore certain bits of information so that this is not the case, but that kind of changes the problem doesn't it?
[User Picture]From: [info]dawnmarissa
2004-02-19 16:21 (UTC)

Re:

(Link)

I do think it might be an issue of grouping when you start to add up money won over several times playing the game.

If you look at the pairs together, Stubborn Stan (who always stays) expects that over time he'll see the 3-9 pair 1/2 the time. Half that time he'll stay on the 3, half that time he'll stay on the 9. One-quarter of the time he'll see the 9-27 pair, 1/2 the time he'll stay on the 9, 1/2 the time he'll stay on the 27. Etc. So his expected value of this strategy over time looks like this series:

1/2 (1/2*3 + 1/2*32) + 1/22(1/2*32 + 1/2*33) + 1/23(1/2*33 + 1/2*34) + ...

Your strategy of always switching also has the same expected value over time -- half the time you'll see a 3-9 pair. You'll switch on the 3 (to a 9) and switch on the 9 (to a 3).

------

When you don't look at it paired but try to "use" the information in the box you look into, you basically just rearrange the sequence by grouping the 3n terms. So that over time, you'll expect to get 3 one-quarter of the time (when you saw a 9 and switched in the 3-9 pair). You'll get a 9 one-quarter + one-eighth of the time (from the 3-9 pair and the 9-27 pair respectively).

So your sequence just gets rearranged like this:
1/22*3 + (1/22 + 1/23)*32 + (1/23 + 1/24)*33 + (1/24 + 1/25)*34 + ...

I think part of the paradox comes in because when you rearrange the sequence this way, the last term that I bolded wasn't originally written out in the sequence (of course it was in the sequence in the ...). So while you are in the middle of the game, it looks better to try to extend the sequence by "betting" that you are in a higher pair and switching boxes so that you can be add another term to the sequence.

---------

All that said, I still can't poke holes in [info]mafamba's argument, so I'm not sure I've even convinced myself of what's going on!

[User Picture]From: [info]mafamba
2004-02-19 20:52 (UTC)

changed my mind

(Link)

I now think that, except for the base $3 in the box case, it doesn't matter whether you switch or not.

The reason why I say this is that my prior analysis is incorrect in applying probability analysis. Specifically, it is wrong to think that once a box is chosen, that the other box's value is a probabilistic one. The random event here is picking the box.

In fact it is not. Once you choose a box, you either got the box with more in it, or you got the one with less in it -- there is no more randomness. that is to say, I was previously assuming a probability tree that looked like this:
1/2 prob 1/3y is in other box
/
found y in box
\
1/2 prob 3y is in other box

This is wrong. The probability tree should look like this:

if switch, you'll get x
/
1/2 prob box has 3x
/ \stubborn stan stays with 3x
choose box
\ /if switch, you'll get 3x
1/2 prob box has x
\
stubborn stan stays with x

Ok, so the problem here was figuring out what the true random event was, as the two trees above are not equivalent. That is to say, once we have chosen the first box and looked inside, the contents of the other box is determined.

If we were in the situation where we started with some value x, and monty asks us if we want to trade what we've got for a probabilistic try at something else, then we can evaluate expected value for the probability function he gives us (if he lets us know).

Note that it is still the best choice to always switch in the monty hall problem where there is a prize only behind one of 3 doors. you choose one door (and don't get to see what's behind), and then monty eliminates one of the two choices that you did not make and shows you that the prize was not behind one of the doors you did not choose. then monty offers you the option to switch.

It is better to switch here because monty's elimination of one of the choices that you did not take increases the likelihood that the remaining other choice is correct. You can imagine if there were a million doors, all with equal probability of being the one with the prize, you choose one, then monty opens up all but one of the doors that you did not pick to show you that the prize wasn't behind those. Monty's actions turn your choice into pick one door, or pick all the others except one door, and it is easy to see that it is better to pick all the doors except one you hope where the prize is not.

songmonk seemed to be angry with me while discussing this issue. I'm not sure if it was angry or frustration or both, but I think I brought up some ideas yesterday that might have been wrong or right, but I was a little miffed myself at songmonk's reaction because it seemed to me that songmonk disagreed but didn't offer an explanation as to why that I seemed to understand, and I felt like I was trying to ask to be shown the explanation and it felt like songmonk simply refused, which made me confused and (just slightly) upset.

oh well, I hope this puts this thing to a rest.
[User Picture]From: [info]mafamba
2004-02-19 20:54 (UTC)

Re: changed my mind

(Link)

stupid formatting. I should have hit the don't auto-format button. Is it possible to update old posts or comments?
[User Picture]From: [info]songmonk
2004-02-20 01:34 (UTC)

Re: changed my mind

(Link)

Can't update, but you can delete and repost. Usually I don't delete and repost as a reply to the comment I missed up on.
[User Picture]From: [info]songmonk
2004-02-19 22:35 (UTC)

Re: changed my mind

(Link)

songmonk seemed to be angry with me while discussing this issue. I'm not sure if it was angry or frustration or both, but I think I brought up some ideas yesterday that might have been wrong or right, but I was a little miffed myself at songmonk's reaction because it seemed to me that songmonk disagreed but didn't offer an explanation as to why that I seemed to understand, and I felt like I was trying to ask to be shown the explanation and it felt like songmonk simply refused, which made me confused and (just slightly) upset.

Sorry I came across that way. I'm not sure exactly what happened, but I'll offer this up.

At some times (and this is true in general, not just in yesterday's conversation), I'll be in a position where I realized I said something I'm not so sure about. I'm not sure that I'm right, but I'm not sure that I'm wrong either. (Basically, I want to think about it some more.) But instead of admitting that, I try to save face. (Subconsiously, that is. I'm not so immature as to act intentionally act badly to save face, but I am so immature as to unintentionally act badly to save face, lol.) I think that's what happened when you talked about the subtracting infinity from infinity + x. (I know that there are different "sizes" of infinity (e.g. the infinite set of real numbers is larger than the infinite set of integers), but I'm still not convinced that in this case that makes sense. You said in some cases it does, and in some cases it doesn't, and I just wasn't sure in this case. I didn't think so, but I didn't know enough to positively say so. It felt like you knew you were on firmer ground than I was.) So I just said, "Ok." Basically, I was acknowledging your point but not agreeing with you. You detected that I wasn't in whole agreement, but I didn't offer more. Is that what you're talking about? Sorry about that. I guess I should have just said, "I acknowledge your point, but I'm not sure that I agree, and I need to think about it more." But instead, it seemed like I knew more than I was saying and I was just holding back (to be spiteful or something, I guess).

So, misunderstanding, and no worries, I hope! I don't have time to read what you wrote back just now, but I'll look over it later.

This is so funny in some ways. No matter what someone says (whether it makes sense to switch or not), I argue against them. :-) I'm just trying to reconcile the seemingly inconsistent conclusions. I'm not trying to convince anyone to "change sides". But my method for doing that is arguing the opposite viewpoint and hope that someone shows me where I've gone wrong.

[User Picture]From: [info]harryh
2004-02-22 10:27 (UTC)

Re:

(Link)

> This way, low probability events don't dominate the outcome.

This is the fat tails fallacy, and actually has real world implications in financial markets, mostly in the field of hedge funds.
[User Picture]From: [info]songmonk
2004-02-22 10:37 (UTC)

Re:

(Link)

I enjoyed that read. Thanks.
From: (Anonymous)
2004-02-20 16:57 (UTC)

possibly inane comment

(Link)



Apologies if this has already been introduced in a previous post...I read most of the comments, but I tend to glaze over when numbers and formulas are introduced. I get enough of that at school and don't need more. Anyhow...

Something happens when you open the first box that automatically makes it inferior. It's as though the problem could be rephrased as: "No matter which box you choose, $1 zillion will magically materialize in the other box. Do you switch?" Of course you do. Does it make sense to switch before opening the box, since you are going to switch anyway?

(To avoid the mysticism, you could also rephrase the problem as "No matter which box you choose, it will be +ev for you to switch. Do you switch?")

(I'm the AYCE Reno Sushi Page guy, btw.)


tyler


From: [info]saragon
2004-02-21 02:45 (UTC)

(Link)

So I was thinking: What exactly is put into the two boxes if Heads never comes up at all? (This is a probability-0 event obviously, but does that mean it "can't" happen?)

To bring this into perspective, can we try to define your game as a "limit" of finite games? We might:

Let G(N) = game #N, which goes like this. Someone flips a coin exactly N times. Let n = the coin flip on which Heads first comes up, OR n=0 if all N flips are Tails. Then all else is as before: 3^n and 3^(n+1) are placed into two boxes A and B, you open one not knowing which, and then can switch if you want.

This game should present no infinity problems. The expected amount in Box A is finite and can be calculated in advance. Now no one can stop us from using Bayes theorem, changing the order of any summations, etc in general behaving as recklessly as an undergrad in calculus. This means that once we dispense with the *two* endpoint special cases $1 (switch) and $3^(N+1) (don't),

we can safely say the conditional expected value of switching is positive for each n=1,...N (=2/9 of current amount), so do it in those cases. But now there's no paradox because we no longer say in advance that switching is good independently of the first box's value. Switching is horribly dumb if the first box contains $3^(N+1).

Is your game the "limit" of G(N) as N approaches infinity? One wants to say so, but I guess not. It doesn't seem to behave well enough. In practice when playing G(infinity) one might *pretend* he's playing G(N) for some huge N which he expects not to be attained in a zillion years, and on that basis decide to always switch. (I'm guessing this is something like what physicists call "renormalization" but I'm not sure... :) )
[User Picture]From: [info]harryh
2004-02-22 11:09 (UTC)

The answer

(Link)

∞ cannot be manipulated algebraically like other numbers. The following are true statements:


  1. (11/9) * ∞ = ∞
  2. ∞ + 3 = ∞ + 9


Counterintuitive, but true.