Probability

The best average is the worst bet

A coin lands heads six times in ten and pays even money. Stake everything on every toss and the expected wealth grows by a fifth a toss — and the bettor is ruined at the first tail, which is certain to come. Stake a fifth of wealth each time instead and the average grows far more slowly, while the typical bettor grows faster than with any other fraction. The expectation is maximised by the strategy almost nobody should use.

Worth reading first: A wait that ends and has no average · A growth rate no step contains.

A coin lands heads with probability 0.6. At each toss a bettor may stake any part of their wealth on heads at even money: win and the stake is doubled, lose and it is gone. The offer is a thousand tosses. How much should be staked each time?

The arithmetic of expectation gives a clear answer. A stake of ss wins ss with probability 0.6 and loses ss with probability 0.4, so its expected gain is 0.2s0.2s — positive, and larger the larger the stake. To maximise expected wealth, bet everything on every toss. After nn tosses the expected wealth is 1.2n1.2^n, which after a thousand tosses is a number with eighty digits.

Four fractions staked on one run of tosses. p=0.6, 1000 tosses, 604 heads; final log10 wealth: Kelly 9.449, half Kelly 6.881, twice Kelly 0.409, everything ruined at toss 10.
Fig. 1 One sequence of a thousand tosses with probability 0.6 of heads, betting four fixed fractions of current wealth on heads each time, wealth on a logarithmic scale.

The bettor who stakes everything doubles their wealth at each head and loses all of it at the first tail. On the sequence in the figure the first tail comes at the tenth toss; the chance that it has not come by the thousandth is 0.610000.6^{1000}, about 10−22210^{-222}. Every bettor who follows the strategy that maximises the expectation is ruined, with probability one, and the expectation is still 1.210001.2^{1000}. All of it sits on the single sequence of a thousand heads.

This is the sharpest form of a lesson that runs through the study of expectation: an average can be infinite while the typical value is small, and here an average grows without bound while the typical value is nought. The right quantity to maximise, for a bettor who bets repeatedly, is not the expected wealth but the expected logarithm of wealth, and the fraction that does it — John Kelly’s of 1956 — is 2p−12p - 1, a fifth of current wealth.

Wealth is a product, so its logarithm is a sum

Bet a fixed fraction ff of current wealth on every toss. A head multiplies wealth by 1+f1 + f, a tail by 1−f1 - f, and after nn tosses with HH heads the wealth is

Wn=(1+f)H(1−f)n−H.W_n = (1 + f)^H (1 - f)^{n - H}.

That is a product of independent random factors, and its logarithm is a sum of independent random terms. The law of large numbers applies to the sum: 1nln⁡Wn\tfrac1n \ln W_n converges, with probability one, to the expected value of a single term,

g(f)=pln⁡(1+f)+(1−p)ln⁡(1−f).g(f) = p \ln(1 + f) + (1 - p) \ln(1 - f).

So almost every run grows like eng(f)e^{n g(f)}, and gg — the expected logarithm, not the logarithm of the expectation — is the growth rate the bettor actually experiences. It is the same mechanism as in a sequence that adds or subtracts by the toss of a coin: products of random factors grow at a rate set by the average of their logarithms, and that rate is contained in no single step.

The growth rate peaks at Kelly's fraction. p=0.6: f=0.20, g=0.020136, zero-growth fraction 0.38939; simulated 0.05:0.00873 0.10:0.01498 0.15:0.01876 0.20:0.02001 0.25:0.01866 0.30:0.01456 0.35:0.00753 0.40:-0.00270 0.45:-0.01649 0.50:-0.03431 0.55:-0.05682.
Fig. 2 The long-run growth rate per toss against the fraction staked, for a coin with probability 0.6 at even money, with the rates realised over one run of 20,000 tosses.

The growth rate is zero at f=0f = 0, rises to a maximum, and falls. Setting its derivative to nought, p/(1+f)=(1−p)/(1−f)p/(1 + f) = (1 - p)/(1 - f), gives f∗=2p−1f^* = 2p - 1, the edge itself: bet the fraction of wealth equal to the amount by which the chance of winning exceeds the chance of losing. At p=0.6p = 0.6 that is 0.2, and the growth rate there is 0.0201 a toss — wealth multiplies by about 1.0203 per toss in the long run, doubling roughly every thirty-five tosses.

Beyond the maximum the growth falls quickly. At f=0.389f = 0.389 it is zero, and above that it is negative: a bettor who has the edge on every single toss, and bets more than 39 per cent of their wealth each time, sees that wealth shrink towards nothing with probability one. The realised rates over twenty thousand tosses lie on the curve within a few thousandths. Nothing about this depends on luck; it is the law of large numbers applied to logarithms.

The average and the typical part company

The expected wealth and the typical wealth are both exact functions of the fraction, and they disagree about everything.

The average and the typical wealth part company. p=0.6, after 200 tosses: log10 mean f=1: 15.84, f=0.6: 9.84, f=0.2: 3.41; log10 median f=0.6: -7.34, f=0.2: 1.75.
Fig. 3 The expected wealth and the median wealth after up to 200 tosses, for fractions 1, 0.6 and 0.2, on a logarithmic scale.

The expectation is (1+f(2p−1))n(1 + f(2p - 1))^n, increasing in ff: after 200 tosses it is about 101610^{16} at f=1f = 1, 101010^{10} at f=0.6f = 0.6 and 103.410^{3.4} at Kelly’s 0.2. The median, computed exactly from the median number of heads, runs the other way. At Kelly’s fraction it is about 101.7510^{1.75} after 200 tosses, at f=0.6f = 0.6 it has fallen to 10−7.310^{-7.3}, and at f=1f = 1 it is nought from the second toss on.

The gap is the one the envelope paradox exploits and St Petersburg’s game made famous. An expectation over a product is dominated by its luckiest outcomes, because a product amplifies them. At f=0.6f = 0.6, a run of heads multiplies wealth by 1.6 a toss and a run of tails by 0.4; the expectation counts the long runs of heads at their full multiplied value, and they are rare enough that the typical run never sees one.

Which one to maximise is not a matter of mathematics alone. A bettor offered a single toss, or one who is risk-neutral about a small fraction of their wealth, may reasonably maximise the expectation. A bettor who will bet again and again with the proceeds, and cares about where they will be rather than about an average over imaginary copies of themselves, is maximising the typical outcome, and that is the logarithm.

Kelly is eventually ahead of every rival

The growth rate is a statement about the limit. Over a finite run, a bolder fraction can be ahead.

How often Kelly is ahead. vs 0.1: 10:0.647 20:0.599 50:0.682 100:0.711 200:0.756 500:0.863 1000:0.944 2000:0.987 5000:1.000; vs 0.3: 10:0.619 20:0.581 50:0.649 100:0.679 200:0.776 500:0.863 1000:0.942 2000:0.989 5000:1.000; vs 0.35: 10:0.619 20:0.581 50:0.649 100:0.752 200:0.856 500:0.964 1000:0.992 2000:1.000 5000:1.000.
Fig. 4 The share of 2,000 runs on which a bettor staking Kelly’s fraction 0.2 is richer after n tosses than a rival staking 0.1, 0.3 or 0.35 on the same tosses.

Run Kelly against a rival on the same tosses, and record how often Kelly is richer. After ten tosses it is ahead on about 62 to 65 per cent of runs — only a little more than half, because a bolder bettor gains more from a lucky start and a more timid one loses less from an unlucky one. After a hundred tosses it is ahead on 68 to 75 per cent; after a thousand, on 94 to 99 per cent; after five thousand, on every run in the sample.

Leo Breiman proved in 1961 that this is general: for any strategy that is essentially different from Kelly’s — whose long-run growth rate is lower — the ratio of Kelly’s wealth to the rival’s tends to infinity with probability one, and Kelly’s strategy reaches any fixed target wealth in the shortest expected time. The rivals closest to Kelly take longest to fall behind, because their growth rates are closest: 0.1 and 0.3 sit symmetrically on either side of 0.2 and are overtaken at the same pace, 0.35 a little faster.

Why the pace is so slow follows from the growth rates. Over nn tosses the difference between the logarithms of Kelly’s wealth and a rival’s is a sum of nn independent terms with mean n(g(f∗)−g(f))n(g(f^*) - g(f)) and spread of order n\sqrt n. Against the rival at 0.3 the mean difference is about 0.0054 a toss and the spread of a single term about 0.105, so the accumulated mean exceeds twice the accumulated spread only after about 1,500 tosses — which is where the figure’s curves close in on one. A rival that is close to Kelly is beaten in the end with certainty, but the end can be very far off, and over any horizon a person actually bets for, a fraction near Kelly’s is as good as Kelly’s.

That is the sense in which Kelly’s fraction is best. It does not maximise any finite-horizon expectation, and it is not ahead on every run. It is the strategy that, given enough tosses, is ahead of any other with probability approaching one.

The price is the size of the dips

Kelly’s strategy grows fastest, and it is a rough ride.

How far Kelly falls before it rises. c=1: 0.8:0.7645 0.5:0.4900 0.3:0.2970 0.2:0.2005 0.1:0.0970 0.05:0.0445; c=0.5: 0.8:0.4725 0.5:0.1150 0.3:0.0275 0.2:0.0055 0.1:0.0005 0.05:0.0000.
Fig. 5 The share of 2,000 runs of 10,000 tosses, with probability 0.55 of heads, on which wealth ever fell to a fraction x of its starting value, for Kelly and for half Kelly, on logarithmic scales.

Over 2,000 runs with a smaller edge, p=0.55p = 0.55 and Kelly’s fraction 0.1, wealth fell to half its starting value at some point on 49 per cent of runs, to a fifth on 20 per cent and to a tenth on 9.7 per cent. The chance of ever falling to a fraction xx of the start is about xx, and that is a theorem in the continuous-time limit, independent of the size of the edge: a Kelly bettor falls to half their stake about half the time.

Halving the fraction changes this dramatically. Half Kelly’s growth rate is three quarters of Kelly’s — the growth curve is flat at its top, so a small step back from the maximum costs little — but its chance of ever falling to xx is about x3x^3: 11.5 per cent of runs fell to half, 0.55 per cent to a fifth, and one run in two thousand to a tenth. In general, staking cc times Kelly’s fraction gives a growth rate of c(2−c)c(2 - c) times Kelly’s and a chance of about x2/c−1x^{2/c - 1} of falling to xx. Twice Kelly has a growth rate of nought, and a chance of one of eventually falling as far as anyone cares to name.

This is why people who use the rule in practice — Edward Thorp at the blackjack table and later in his fund, and many after him — tend to bet a fraction of Kelly. The other reason is that the edge is never known exactly. Overestimate pp and the fraction is too large, and the growth curve falls faster on the high side than on the low; betting a fraction of the estimated Kelly stake is insurance against the estimate.

A growth rate that is an information rate

Kelly did not publish his rule as a betting system. His paper of 1956 was called A new interpretation of information rate, and it was about a gambler receiving tips over a noisy channel.

Kelly's growth rate is an information rate. g*(p) = ln 2 − H(p): 0.51: 0.000200, 0.55: 0.005008, 0.6: 0.020136, 0.75: 0.130812, 0.9: 0.368064, 0.99: 0.637146.
Fig. 6 The best growth rate per toss, in nats, for an even-money bet on a coin with probability p of heads, against p, with the small-edge approximation half the square of the edge.

At Kelly’s fraction the growth rate is

g(f∗)=pln⁡(2p)+(1−p)ln⁡(2(1−p))=ln⁡2−H(p),g(f^*) = p \ln(2p) + (1 - p) \ln(2(1 - p)) = \ln 2 - H(p),

where H(p)=−pln⁡p−(1−p)ln⁡(1−p)H(p) = -p \ln p - (1 - p) \ln(1 - p) is the coin’s entropy. Read the coin as a tip that is right with probability pp, and ln⁡2−H(p)\ln 2 - H(p) is exactly the capacity of the channel carrying it — the rate at which the tip conveys information about the outcome. A perfect tip, p=1p = 1, conveys ln⁡2\ln 2 per toss and doubles the wealth each time; a useless one, p=12p = \tfrac12, conveys nothing and earns nothing.

For a small edge the growth rate is about half the square of the edge: at p=0.55p = 0.55 it is 0.0050 a toss, and at p=0.51p = 0.51 — a one per cent edge — it is 0.0002. A gambler with a one per cent edge, betting optimally, doubles their money in about 3,500 tosses. Evidence measured in decibans adds up the same way, as logarithms of likelihood ratios, and that is not a coincidence. With several outcomes and any odds, Kelly’s rule says to divide wealth among the outcomes in proportion to one’s own probabilities for them, and the growth rate is then the amount by which one’s probabilities beat the odds the house has posted, measured in the same logarithmic units as evidence — so a bettor’s growth is a score of how much better their model of the coin is than the house’s.

Unequal odds, and a demon that profits from noise

The even-money coin is the simplest case of a general rule. If a bet pays bb to 1 and wins with probability pp, the growth rate of staking a fraction ff is pln⁡(1+bf)+(1−p)ln⁡(1−f)p \ln(1 + bf) + (1 - p)\ln(1 - f), and its maximum is at

f∗=bp−(1−p)b,f^* = \frac{bp - (1 - p)}{b},

the expected gain per unit staked divided by the payout — edge over odds, as the rule is usually remembered. A bet with no edge gets nothing; a long shot with a small edge gets a small stake even though its expected gain per unit is large, because the payout that makes it attractive also makes the losses frequent. When several outcomes are available at once — a horse race — the rule becomes: spread the wealth across the horses in proportion to one’s own probabilities for them, and keep back whatever the track’s take makes unprofitable.

The same calculation produces a result that looks like a paradox. Take an asset that, each period, either doubles or halves with equal probability. Its expected value grows by a quarter a period, but its median goes nowhere: the growth rate of holding it is 12ln⁡2+12ln⁡12=0\tfrac12 \ln 2 + \tfrac12 \ln \tfrac12 = 0. Now hold half of one’s wealth in the asset and half in cash, and rebalance to half and half after every period. Each period the wealth is multiplied by 1.51.5 or 0.750.75, and the growth rate is 12ln⁡1.5+12ln⁡0.75=12ln⁡1.125≈0.059\tfrac12 \ln 1.5 + \tfrac12 \ln 0.75 = \tfrac12 \ln 1.125 \approx 0.059 — positive, from combining an asset that does not grow with cash that does not grow. Claude Shannon is said to have lectured on it, and it is sometimes called Shannon’s demon. It is the same arithmetic as two losing games that win when alternated: a fixed fraction sells after rises and buys after falls, and that converts volatility into growth whenever the logarithm, rather than the mean, is what compounds.

Ruin, and what ruin is not

A fixed fraction can never be completely ruined: 1−f1 - f is positive, so wealth stays positive after any sequence. The ruin in this essay is wealth tending to nought, not reaching it. That is different from the classical gambler’s ruin, where a bettor staking a fixed amount hits nought in finite time — and for a fixed amount on a favourable coin, the ruin probability starting from capital kk is (q/p)k(q/p)^k, positive however large the capital.

Kelly’s proportional betting escapes that by shrinking the stake as the wealth shrinks. It cannot be wiped out, and it pays for the safety by betting less after losses, which is also what makes its growth rate a property of the logarithm. The all-in bettor of the first figure is the one case in which a proportional bettor can hit nought, because 1−f=01 - f = 0.

What the simulations show and what they assume

Every figure here is for the simplest case — a single even-money bet repeated with a known probability. Kelly’s rule extends to unequal odds, where the fraction is the edge divided by the odds, to several simultaneous bets, where it becomes a concave optimisation over portfolios, and to continuous time, where it becomes the growth-optimal portfolio of a stock and a bond; in each case it maximises the expected logarithm. The drawdown law x2/c−1x^{2/c - 1} is exact for the continuous-time version, and the discrete runs in the figure match it to within sampling error.

The thing the figures cannot settle is whether maximising the logarithm is what a particular person should do. Paul Samuelson argued for decades that it is not, that a bettor with a different attitude to risk should maximise a different function of wealth, and he was right that nothing forces the logarithm on someone who cares about a fixed horizon. What the figures do show is what the logarithm buys — the fastest growth of the typical outcome, eventual dominance of every other fixed fraction — and what the expectation costs.

Still open: how much to trust an estimate

How should a bettor size their stakes when the probability is estimated rather than known? Betting the Kelly fraction for an estimated edge overbets whenever the estimate is high, and the growth curve punishes overbetting more than underbetting. Fractional Kelly is the practical answer, but which fraction is optimal depends on the estimate’s uncertainty in a way that has precise answers only in special models; for a general sequence of bets with estimated, changing edges, the right generalisation of Kelly’s rule — one that is optimal for the outcomes a bettor actually faces rather than for a model of them — is not settled, and the theory of universal portfolios, which competes with the best fixed portfolio in hindsight, gives guarantees only up to a factor polynomial in the number of rounds.

Maximise the logarithm

When wealth is reinvested, it is a product of random factors, and its logarithm is a sum that the law of large numbers controls. The fraction that maximises the expected logarithm, Kelly’s 2p−12p - 1, grows the typical bettor faster than any other and is eventually ahead of every rival, while the strategy that maximises the expectation — stake everything — is ruined with certainty. The growth it buys is ln⁡2−H(p)\ln 2 - H(p), an information rate, and its price is a fall to half the starting wealth about half the time, which half Kelly reduces to an eighth.

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.

EntropyExpectationGamblers ruinLaw of large numbersLogarithmMedianRandom walk