What not knowing the coin costs
Worth reading first: The best average is the worst bet · Evidence measured in decibans.
A coin that lands heads with probability 0.6 pays even money, and the essay on Kelly’s rule settled how much of one’s wealth to stake on it: the fraction , a fifth. That fraction maximises the expected logarithm of wealth, which is the growth rate a bettor who reinvests actually experiences, and it is eventually ahead of every other fixed fraction with probability one.
The rule has one input, and it is the one thing no real bettor is given. A card counter estimates the edge from the cards seen, an investor from past returns, a gambler from the coin’s history. Each of them stakes a fraction computed from an estimate, and the question this essay is about is what the estimate costs — how much growth is lost by not knowing , and what a bettor who has to learn the coin should do differently from one who already knows it.
The run in the figure is an ordinary one. The bettor who knows ends with about . The bettor who guessed once watched twenty tosses, saw fifteen heads, estimated as 0.75 and has staked half its wealth on every toss since. On a coin whose real chance is 0.6, that fraction has a growth rate of , about a toss, and after two thousand tosses the wealth is near . Nothing went wrong with the coin. The estimate was off by an amount twenty tosses make entirely ordinary, and staking it was ruinous.
The third bettor never commits to an estimate. Before each toss it recomputes the chance of heads from everything seen so far and stakes accordingly, and it ends about thirty times poorer than the bettor who knew — a factor of 33 out of a factor of . The rest of this essay is about why that bettor does so well, and why its shortfall has an exact formula.
An estimate from m tosses costs half of one over m
Start with the simplest way of not knowing. A bettor watches tosses, counts heads, estimates , and from then on stakes . Its growth rate per toss is , a random quantity because is, and its expected value over the possible counts can be computed exactly by summing over the binomial distribution.
For small samples the expected growth is negative, and strongly so: the estimate is often far too large, and the growth curve falls much faster on the overbetting side than on the timid side. The curves cross nought near , and tosses for edges , and . After that they climb towards the growth of the bettor who knew, and the shortfall, once is moderately large, is very nearly a toss — the same for every edge.
That number has a two-line explanation. Near its peak the growth rate is a parabola, , with curvature at Kelly’s fraction. The estimated fraction misses by a random amount of variance , because and the variance of is . The expected loss is half the curvature times the variance, and the factors cancel exactly:
So a bettor pays half of one over the sample size, in nats a toss, whatever coin it is facing. Against that, the prize is about for an edge , which is the small-edge form of the growth rate. The prize exceeds the cost only when , so a bettor needs to have seen about one over the edge squared tosses before staking its estimate is better than staking nothing at all. With a one per cent edge, that is ten thousand tosses of homework before the first bet. It is the same balance of a signal against its own noise that decides how far a sum strays from its average, read here as a growth rate.
Half Kelly is a statement about the standard error
The figure suggests a remedy that practitioners arrived at long before anyone did the sum: stake less than the estimate says. If a bettor stakes a multiple of the estimated fraction, the same parabola gives an expected growth of about , and the best multiple is
Found by a direct search over with the growth computed exactly, the optima for sixteen combinations of edge and sample size lie on that curve to within a few hundredths. Full Kelly is right only in the limit of a perfect estimate. Half Kelly is right at — that is, when one standard error of the estimated edge, , is as large as the edge itself. At ten tosses of a coin with a ten per cent edge the right stake is about a tenth of the estimate; at 2,500 tosses it is 96 per cent of it.
This turns a rule of thumb into a measurement. “Bet half Kelly” was the practical advice in the essay on Kelly’s rule, justified there by the smaller drawdowns it buys; here the same advice falls out of a quite different argument, as the right response to an estimate that is uncertain by as much as it is large. The formula is the familiar shape of shrinkage — the signal’s variance over the signal’s plus the noise’s — that appears whenever a noisy estimate is pulled toward a safe value, and it is what a Bayesian with a prior centred on no edge, of variance , would compute as the posterior mean.
The difficulty is that contains , the quantity being estimated. A bettor who knew how large the edge was would not need to shrink. The way out of the circle is to stop treating the estimate as something to be computed once and then trusted.
Learning while betting
The third bettor of the first figure does exactly that. Before each toss it has seen heads and tails, and it estimates the chance of heads by Laplace’s rule of succession,
which is the posterior mean of for a bettor whose prior made every value from nought to one equally likely — the rule that updating by Bayes’ theorem gives for a uniform start. It stakes , which is a stake on tails whenever the estimate falls below a half. A head then multiplies its wealth by , and a tail by .
Wealth is again a product of random factors, and its growth is set by the logarithms of the factors rather than by any one of them. Multiply those factors along a run and something exact happens. After tosses with heads and tails, the numerators collect into and whatever order the heads and tails came in, and the denominators into . The learner’s wealth is
It depends on the run only through the number of heads. That already says something odd: a learner that saw all its heads first and all its tails afterwards, and so spent a long stretch staking heavily on the wrong side, ends with exactly the same wealth as one that saw them interleaved.
The learner holds every fixed bet at once
The formula has a second reading, and it is the heart of the matter.
A bettor that staked a fixed throughout ends with . Average that over every from nought to one:
which is Euler’s beta integral, and which is . The bettor who learns by Laplace’s rule ends with exactly the average of the wealths of all the bettors who committed to one fraction in advance. Equivalently: split the starting stake into infinitely many equal slivers, give each sliver to a different fixed-fraction bettor, never move money between them — and the total at the end is what the learner has. The figure checks it numerically, integrating the curve to within one part in a million of the closed form.
Thomas Cover found this construction in 1991 for portfolios of many assets, and called the resulting strategy universal: it needs no knowledge of the market, and its wealth is the average of the wealths of all constant-proportion portfolios. For a single coin the average is dominated by the fractions near the peak of the curve, so the learner’s wealth is the peak — the best fixed fraction in hindsight — times the width of the peak. The width is what learning costs.
The same picture says why the guess-once bettor did so badly. It put the whole sliver on one value of , chosen from twenty tosses, and that value sat far down the right side of the curve. The learner hedged across every value of and so was guaranteed to have some money on the right one.
The cost of learning is a logarithm
The shortfall against hindsight has an exact formula too. The best fixed fraction after the fact is , which ends with , so the learner falls behind by
with the entropy of the observed share of heads, in nats. Stirling’s estimate of the factorials turns that into about .
Two numbers frame the whole result. On a typical run the learner falls behind hindsight by about half the logarithm of the number of tosses: 3.25 nats at a thousand tosses of the 0.6 coin, 5.55 at a hundred thousand, which is a factor of about 260. On the worst run imaginable, all heads, the hindsight bettor stakes everything on heads and doubles every time, while the learner, cautious at the start, ends with : a factor of exactly behind, and never more. Neither number grows anything like .
That is the decisive point. The learner’s shortfall per toss is about , which goes to nought, so its long-run growth rate is the growth rate of the best fixed fraction — and for an independent coin that is Kelly’s rate with the true . The bettor who knew has an advantage that grows only like a logarithm, while its own wealth grows exponentially. On the run in the first figure the gap was 1.5 orders of magnitude out of 19.
The coin matters to the constant and not to the rate. A more lopsided coin — chance 0.9 — sits half a nat higher, because is smaller and the peak of the wealth curve is narrower, so the average over captures less of it. A bettor learning a nearly certain coin pays slightly more for its ignorance than one learning a nearly fair one, in exchange for a much larger prize.
There is a standard improvement, due to Raphail Krichevsky and Victor Trofimov: add a half instead of one to the counts, which is the posterior mean under the prior with density proportional to . It loses at most plus less than one nat, even on the worst run, and no strategy can guarantee better than plus a constant against every sequence. That half a logarithm is a law of nature for this game: it is the price of locating one unknown number to within its own standard error, and it is the same half logarithm per unknown parameter that Jorma Rissanen proved in 1984 any compressor must pay for not knowing the source it is compressing. Following the empirical frequencies with a little caution added is also what a player who best-replies to the past does in a game, and the half logarithm is what that caution costs when the opponent is a coin.
Facing a fair coin, the learner pays the square root
The worst coin for a learner is the one with nothing to learn.
On a fair coin the right stake is nought, and a bettor who knew that would keep its one unit of wealth for ever. The learner’s estimate is almost never exactly a half, so it always stakes something, on whichever side the coin has happened to favour so far, and on a fair coin that is a bet with no edge and a negative growth rate. At an even split its wealth is , which by Stirling is close to : about an eighth after a hundred tosses and a two-hundred-and-fiftieth after a hundred thousand, with the median run doing a little better than that, at about a seventh and a two-hundredth.
Strangely, the even split is the learner’s worst outcome on a fair coin, and the median run sits just above it. Any imbalance between heads and tails, even an imbalance produced by pure chance, is something the learner partly bets on and partly profits from. It is the overfitting of a model to noise, written as money: the learner treats the fluctuation as signal, and against a fair coin every fluctuation is noise, but the fluctuations it has already seen are, by construction, the ones it bet on.
So the price of learning cuts in both directions. Against a coin with an edge, the learner loses a slowly growing factor and gains an exponentially growing one. Against a coin with none, there is nothing to gain and the same slowly growing factor to lose. A bettor uncertain whether any edge exists at all can put part of its wealth with the learner and keep part in reserve, and the arithmetic of mixtures says exactly what that costs — the same arithmetic as peeking at a test until it says yes, where a Bayes factor kept its guarantee under any stopping rule for the same reason, being a likelihood averaged over a prior.
Why averaging beats estimating
The two bettors who did not know in the first figure behaved very differently, and the difference was not cleverness. The plug-in bettor answered the question what is ? and then acted as if the answer were exact. The learner never answered that question; it kept a weighted vote over every possible , and the weights were updated by the evidence exactly as evidence measured in decibans accumulates — multiplicatively, toss by toss.
In wealth, the multiplication is literal. A fixed-fraction bettor’s wealth at the end is the likelihood of the observed sequence under its , scaled by , so a sliver of money placed on grows in exact proportion to how well explains the data. Splitting the money among all the and letting each sliver grow is Bayesian updating with dollars as the probabilities, and the learner’s posterior-mean stake is just the bet that the whole portfolio of slivers would make if it were pooled. This is why the learner’s wealth equals the marginal likelihood of the data — the same quantity a Bayes factor is a ratio of — and why a bettor and a statistician who never discuss betting end up computing the same integral. Divided by the wealth of a bettor who stakes nothing, which is one, the learner’s is exactly the uniform-prior Bayes factor against a fair coin that the essay on peeking watched toss by toss: its wealth is evidence, and the fair coin’s figure above is that Bayes factor’s slow decline under the null, seen from the gambler’s side.
It also explains when the plug-in approach is harmless. With large, the posterior is concentrated — it piles up on the true the way a posterior always piles up on the best available hypothesis — the slivers that matter all sit near the true , and committing to the estimate costs almost nothing. With near one or below, the posterior is wide, and acting on its centre ignores most of what is known — namely, how little is known.
What the computations assume
Every number here is for the cleanest version of the problem: a single coin, the same coin on every toss, even money, tosses independent of one another. The exact formulas — the loss to second order, the shrinkage factor, the beta integral, the worst case — are statements about that model, and the simulations only illustrate them.
Real edges drift, and a learner that weights a thousand old tosses as heavily as the last ten will be slow to notice when the coin changes. Cover’s construction does extend beyond the coin: for a portfolio of assets the universal strategy falls behind the best constant-proportion portfolio in hindsight by about , half a logarithm per free parameter, against any sequence of returns at all — no randomness assumed. That is a strong guarantee and a modest benchmark, because the best constant portfolio in hindsight can be a poor strategy when the world does not hold still.
And the figures cannot show that maximising the logarithm is right for a given person. That argument was had in the essay on Kelly’s rule and is not reopened here; the claim of this essay is narrower. Given that a bettor wants Kelly’s growth, not knowing the coin costs a factor of about if the bettor learns sensibly, and can cost everything if it does not.
Still open: the right prior for a moving edge
What should a bettor do when the edge changes over time? For a fixed coin the answer is settled: the Krichevsky–Trofimov mixture is within a constant of the best guarantee any strategy can make against every sequence. For an edge that switches between values at unknown times, there are mixtures over switching strategies — the fixed-share and related methods of Mark Herbster and Manfred Warmuth — that track the best sequence of fractions with a penalty growing with the number of switches, and they are known to be nearly optimal in the worst case. What is not settled is the choice between them when the edge drifts gradually rather than jumping, or when the bettor has partial knowledge of how fast it drifts, and how the best achievable shortfall depends on the drift’s size is known only in special models. The worst-case theory and the Bayesian theory agree on the fixed coin and part company as soon as the coin is allowed to move, and which of them a bettor should trust on a real, slowly changing edge is a question about the world as much as about mathematics.
Hedge across the coins
A bettor who does not know the coin should not bet as if it did. Staking an estimate costs a toss and turns negative below about tosses, which is why the estimated stake should be shrunk by — half Kelly exactly when the standard error equals the edge. Learning toss by toss with Laplace’s rule does better than any single estimate, because it is the same as holding every fixed fraction at once: its wealth is , it falls behind hindsight by about and never by more than , and on a fair coin it pays a factor of about for looking for an edge that is not there.
What links here
Computed from the collection, not written here: the essays that point at this one.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- One coin, counted by runs and by wakings — both name bayes' theorem, expectation, law of large numbers
- A majority wiser than its members — both name bayes' theorem, law of large numbers
- A wait that ends and has no average — both name expectation, law of large numbers
- Almost none of the roots are real — both name expectation, logarithm
- The average settles and the wobble does not — both name expectation, law of large numbers
- The envelope that always looks better — both name bayes' theorem, expectation
Named objects
A dashed tag is an object no other essay names yet.
Bayes' theoremBeta distributionEstimatorExpectationLaw of large numbersLogarithmStirling approximation