Probability

Two losing games that win together

Game A is a coin that wins 49.5% of the time. Game B tosses a bad coin when the capital is a multiple of three and a good one otherwise, and it loses too, because the capital spends more than a third of its time on multiples of three. Choose between the two games at random and the walk drifts upwards by 0.0157 a round; play A, B, B over and over and it gains 0.0574. Nothing is wrong with the arithmetic. The losing coin A wins by knocking the capital off the bad remainder.

Worth reading first: Two barriers and a fair game · A walk that samples a distribution.

Every walk in these essays so far has had the same rule at every step. A walk that always comes home stepped left or right with equal chances wherever it stood, two barriers and a fair game added walls but kept the coin the same, and a walk that follows its own footsteps let the coin depend on the walk’s history but in a way that treated every position alike. When the step’s distribution is the same everywhere, the drift is a single number, and a walk with negative drift loses: given enough steps, its expected position falls without limit, and so does its actual position, almost surely.

Let the coin depend on where the walk stands, and that single number disappears. The walk’s drift is then an average of the drifts at the places it visits, weighted by how often it visits them, and how often it visits them depends on the coins. Juan Parrondo, a physicist in Madrid, noticed in 1996 that this makes possible something that looks impossible: two games that each lose when played on their own, and that win when played together. The figures below compute his games exactly. Nothing is simulated, because the whole effect lives in a three-state Markov chain.

Two losing games that win together. A alone: -3.000 after 300; B alone: -3.131 after 300; A or B at random: 4.428 after 300; A A B B repeated: 4.322 after 300.
Fig. 1 The expected capital, starting from nothing, over 300 rounds of game A (a coin winning with probability 0.495), game B (a coin winning with probability 0.095 when the capital is a multiple of three and 0.745 otherwise), a fair coin choosing which game to play each round, and the cycle A, A, B, B — computed exactly, not by simulation. A loses a hundredth of a unit a round and B nearly as much; chosen at random they win +0.0148+0.0148 a round, and the cycle +0.0144+0.0144.

Two games, each a loser

Game A is a coin that wins with probability 12−ε\tfrac12 - \varepsilon. With ε=0.005\varepsilon = 0.005, as Gregory Harmer and Derek Abbott chose it when they published the paradox in 1999, the coin wins 49.5% of the time and the player loses a hundredth of a unit a round on average. Game B uses two coins, and which one it tosses depends on the player’s current capital. If the capital is a multiple of three, it tosses a bad coin that wins with probability 110−ε\tfrac{1}{10} - \varepsilon. Otherwise it tosses a good coin that wins with probability 34−ε\tfrac34 - \varepsilon.

Game B looks as though it should win. Two remainders out of three use the good coin, and the good coin’s advantage of a quarter is large; a naive average, two-thirds of +0.49+0.49 and one third of −0.81-0.81, comes to +0.057+0.057. It loses anyway, and the hero figure shows it losing almost as fast as A: −3.13-3.13 after 300 rounds against A’s −3.00-3.00. Then the figure shows the paradox. A fair coin choosing between A and B each round produces a capital that climbs steadily, +4.43+4.43 after 300 rounds, and so does the fixed cycle A, A, B, B, at +4.32+4.32.

The capital is computed in expectation, from its remainder on division by three. The remainder is all that game B looks at, and it changes by one up or down with each round, so the remainder alone is a Markov chain on three states, 00, 11 and 22, whose transition probabilities depend on which game is played. The expected gain in each round is the probability of each remainder times the gain of the coin used there, and the probabilities of the remainders after any sequence of games are found by multiplying three-by-three matrices. There is no sampling error anywhere in these figures.

Why B loses: the bad coin is played too often

The naive average assumed the capital spends a third of its time on each remainder. It does not.

B loses by landing on its bad coin too often. B alone, ε = 0: 0.3846, 0.1538, 0.4615; B alone, ε = 0.005: 0.3836, 0.1543, 0.4621; A or B at random: 0.3451, 0.2541, 0.4008.
Fig. 2 The long-run share of rounds on which the capital leaves each remainder on division by three, for game B alone with ε=0\varepsilon = 0 and ε=0.005\varepsilon = 0.005, and for a fair coin choosing between A and B each round. Alone, B spends 5/13=0.38465/13 = 0.3846 of its time on the bad coin at ε=0\varepsilon = 0, exactly enough to make it fair; mixing in A pulls that share down to 0.3450.345.

The good coin pushes the capital up, and pushing up from remainder 2 lands it on a multiple of three — on the bad coin. The bad coin then pushes it down nine times in ten, back to remainder 2, where the good coin pushes it up again. The capital rattles between a multiple of three and the value just below it, and spends far more than a third of its time on the bad remainder. The long-run shares follow from the balance equations of the three-state chain. At ε=0\varepsilon = 0 they are 5/135/13, 2/132/13 and 6/136/13, and the gain is

513 (2×0.1−1)+813 (2×0.75−1)=513(−0.8)+813(0.5)=0.\tfrac{5}{13}\,(2 \times 0.1 - 1) + \tfrac{8}{13}\,(2 \times 0.75 - 1) = \tfrac{5}{13}(-0.8) + \tfrac{8}{13}(0.5) = 0.

Game B with no handicap is exactly fair, and the fairness is a balance: the bad coin is played just often enough to cancel the good coin’s advantage. Any handicap ε>0\varepsilon > 0 tips the balance, and at ε=0.005\varepsilon = 0.005 game B loses 0.00870.0087 a round.

Now mix in A. Game A’s coin does not look at the remainder; it moves the capital up or down nearly at random, and in doing so it breaks the rattle. A capital sitting at remainder 2, about to be pushed onto the bad coin, may instead be moved by A to remainder 1, or onto the multiple of three from which B would have pushed it down — and from remainder 1 the good coin pushes it to remainder 2, not to the bad coin. With A played half the time, the share of rounds spent on the bad remainder falls from 0.3840.384 to 0.3450.345, and B’s good coin is played often enough to outweigh both B’s bad coin and A’s slight disadvantage. A loses on every round it is played, and still wins the game by changing where B is played.

How big a handicap the mixture can carry

The paradox would be a curiosity if it lived only at one value of ε\varepsilon. It does not.

A handicap the mixture can carry, up to a point. ε=0.000: A 0.0000, B -0.0000, mix 0.0254; ε=0.002: A -0.0040, B -0.0035, mix 0.0215; ε=0.004: A -0.0080, B -0.0070, mix 0.0176; ε=0.006: A -0.0120, B -0.0104, mix 0.0138; ε=0.008: A -0.0160, B -0.0139, mix 0.0099; ε=0.010: A -0.0200, B -0.0174, mix 0.0060; ε=0.012: A -0.0240, B -0.0209, mix 0.0021; ε=0.014: A -0.0280, B -0.0243, mix -0.0017; ε=0.016: A -0.0320, B -0.0278, mix -0.0056; ε=0.018: A -0.0360, B -0.0313, mix -0.0095; ε=0.020: A -0.0400, B -0.0347, mix -0.0133; threshold 0.01311.
Fig. 3 The long-run gain per round of game A, of game B and of a fair coin choosing between them, against the handicap ε\varepsilon subtracted from every coin’s chance of winning. At ε=0\varepsilon = 0 the mixture gains +0.0254+0.0254 a round; it keeps winning until ε\varepsilon reaches 0.01310.0131.

At ε=0\varepsilon = 0 games A and B are both exactly fair and the random mixture gains 0.02540.0254 a round. As the handicap grows, all three gains fall at roughly the same rate, and the mixture’s stays positive until ε=0.0131\varepsilon = 0.0131. Every coin in both games can be made more than one per cent worse than its starting value, both games then lose, and the mixture still wins. The effect is not a knife-edge; it is a margin of about a percentage point and a third on each coin.

How much A to play

A fair coin choosing between the games is one mixture among many. Play A with probability γ\gamma and B otherwise, and the combined game is again a walk whose coin depends on the remainder, with win probabilities that are the γ\gamma-weighted averages of the two games’ coins.

A little of the losing coin goes a long way. γ=0.0: -0.00870; γ=0.1: 0.00304; γ=0.2: 0.01080; γ=0.3: 0.01516; γ=0.4: 0.01663; γ=0.5: 0.01570; γ=0.6: 0.01282; γ=0.7: 0.00841; γ=0.8: 0.00288; γ=0.9: -0.00338; γ=1.0: -0.01000; best γ=0.41 0.01664; wins for γ in [0.08, 0.84].
Fig. 4 The long-run gain per round when each round plays game A with probability γ\gamma and game B otherwise, with ε=0.005\varepsilon = 0.005. Any γ\gamma from 0.080.08 to 0.840.84 wins; the best is γ=0.41\gamma = 0.41, gaining +0.0166+0.0166 a round.

The gain is a smooth hump. At γ=0\gamma = 0 the player plays only B and loses 0.00870.0087 a round; at γ=1\gamma = 1, only A, and loses 0.01000.0100. In between, every γ\gamma from 0.080.08 to 0.840.84 wins, and the best is γ=0.41\gamma = 0.41, at +0.0166+0.0166 a round. The shape says what A is for. A small amount of A is enough to break B’s rattle between the bad remainder and the one below it — playing A one round in twelve already turns the loss into a gain. Too much A means playing A’s slightly losing coin in rounds where B’s good coin would have been used, and past γ=0.84\gamma = 0.84 that cost wins. The game is not won by A’s coin, which never wins; it is won by A’s effect on the distribution of B’s states.

Which rhythms win

A random choice of game is not necessary. A fixed cycle also works, and the cycle’s rhythm matters a great deal.

Which rhythms of the two games win. A1B1: -0.00674; A1B2: 0.05743; A1B3: -0.00274; A1B4: 0.02964; A2B1: 0.00919; A2B2: 0.01465; A2B3: 0.00098; A2B4: 0.00574; A3B1: 0.00665; A3B2: 0.02014; A3B3: 0.00036; A3B4: 0.01087; A4B1: 0.00297; A4B2: 0.01077; A4B3: -0.00135; A4B4: 0.00499.
Fig. 5 The long-run gain per round of the cycle that plays game A aa times and then game B bb times, repeated forever, for aa and bb from 1 to 4, with ε=0.005\varepsilon = 0.005. The best is A B B at +0.0574+0.0574 a round, three and a half times the best random mixture; three of the sixteen still lose — A B, A BBB and AAAA BBB.

For a cycle the remainder’s distribution does not settle on a single stationary distribution, because the coins change from round to round; it settles on a distribution that repeats with the cycle, the stationary distribution of the product of one cycle’s transition matrices. The gain per round is then averaged over the cycle. Of the sixteen cycles with up to four plays of each game, thirteen win and three lose, and the pattern is irregular. The cycle A B B gains 0.05740.0574 a round, more than three times the best random mixture and as much as the naive average that wrongly predicted B alone would win. Plain alternation, A B, loses. So does A BBB, while AA BBB and A BBBB win.

Nothing in the coins announces which cycles are good. A B B has the same proportion of A as the random mixture at γ=13\gamma = \tfrac13, which gains 0.01590.0159 a round, and it gains three and a half times as much; A BBB has a quarter A, like a mixture that wins comfortably, and loses. What differs is how the cycle’s period lines up with the period three of the remainders, and that interaction is a property of the product of the matrices, not of any single game. It is why the table is irregular, and why a cycle chosen without computation can lose. The same computation — the stationary distribution of a product of matrices — appeared in a geometric series whose ratio is a matrix, and it is the natural tool whenever a walk’s rules repeat with a period.

The whole distribution, not just the mean

The figures so far follow the expected capital. The last one follows the full distribution of the capital after 200 rounds, computed exactly by tracking the probability of every capital from −201-201 to 201201 round by round.

Mixing fills the comb and shifts it. After 200 rounds: B mean -2.262, P(ahead) 0.3743; mixture mean 2.858, P(ahead) 0.5593.
Fig. 6 The exact chance of each capital after 200 rounds, for game B alone and for a fair coin choosing between A and B, with ε=0.005\varepsilon = 0.005. B’s distribution is a comb: capitals leaving remainder 1 on division by three hold only 15% of its probability. Mixing in A fills the comb, widens it from a standard deviation of 9.8 to 13.2, and moves it right by 5.1 units; the mixture is ahead with probability 55.9% against B’s 37.4%.

Game B’s distribution is a comb. Capitals leaving remainder 1 on division by three are scarce — 15% of the probability against the third an even spread would give — because the capital rattles between multiples of three and the values just below them and seldom gets past. The mixture fills the comb in: with A moving the capital at random half the time, all three remainders are visited, and the distribution is wider, with a standard deviation of 13.2 against B’s 9.8. It is also shifted to the right by 5.1 units. That shift is the whole of the paradox after 200 rounds, and it is modest beside the spread: a player using the mixture is ahead with probability 55.9%, against 37.4% for a player of B alone. The paradox is a real change in the long run, and over a few hundred rounds it is a tilt rather than a certainty.

Why switching cannot rescue a fair coin

It helps to see what the paradox needs by looking at a case where switching cannot work. Suppose both games were ordinary coins that ignored the capital — A winning with probability aa and B with probability bb, both below a half. Then every round, whichever game is played, has a negative expected gain, and any rule for choosing between them, however cunning, produces an expected capital that falls by at least the smaller of the two losses each round. Switching between fixed coins mixes their losses and nothing else. The same is true of fair coins: a gambler choosing between fair games by any rule that looks only at the past cannot change the expected capital, which is the content of the optional stopping theorem, and the reason two barriers and a fair game found the chance of ruin a straight line in the starting stake whatever happened along the way.

Game B escapes this because its loss is not a property of the coin tossed. In any round it tosses one of two coins, one losing badly and one winning well, and the expected gain of the round depends on which, and so on the capital. Each round of B can be a winning round, and on two remainders out of three it is. B’s long-run loss is a statement about the long-run frequencies of the remainders, which are not fixed by B’s coins alone but by every rule acting on the capital. A different rule acting in some rounds — A, or anything else that moves the capital without regard to its remainder — changes those frequencies, and with them the long-run gain of every B round.

It also matters how long the run is. Half the time is the rarest answer found that in a fair game of many rounds one side usually holds the lead for most of the time, so that a short stretch of play says almost nothing about which side the coin favours. The games here are close to fair coins on most rounds, and the same caution applies to them: the paradox is a statement about drift, a few hundredths of a unit a round, and over a few dozen rounds it is invisible beneath the walk’s own fluctuations. The last figure measured how much it shows after two hundred rounds, and it is a tilt in the odds rather than a guarantee.

What the paradox is and is not

The games are sometimes described as making money out of nothing, and it is worth being precise about why they do not. Game B is not a fixed bet; it is a rule that couples the bet to the capital, and the coupling is what makes its long-run gain depend on how the capital is distributed over the remainders. Changing that distribution changes the gain. Game A is a perfectly ordinary losing bet, but it is also a randomiser, and a randomiser changes the distribution. The mixture wins because B’s good coin is played more often; it does not win because two negative numbers have been added to make a positive one. The gain of a game that depends on the state is not a property of the game alone, and so the gains of two such games do not add.

The same principle is familiar from a walk that samples a distribution, where a walk’s long-run behaviour is set by its stationary distribution rather than by any single step, and from how long until it forgets, which measured how quickly a chain reaches that distribution. Here the chain reaches it within a few rounds — the remainder chain has only three states and mixes almost at once — which is why the expected capitals in the hero figure become straight lines after a brief wiggle.

Parrondo’s motivation was physical. A flashing ratchet is a particle diffusing in a sawtooth-shaped potential that is switched on and off: with the potential always on, the particle sits in a trough; with it always off, it diffuses symmetrically; switching between the two moves it steadily in one direction, because the asymmetric teeth catch it unevenly each time the potential returns. Game B is the sawtooth, its remainders the teeth, and game A the switched-off diffusion. Biological molecular motors are believed to use a mechanism of this kind to move along filaments, which is why the paradox attracted physicists and biologists as well as probabilists.

Still open: when mixing helps

For capital-dependent games like these, the question of when a mixture of losing games wins is a question about the stationary distributions of finite Markov chains, and it can always be settled by computation. What is missing is a structural answer: a condition, readable from the games’ coins, that says whether some mixture or some cycle will win, and how large the best gain can be. Partial answers exist for particular families, and the history-dependent versions Parrondo, Harmer and Abbott introduced in 2000, in which game B’s coin depends on the last two outcomes rather than on the capital, have their own conditions. A general theory of when switching between losing dynamics produces a gain, covering the discrete games, the physical ratchets and the models of population growth in which switching between two declining environments lets a population grow, is still being assembled.

There is also a cleaner open question in the figures themselves. The table of cycles is irregular, and nothing above predicts that A B B is the best of the sixteen, or that A BBB loses while A BBBB wins. Searching longer cycles finds better ones and worse ones, and whether the best cycle of a given length has a describable form — how its A rounds should be spaced relative to the period three of the remainders — has not been worked out. An urn forgets its start only below one half showed how a single eigenvalue ratio decides an urn’s long run; for Parrondo’s cycles the corresponding quantity is the top eigenvector of a product of matrices that changes with every change of rhythm, and no single number has been found that decides which rhythms win.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

DriftExpected valueMarkov chainParadoxPeriodicityRandom walkStationary distribution