paradox #15
In this lesson

Wide tables, equations, and code scroll sideways. Swipe, or Tab to focus them and use the left and right arrow keys.

Parrondo’s paradox

You will learn: Explain a winning mixture by computing the capital-state weights of each policy.

Start with: Markov chains

Game A loses on average when played repeatedly. Game B also loses in the long run. Yet choosing randomly between them can produce a positive long-run average gain. The missing detail is that B’s winning probability depends on your current capital. Switching games changes how often you visit its unfavorable states.

This is an explicit token game with no bankruptcy boundary. Each play changes integer capital by plus or minus one, and negative capital is allowed. The experiment compares exact expected capital with illustrative sample paths, so a lucky realization cannot stand in for a long-run calculation.

Inspect the games and their mixture

A wins with probability 0.495000. B wins with probability 0.095000 at multiples of three, and 0.745000 otherwise. A win adds one token; a loss subtracts one. Negative capital is allowed.

Exact expected capital under three play policies−2−1012020406080100plays completedexpected capital

Solid: A only. Long dashes: B only. Dots: random mixture. These are exact finite-horizon expectations, not three sample paths.

PolicyLong-run mean gain per playExpected capital at capOne sample's final capital
A only-0.01000000-1.0000000020
B only-0.00869529-1.39232017-4
Random mixture0.015704231.287327256

Where the mixture spends time

Capital modulo 3Mixture win probabilityB-only stationary weightMixture stationary weightMixture weight at cap
00.29500000.38361180.34507040.3450704
10.62000000.15428060.25410800.2541080
20.62000000.46210770.40082160.4008216
One sampled mixed-game capital path0510020406080100plays completedsampled capital
Inspect mixed-game decisions
PlayCapital beforeResidueGameWin probabilityOutcome
100A0.4950000Win
211B0.7450000Loss
300A0.4950000Loss
4-12A0.4950000Loss
5-21A0.4950000Loss
6-30A0.4950000Win
7-21B0.7450000Win
8-12B0.7450000Win
900A0.4950000Win
1011B0.7450000Win
1122B0.7450000Win
1230A0.4950000Loss
1322B0.7450000Win
1430B0.0950000Loss
1522B0.7450000Loss
1611B0.7450000Win
1722B0.7450000Win
1830A0.4950000Loss
1922A0.4950000Win
2030B0.0950000Loss
2122A0.4950000Win
2230A0.4950000Win
2341B0.7450000Win
2452B0.7450000Loss
2541A0.4950000Win
2652B0.7450000Win
2760A0.4950000Win
2871B0.7450000Win
2982B0.7450000Win
3090B0.0950000Win
31101B0.7450000Loss
3290A0.4950000Win
33101B0.7450000Loss
3490B0.0950000Loss
3582A0.4950000Win
3690A0.4950000Loss
3782A0.4950000Win
3890A0.4950000Win
39101B0.7450000Win
40112B0.7450000Loss
41101B0.7450000Win
42112B0.7450000Win
43120B0.0950000Loss
44112A0.4950000Loss
45101A0.4950000Loss
4690B0.0950000Loss
4782A0.4950000Loss
4871A0.4950000Win
4982A0.4950000Loss
5071B0.7450000Win
5182A0.4950000Win
5290B0.0950000Loss
5382B0.7450000Loss
5471A0.4950000Loss
5560B0.0950000Loss
5652A0.4950000Win
5760A0.4950000Win
5871B0.7450000Win
5982A0.4950000Win
6090A0.4950000Win
61101A0.4950000Loss
6290A0.4950000Loss
6382A0.4950000Win
6490A0.4950000Win
65101A0.4950000Win
66112B0.7450000Loss
67101A0.4950000Win
68112A0.4950000Win
69120A0.4950000Loss
70112A0.4950000Loss
71101A0.4950000Win
72112B0.7450000Win
73120B0.0950000Loss
74112A0.4950000Win
75120B0.0950000Loss
76112A0.4950000Win
77120A0.4950000Loss
78112B0.7450000Win
79120B0.0950000Loss
80112B0.7450000Win
81120A0.4950000Win
82131A0.4950000Loss
83120B0.0950000Loss
84112B0.7450000Win
85120B0.0950000Loss
86112A0.4950000Win
87120B0.0950000Loss
88112A0.4950000Win
89120B0.0950000Loss
90112B0.7450000Win
91120A0.4950000Win
92131A0.4950000Loss
93120B0.0950000Loss
94112B0.7450000Loss
95101B0.7450000Loss
9690B0.0950000Loss
9782A0.4950000Win
9890B0.0950000Loss
9982A0.4950000Loss
10071B0.7450000Loss
Choose A independently at each play with probability gamma, otherwise B. Game choice is independent of current capital, but B's win probability depends on its residue. The seeded paths share random numbers for comparison; increasing the cap preserves their past. This is a specified token game, not a model of an investment.

Game A wins with probability 1/2 − ε. Game B wins with probability 1/10 − ε when capital is divisible by three, and 3/4 − ε otherwise. A win adds one token and a loss subtracts one. At each mixed-game play, choose A with probability γ and B otherwise, independently of current capital and previous choices.

The default ε = 0.005 gives A win probability 0.495. B’s two probabilities are 0.095 and 0.745. The allowed bias range keeps every coin probability valid. Set γ to one or zero to recover the individual games exactly. The mixed policy uses random switching, not a hidden state-dependent choice of which game to play.

Follow the capital modulo three

Only the residue of capital modulo three is needed to calculate the next win probability. The three states are zero, one, and two, with negative capital classified consistently: minus one belongs to residue two. A win moves residue i to i + 1 modulo three; a loss moves it to i − 1 modulo three.

For mixture γ, let pᵢ be the effective win probability in residue i. It is γ(1/2 − ε) plus (1 − γ) times B’s relevant probability. Starting from the chosen capital, the calculation propagates the three state probabilities. At each play it adds Σqᵢ(2pᵢ − 1) to expected capital, where qᵢ is the current state probability. This gives the finite-horizon mean without sampling paths.

The stationary state weights solve πP = π and sum to one. Weighting each state’s expected gain by these stationary probabilities gives long-run drift. This calculation accounts for how the game visits its own states; averaging B’s two coin probabilities equally would not.

What changes under switching

With the default parameters, B alone spends about 0.383612 of its stationary time at residue zero. Its long-run drift is about −0.00869529 tokens per play. A’s drift is exactly −0.01. In the half-A, half-B mixture, the stationary weight at residue zero falls to about 0.345070, and the effective win probabilities become 0.295 there and 0.62 elsewhere. The resulting drift is about +0.01570423.

The mixed gain is not the average of the two separate games’ long-run gains. Those gains use different stationary state weights. A changes the routes through capital space and therefore changes the opportunities B encounters. B contains favorable states even though its own overall long-run drift is negative.

At one hundred plays from zero capital, the exact means are −1 for A, about −1.392320 for B, and +1.287327 for the mixture. These differ from drift multiplied by one hundred because the initial state distribution need not be stationary. A has constant expected gain in every state, so it has no such transient correction.

A path can tell a different short story

For the default seed, A’s sample ends at +20 despite its negative expected gain. The mixed path ends at +6, while B ends at −4. These outcomes illustrate fluctuation; the plotted expectation curves do not fit themselves to those samples. Changing the seed changes the paths while retaining the theoretical means and drifts.

Make a prediction

If two games each have negative conditional expected gain in every possible state, can random mixing of them create a positive conditional gain?

Explore the answer

No. A mixture of two negative conditional gains is still negative. Parrondo’s construction works because B has favorable states and switching changes their long-run weights.

Increasing ε can remove the winning mixture, and γ at either endpoint returns to a single game. The phenomenon is not a theorem that any combination of losing games must win. Harmer and Abbott’s original account introduces this construction; their Statistical Science treatment develops the game analysis. Continue to Markov chains to study stationary weights directly.

Reset all settings