Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VBA code: Parrondo Paradox in Game Theory?

76 views
Skip to first unread message

Peter Jamieson

unread,
Aug 21, 2000, 3:00:00 AM8/21/00
to
G'day NG,
Anyone know if VBA code has been posted to simulate this interesting paradox
on a spreadsheet?
The paradox has received attention in Nature recently courtesy of a paper of
Harmer and Abbott and is as follows.
Game A: You toss a coin that is slightly biased against you.....you win $1
with probability say 0.495 and lose $1 with probability 0.505 so that in
time your nett bankroll will decline.
Game B: You play a little more complicated affair using two coins whose
biases are different and the coin you use is dependant on some factor such
as your bankroll.
If your bankroll is a multiple of three you toss a heavily biased coin with
which you win $1 with probability 0.095 and lose $1 with probability 0.905.
If your bankroll is not a multiple of three the coin you toss is biased in
your favour so that you win $1 with probability 0.745 and lose $1 with
probability 0.255.
Game A played alone is a losing game for you.
Game B played alone is also a losing game for you.
But......!!...if game A and B are played in random order or played
alternately then on average you win!
This is the very counter-intuitive paradox discovered by Spanish physicist
Juan Parrondo.
Any takers to codify a simulation?
Cheers, Peter J.

Alan E

unread,
Aug 21, 2000, 3:00:00 AM8/21/00
to
Peter,

You could simulate this game without any VBA code as follows:

Column A: current bankroll = some start value for first row, start value
from one row up plus winnings (column E) from one row up for all other rows.

Column B: formula to randomly select game =if(RAND()<.5,"a","b")

Column C: formula to determine if bankroll is divisible by 3: =mod(A1,3)
will return 0 of value in A1 is divisible by 3

Column D: random number =RAND()

Column E: calculate winnings with this formula:

=IF(B1="A",1*(D1<0.495)-1*(D1>0.495),IF(C1=0,1*(D1<0.095)-1*(D1>0.095),1*(D1
<0.745)-1*(D1>0.745)))

Copy these formulas down for a whole bunch of rows and see what the running
bankroll is.


Peter Jamieson wrote in message ...

Alan E

unread,
Aug 21, 2000, 3:00:00 AM8/21/00
to
Why do you say that game B is a losing game? The expected payoff = .095 x
0.33333 - .905 x .33333 + .745 x 0.66667 - .0.255 x .66667 = 0.05667.


Peter Jamieson <ldo...@bigpond.net.au> wrote in message
news:Ycfo5.7798$Xg.7...@news-server.bigpond.net.au...

David J. Braden

unread,
Aug 21, 2000, 3:00:00 AM8/21/00
to
Whew, nice one!

As I recall, it was also a way they devised for a shsking plstform to move an
object uphill, *but* the ratios were such that they were from a small set of
integer-valued multiples. I only saw a second-hand report; is there an on-line
version of this that bests what I read in the Wall Street Journal, because it
seems really, really cool. Also, does the bank have infinitely deep pockets? If
not, we might get into a St.Petersburg paradox were we to adjust the
probabilities to *exactly* 1/2.

Thanks, Peter, for the post.

Dave Braden

listless MVP-Excel trying to avoid some chores in the garage.

Alan E

unread,
Aug 22, 2000, 3:00:00 AM8/22/00
to
Here's why the combination of game A and B wins on average, while the games
lose on average by themselves:

On first inspection, one would expect game B by itself to win on average,
assuming that the bankroll is divisible by 3 33.333% of the time. But
what tends to happen is when the bankroll is divisible by 3, the heavily
negatively biased coin is used resulting more often than not in a $1 loss.
The next game, the bankroll is not divisible by 3, so the heavily positively
biased coin is used resulting more often than not in a $1 gain, bring the
bankroll back to a value divisible by 3. This pattern repeats itself so
often that when game B is played by itself, the bankroll is divisible by 3
approximately 38% of the time, making game B a loser on average.

However, when game A is thrown into the mix, the pattern described above
gets interrupted, so that the likelihood of the bankroll being divisible by
3 returns to approximately 33%, at which game B wins often enough to offset
the slightly negative bias of Game A.


Peter Jamieson

unread,
Aug 22, 2000, 3:00:00 AM8/22/00
to
G'day Alan,
Nice isn't it!
Thanks for your nice formula and input!
The state of the bankroll affects the probabilities and can act as a
temporary lock or "ratchett".
There is a great deal of interest in the application of this strange
counter-intuitive result in many areas.
Several refs you may like:
http://www.eleceng.adelaide.edu.au/Personal/gpharmer/games/ps.htm
http://helix.nature.com/nsu/991223/991223-13.html
http://www.maa.org/mathland/mathtrek_3_6_00.html
http://www.ams.org/new-in-math/01-2000-media.html
An analogy for the "ratchett" effect is: shake the muesli
jar before pouring to get all the biggest nuts and fruit to rise!
Sometimes it gets the fancy title "Differential Grain Dispersion"!
I once saw an explanation along these line to account for how the massive
Easter Island heads were raised but did not believe it.
Cheers, Peter J.

"Alan E" <alane...@email.com> wrote in message
news:39a288b9$1...@news6.fast.net...

0 new messages