Two Plus Two Poker Forums Baffling Math Paradox
 User Name Remember Me? Password
 Register FAQ Search Today's Posts Mark Forums Read Video Directory TwoPlusTwo.com

 Notices

 Poker Theory General poker theory

 Thread Tools Display Modes
06-25-2012, 04:37 AM   #61
centurion

Join Date: Jul 2010
Location: Sheffield
Posts: 105
Re: Baffling Math Paradox

Quote:
 Originally Posted by uDrewAtThat? Cliffs for My Position: If I was given the chance to play the game once and switch, I would switch any number. If I was given the chance to play 10+ times I would only switch if the number was 1... The reason why is in my posts.
What if I was to give you a sheet with 3^N on it, N>1.

If I told you that if you chose to gamble then I'd roll a fair dice and if it landed:
5 or 6 - I'd give you triple the amount on the sheet.
1, 2, 3 or 4 - I'd give you a third of the amount on the sheet.

Or you could refuse the gamble and take the amount on the sheet.

What would you do then?
(Gamble surely.)

Is this gamble any different to getting a sheet in one of your 10+ times with a number greater than 1 on it and choosing whether to switch?

(I'm actually a little unsure whether it is or not, but I think they are equivalent.)

Last edited by Scouse Rob; 06-25-2012 at 04:39 AM. Reason: Fair dice of course.

 06-25-2012, 05:32 AM #62 old hand   Join Date: Jun 2007 Posts: 1,557 Re: Baffling Math Paradox Cool problem. Obviously very similar to the two envelopes paradox, but slightly less mysterious since you've actually defined how the amounts get chosen. The EV of switching given the first envelope has N is indeed always positive for any fixed value of N However, since there are an infinite amount of possible values for N and the game has an infinite EV, this doesn't actually contradict the fact that blindly switching has to have the "same" EV as blindly sticking.
06-25-2012, 06:13 AM   #63
centurion

Join Date: Jan 2012
Posts: 172
Re: Baffling Math Paradox

Quote:
 Originally Posted by bobf That's one way to look at it. And you have argued for one half of the paradox. But it ignores the fact that you get to look at the slip of paper which gives you new information. Consider what you will do if you see a 1. The only way that can happen is if the coin came heads so T = 0 and the two slips are (1,3). So you should switch because you will always be switching to 3. So your statement that it never matters if you swtich is not true. Now consider what you know if you see a 3. There are two ways you could see a 3: (a) Coin went (Heads) so T = 0 so I wrote (1,3) and then you drew a 3. (b) Coin went (Tails Heads) so T = 1 so I wrote (3,9) and then you drew a 3. Prob(a) = Prob(Head) x Prob(draw 3) = 0.5 x 0.5 = 0.25 Prob(b) = Prob(Tails Heads) x Prob(draw 3) = 0.25 x 0.5 = 0.125 So (a) is twice as likely as (b). So when you see a 3 and you switch then 2/3 of the time you will get a 1 and 1/3 of the time you will get a 9. EV(stay | you see 3) = 3 EV(switch | you see 3) = 1/3 x 9 + 2/3 x 1 = 3 2/3 So again you should switch. And for all values of N that you see, this calculation will tell you to switch.
What you have actually computed is the conditional expectation of the random variable 3^T given that T = 3.

More generally, for n > 0, E[3^T | you see 3^n] = (11/9)3^n > 3^n.

(the case n = 0 requires a (very easy) special treatment).

If we ask whether we should always switch, then our interest is not the just computed conditional expectation conditioned on having seen a particular number. Rather it is the expectation of 3^T conditioned on switching, which is infinite, compared with the expectation of 3^T conditioned on not switching, which is also infinite.

The questions of whether I should switch having seen a given number and whether I should switch always are distinct questions, with different answers.

As some other poster has commented, this is a version of a problem well known as the "two envelopes problem". There is lots of technical literature about this problem, not all of it equally good. An example that seems reasonable to me is: http://www.math.utk.edu/~wagner/pape...adventures.pdf

06-25-2012, 06:18 AM   #64

Join Date: Jan 2006
Posts: 701
Re: Baffling Math Paradox

Quote:
 Originally Posted by bobf Not sure how this relates to poker... but probably it does somehow. 1. I toss a fair coin until it comes up with heads. Let T = the number of tails seen, before heads comes. T will be 0,1,2,3,4,5... 2. I take two slips of paper and write down the numbers (3 to the power of T) and (3 to the power of T+1). For example if T=2 then I will write down 9 on one slip and 27 on the other. 3. You randomly choose (probability 1/2) one of the two slips of paper and look at the number N. N will be 1,3,9,27,81... 4. After looking at the number N you have the option of exchanging with the other slip of paper or sticking with N. 5. I pay you in dollars the number written on your slip of paper. For what values of N should you switch? This has truly baffled me. Recently I thought I solved this, but now again I am not so sure. The paradox arises because, calculated one way, you should always switch. But if you always switch, you don't even need to look at your slip of paper. You just switch. But in that case you are simply choosing a random slip and switching so you are getting a random slip still, so it can't matter at all if you switch or don't switch.
At 1st I wrote a Monte Carlo program, that seemed sort of even, but the variance was terrible making the result unreliable and inconclusive despite 10,000,000 iterations. I decided on a manual enumerative approach and got the following:

Code:
```s1: 1st strategy, always switch
s2: 2nd strategy, if slip = 1, then switch, else stay

On ...|T action: show larger slip
On ...|H action: show smaller slip

slips  action  s1-s2    freq      ΔEV     totals
T|T    1 & 3   sh 3   (1-3)  * (1/4)  = -0.50    -0.50
T|H    1 & 3   sh 1   (3-3)  * (1/4)  =  0.00    -0.50

HT|T   3 & 9   sh 9   (3-9)  * (1/8)  = -0.75    -1.25
HT|H   3 & 9   sh 3   (9-3)  * (1/8)  =  0.75    -0.50

HHT|T  9 & 27  sh 27  (9-27) * (1/16) = -1.125   -1.625
HHT|H  9 & 27  sh 9   (27-9) * (1/16) =  1.125   -0.50

HHHT|T 27 & 81 sh 81  (27-81)* (1/32) = -1.6875  -2.1875
HHHT|H 27 & 81 sh 27  (81-27)* (1/32) =  1.6875  -0.50
...```
The relative EV of always switching is slightly worse. Seems counter-intuitive, but what is happening is that the always switch strategy (s1) has the possibility of selecting the slip with \$1 on it. This happens often and is the reason, that s1 is slightly worse. Otherwise it would be a dead heat. Note that s2 only switches, when the slip shows N = 1. The rest of the time, it stays with the original slip, so it can never select the slip with \$1 on it.

I should add that the EV of both s1 and s2 approach infinity. The Relative EV shows that s2 is slightly faster in its approach to infinity, but in theory, it is a tie.

Last edited by R Gibert; 06-25-2012 at 06:23 AM.

06-25-2012, 08:27 AM   #65
grinder

Join Date: Feb 2008
Posts: 423
Re: Baffling Math Paradox

Quote:
 Originally Posted by Bobito What you have actually computed is the conditional expectation of the random variable 3^T given that T = 3. More generally, for n > 0, E[3^T | you see 3^n] = (11/9)3^n > 3^n. (the case n = 0 requires a (very easy) special treatment). If we ask whether we should always switch, then our interest is not the just computed conditional expectation conditioned on having seen a particular number. Rather it is the expectation of 3^T conditioned on switching, which is infinite, compared with the expectation of 3^T conditioned on not switching, which is also infinite.
I came up with something similar in another post. I said that from the viewpoint of the person playing the game who sees the number N

EV(switch | N) - EV(stay | N) = 2/9N

But from the viewpoint of the person writing down the numbers, he knows T but does not know N

EV(switch | T) - EV(stay | T) = 0

And for the game

EV(switch) - EV(stay) is undefined because the infinite sum diverges.

Quote:
 The questions of whether I should switch having seen a given number and whether I should switch always are distinct questions, with different answers.
To me this is not a satisfying answer. The player does in fact see the number and his conditional EV tells him to switch every time. This is the same advice that an "always switch" oracle would give him.

To me the more satisfying explanation is simply that the EV of switching vs staying for the whole game is undefined and it is normal to get conflicting results when we attempt to group the terms in a divergent infinite sum in different ways.

Like them sum +1 + -1 +2 + -2 +3 + -3... is diverges. But if we group (+1 -1) + (+2 -2) + (+3 -3)... we seem to get 0 + 0 + 0 + compared to grouping +1 + (-1 + +2) + (-2 + +3) where we seem to get 1 + 1 + 1 + ...

Similarly, the person observing N is calculating the EV for each N while the person observing T is calculating the EV for each T and so they get different answers. That's ok because the EV of the game is undefined.

Quote:
 As some other poster has commented, this is a version of a problem well known as the "two envelopes problem". There is lots of technical literature about this problem, not all of it equally good. An example that seems reasonable to me is: http://www.math.utk.edu/~wagner/pape...adventures.pdf
I will take a look. The envelope game I did look at starts with writing down two numbers, one of which is 2 times the other number. But that version of the game doesn't give any probability distribution for the numbers. That seems like a not-well-defined problem compared to this version.

06-25-2012, 08:40 AM   #66
grinder

Join Date: Feb 2008
Posts: 423
Re: Baffling Math Paradox

Quote:
 Originally Posted by R Gibert At 1st I wrote a Monte Carlo program, that seemed sort of even, but the variance was terrible making the result unreliable and inconclusive despite 10,000,000 iterations. I decided on a manual enumerative approach and got the following: Code: ```s1: 1st strategy, always switch s2: 2nd strategy, if slip = 1, then switch, else stay On ...|T action: show larger slip On ...|H action: show smaller slip slips action s1-s2 freq ΔEV totals T|T 1 & 3 sh 3 (1-3) * (1/4) = -0.50 -0.50 T|H 1 & 3 sh 1 (3-3) * (1/4) = 0.00 -0.50 HT|T 3 & 9 sh 9 (3-9) * (1/8) = -0.75 -1.25 HT|H 3 & 9 sh 3 (9-3) * (1/8) = 0.75 -0.50 HHT|T 9 & 27 sh 27 (9-27) * (1/16) = -1.125 -1.625 HHT|H 9 & 27 sh 9 (27-9) * (1/16) = 1.125 -0.50 HHHT|T 27 & 81 sh 81 (27-81)* (1/32) = -1.6875 -2.1875 HHHT|H 27 & 81 sh 27 (81-27)* (1/32) = 1.6875 -0.50 ...``` The relative EV of always switching is slightly worse. Seems counter-intuitive, but what is happening is that the always switch strategy (s1) has the possibility of selecting the slip with \$1 on it. This happens often and is the reason, that s1 is slightly worse. Otherwise it would be a dead heat. Note that s2 only switches, when the slip shows N = 1. The rest of the time, it stays with the original slip, so it can never select the slip with \$1 on it. I should add that the EV of both s1 and s2 approach infinity. The Relative EV shows that s2 is slightly faster in its approach to infinity, but in theory, it is a tie.
Your simulation is calculating the EV for each T (number of tails flipped before seeing a heads) and then comparing those EV's at each T and getting EV(switch | T) - EV(stay | T) = 0. Now try calculating the EV for each N (number observed on the paper) using a monte carlo simulation and you will get an entirely different answer!! You will get EV(switch | N) - EV(stay |N) = 2/9N for any N > 1.

For example. Imagine you are playing this game and you draw your first slip of paper and it has a 9 on it. And you say to your self "I wonder if I should switch." So you go write a monte carlo simulation that plays the game a million times and whenever it sees a 9 it tries the switching vs staying strategies and accumulates the results of each strategy. The result of that simulation will tell you to switch.

the variance of your first simulation was terrible I think because EV(switch) - EV(stay) for the game is an infinite sum that diverges.

also see my post #49 where I am contemplating two monte carlo simulations.

http://forumserver.twoplustwo.com/sh...4&postcount=49

Last edited by bobf; 06-25-2012 at 08:54 AM.

06-25-2012, 09:35 AM   #67
grinder

Join Date: Feb 2008
Posts: 423
Re: Baffling Math Paradox

Quote:
 Originally Posted by Scouse Rob Method 2: 1/3 chance of increase when switching for any number of tails>1. Method 1: 1/4 chance of getting 0 tails and a 1 on the sheet (100% increase) 3/4 chance of getting >1 on the sheet (1/3 chance of increase for each of these) Total chance of increase with switch: 1/4 + (3/4 * 1/3) = 1/4 + 1/4 = 1/2 For both Methods the chance of an increase when switching is 1/3 when you have a number greater than 1 on the sheet. The 50% overall increase in Method 1 comes from the abundance of sheets with 1 on them. Rob
omg thank you. This is what happens when you are already a little confused and then think a new thought late at night. i forgot about the 1.

Do you agree that monte carlo simulations will give the following results?

1. EV(switch | T) - EV(stay | T) ---> 0 for all T
2. EV(switch | N) - EV(stay | N) ---> 2/9N for all N > 1, and 2 for N = 1
3. EV(switch) - EV(stay) for the game will not converge
and the apparent "discrepancy" between (1) and (2) is only possible because (3) diverges

T = number of tails flipped
N = number observed

Last edited by bobf; 06-25-2012 at 09:57 AM.

 06-25-2012, 10:40 AM #68 Carpal \'Tunnel     Join Date: Sep 2008 Location: central nj Posts: 7,682 Re: Baffling Math Paradox I'm a little lost, but are we not all in agreement that switching can't be better than staying? It would be absolutely ridiculous otherwise, so any math that leads you to believe switching is better is either incorrect or being misinterpreted. Half the time you initially pick the bigger number and half the time the smaller one, so after switching you'll end up with the smaller one half the time and the bigger one half the time, just like if you don't switch.
06-25-2012, 11:39 AM   #69
centurion

Join Date: Jul 2010
Location: Sheffield
Posts: 105
Re: Baffling Math Paradox

Quote:
 Originally Posted by bobf Do you agree that monte carlo simulations will give the following results? 1. EV(switch | T) - EV(stay | T) ---> 0 for all T 2. EV(switch | N) - EV(stay | N) ---> 2/9N for all N > 1, and 2 for N = 1 3. EV(switch) - EV(stay) for the game will not converge and the apparent "discrepancy" between (1) and (2) is only possible because (3) diverges T = number of tails flipped N = number observed
1) Yes assuming EV(switch | T) - EV(stay | T) = 0 - 0 = 0

2) Yes assuming EV(switch | N, N>1) = (1/3)(3N - N) + (2/3)( (N/3) - N)
= (1/3)(2N) - (2/3)(2N/3)
= 2N/9

3) I really am not sure. Sorry.

06-25-2012, 11:49 AM   #70
grinder

Join Date: Feb 2008
Posts: 423
Re: Baffling Math Paradox

Quote:
 Originally Posted by ganstaman I'm a little lost, but are we not all in agreement that switching can't be better than staying? It would be absolutely ridiculous otherwise, so any math that leads you to believe switching is better is either incorrect or being misinterpreted. Half the time you initially pick the bigger number and half the time the smaller one, so after switching you'll end up with the smaller one half the time and the bigger one half the time, just like if you don't switch.
I think I agree with this, but I'm a little fuzzy and not 100% confident on some aspects of the various results.

If believe that the EV if a single trial of game is infinite whether you switch or stay. I mean that for any value M you can name EV(switch) > M and EV(stay) > M for a single trial of this game. So does it even make sense to discuss which strategy is "better" from an EV standpoint?

Also, I'm not sure, but I tend to think that EV(switch) - EV(stay) for the game is undefined (as opposed to zero). In other words if we repeat the game many times with player A choosing a random slip and player B choosing the opposite slip and then we subtract those two numbers and accumulate and divide by the number of trials, we will not get a value that converges to 0. I suspect it will fluctuate all over the place.

06-25-2012, 12:02 PM   #71
centurion

Join Date: Jul 2010
Location: Sheffield
Posts: 105
Re: Baffling Math Paradox

Quote:
 Originally Posted by ganstaman I'm a little lost, but are we not all in agreement that switching can't be better than staying? It would be absolutely ridiculous otherwise, so any math that leads you to believe switching is better is either incorrect or being misinterpreted. Half the time you initially pick the bigger number and half the time the smaller one, so after switching you'll end up with the smaller one half the time and the bigger one half the time, just like if you don't switch.
But if you look at a sheet and see any number 3^T then you should switch to gain value.

This can be simulated any number of ways.
(I have made an excel file simulating 100000 trials with the first and second sheet distributed according to the rules of the game.)

Pressing F9 randomises so on the last trial:

When you get 1 the value from switching is 2
When you get 3 the value from switching was 0.64 (EV 0.67)
When you get 9 the value from switching was 2.05 (EV 2)
When you get 27 the value from switching was 6.22 (EV 6)
When you get 81 the value from switching was 17.81 (EV 18)
...
When you get 19683 the value from switching was 5423 (EV 4347)
...

Of course the higher the sheet number the less often it occurs in the trials and the further away from EV the result gets for that numbers switching value.

In theory for any possible sheet value you could simulate enough trials so that the calculated switching value converges to the EV, which is (2N/9).

This can easily be seen (for your own piece of mind) by considering the results for the smaller values in my excel file.
(Which merely confirm bobf's calculations given in posts above.)

Expected value of switching when you have 3^n, e(n), is (2)(3^(n-2)), n>0
e(0)=2

Probability of you getting 3^n on the sheet, p(n) is 3/(2^(n+2)), n>0
p(0)=1/4

This gives an expected value of the game over all possible sheet values of:

sum[n=0 to inf] (e(n)*p(n))

= (1/2) + (1/4)( sum[n=1 to inf] ((3/2)^(n-1)) )

Which is insane.

Better minds than my own can explain the paradox and have hinted at it above.

I think that it has something to do with the underlying distribution of possible sheet values over the infinite set and the corresponding conditional probabilities of the sheet values not equalling the expected probabilities of the sheet values.

Although I got a bit lost trying to follow the explanations.

Rob

 06-25-2012, 12:06 PM #72 grinder   Join Date: Feb 2008 Posts: 423 Re: Baffling Math Paradox Maybe there is a way to compare the strategies SWITCH vs STAY even though the EV's are infinite. Suppose we choose two values M and V. M is the number of game trials to play. V is some positive value that the players hope to attain. Then we compute the probability that player SWITCH will gain at least value V in M trials and we compute a similar probability for player STAY. It seems to me that these two probabilities will be equal for all values of M and V. So wouldn't that say the the two strategies are totally equal?
06-25-2012, 12:16 PM   #73
grinder

Join Date: Feb 2008
Posts: 423
Re: Baffling Math Paradox

Quote:
 Originally Posted by Scouse Rob I think that it has something to do with the underlying distribution of possible sheet values over the infinite set and the corresponding conditional probabilities of the sheet values not equalling the expected probabilities of the sheet values. Although I got a bit lost trying to follow the explanations. Rob
I think it has to do with the fact that we are taking a divergent infinite sum and grouping terms in two different ways. When you group by N you get EV=2/9N for each N. When you group by T you get EV=0 for each T. But this kind of effect is common with divergent infinite sums.

T = 0: N = 1 or N = 3: ev(switch from 1) = 2 ev(switch from 3) = -2 these cancel
T = 1: N = 3 or N = 9: ev(switch from 3) = 6 ev(switch from 9) = -6 these cancel
T = 2: N = 9 or N = 27: ev(switch from 9) = 18 ev(switch from 27) = -18 these cancel
etc.
they all cancel so we get a sum of zeros

but if you take the same series and combine the terms that have like N's you get...
ev(switch from 3) for T = 0 and T = 1 ---> you get a positive number
ev(switch from 9) for T = 1 and T = 2 ---> you get a positive number
etc.

Last edited by bobf; 06-25-2012 at 12:22 PM.

06-25-2012, 01:19 PM   #74

Join Date: Jan 2006
Posts: 701
Re: Baffling Math Paradox

Quote:
 Originally Posted by bobf Your simulation is calculating the EV for each T (number of tails flipped before seeing a heads) and then comparing those EV's at each T and getting EV(switch | T) - EV(stay | T) = 0. Now try calculating the EV for each N (number observed on the paper) using a monte carlo simulation and you will get an entirely different answer!! You will get EV(switch | N) - EV(stay |N) = 2/9N for any N > 1.
If I try your way, I am comparing apples and oranges. I am making the fairest comparison. I'm not using an MT algorithm, I am using an enumerative technique that eliminates variance.
Quote:
 For example. Imagine you are playing this game and you draw your first slip of paper and it has a 9 on it. And you say to your self "I wonder if I should switch." So you go write a monte carlo simulation that plays the game a million times and whenever it sees a 9 it tries the switching vs staying strategies and accumulates the results of each strategy. The result of that simulation will tell you to switch.
You are proposing I compare the 3rd and 6th row of the enumeration while ignoring the 4th and 5th row. Why do you think that is an improvement?
Quote:
 the variance of your first simulation was terrible I think because EV(switch) - EV(stay) for the game is an infinite sum that diverges.
It wasn't diverging. The Monte Carlo version, I ran for 10,000,000 iterations several times. Sometimes the result showed a largish net EV that was negative and sometimes it was positive. The result was getting dominated by a small number of trials with very large N.
Quote:
 also see my post #49 where I am contemplating two monte carlo simulations. http://forumserver.twoplustwo.com/sh...4&postcount=49
I already looked at your post. Both your methods ignore the N = 1 case.

Look at these 2 steps in your method 1:
Quote:
 Choose one at random and call that N Switch
If you choose them at random with a frequency of 50%, it does not matter if you switch. For example, to generate that 50% frequency, you must flip a coin and assign:
"show larger slip value" to heads
"show smaller slip value" to tails
Always switching is equivalent to the reassignment:
"show larger slip value" to tails
"show smaller slip value" to heads
and always staying. Yes?

Since there is no reason to prefer one method of assignment over another, you know that switching vs staying are equivalent. No need to run your MT sim. You already know the answer with zero variance.

Your method 2 has a built in selection bias.

06-25-2012, 01:28 PM   #75
grinder

Join Date: Mar 2011
Posts: 619
Re: Baffling Math Paradox

Quote:
 Originally Posted by Scouse Rob What if I was to give you a sheet with 3^N on it, N>1. If I told you that if you chose to gamble then I'd roll a fair dice and if it landed: 5 or 6 - I'd give you triple the amount on the sheet. 1, 2, 3 or 4 - I'd give you a third of the amount on the sheet. Or you could refuse the gamble and take the amount on the sheet. What would you do then? (Gamble surely.)
Yes, because 9+9+1+1+1+1 (22) > 3+3+3+3+3+3 (18). This should be "obvious" ... 1/3 of the time you are getting 3x as much, so for the gamble to be even the other 2/3 of the time you'd need to get 0.

This is not the same problem as OP, where (apart from when you get 1) it's a strict 50/50 (the difference would be if the distribution of flips was predetermined, and not random each time ... then you could act on the relative frequencies and what has happened in the past -- like counting cards in BJ).

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are Off Pingbacks are Off Refbacks are Off Forum Rules

All times are GMT -4. The time now is 11:04 PM.

 Contact Us - Two Plus Two Publishing LLC - Privacy Statement - Top