Math Detours · Grade 12 · Around the corner · 15

How much to bet

A favourable coin, repeated. Bet too much and you go broke; bet the Kelly fraction and your wealth grows fastest. The logarithm decides.

Name ____________________Date ____________

Tonight's idea

A coin lands heads with probability \(p > \tfrac12\) and pays even money: stake something, get it back doubled on heads, lose it on tails. What fraction \(f\) of your wealth should you stake each time?

Staking everything is fatal: one tail and you are out, and tails come. Staking nothing earns nothing. In between, after \(H\) heads and \(T\) tails your wealth is \(W_0(1+f)^H(1-f)^T\). Wealth multiplies, so take logs and it adds:

\[\ln\frac{W_N}{W_0} = H\ln(1+f) + T\ln(1-f).\]

Over many rounds \(H/N \to p\) and \(T/N \to 1-p\), so the log of your wealth grows at a steady rate per round,

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

That is the thing to maximise. Differentiate and set to zero:

\[g'(f) = \frac{p}{1+f} - \frac{1-p}{1-f} = 0 \iff p(1-f) = (1-p)(1+f) \iff f = 2p - 1.\]

\(g''(f) = -\dfrac{p}{(1+f)^2} - \dfrac{1-p}{(1-f)^2} \lt 0\), so this is the maximum. \(f^* = 2p-1\) is the Kelly fraction: your edge, \(p - (1-p)\). For \(p = 0.6\), stake 20%. Stake more and \(g\) falls; past a point it turns negative, and a gambler with a real edge goes broke.

0.1 0.2 0.3 0.4 f 0.02 0 −0.02 Kelly: f = 2p − 1 = 0.2 g = 0 near f = 0.39 g(f), p = 0.6
The growth rate for \(p = 0.6\). Maximum at \(f = 0.2\); negative beyond about \(0.39\).

Watch one: \(p = 0.6\), one hundred rounds

Expect 60 heads and 40 tails. Multiply the factors. \(f = 0.2\): \(1.2^{60}\times 0.8^{40} = 7.5\). \(f = 0.1\): \(1.1^{60}\times 0.9^{40} = 4.5\). \(f = 0.5\): \(1.5^{60}\times 0.5^{40} = 0.033\).

Kelly turns 1 into 7.5; half Kelly manages 4.5; betting half your stack each time, with a 60% coin, loses 97% of it. The rate \(g(0.2) = 0.6\ln 1.2 + 0.4\ln 0.8 = 0.0201\) per round, and \(e^{100 \times 0.0201} = 7.5\): the formula and the brute-force product agree.

Twenty gamblers, a thousand rounds, and a slider for \(f\): mathdetours.com/demos/kelly.html.

Your turn

  1. \(p = 0.55\). Find the Kelly fraction and \(g\) at it, to four decimal places. Then compute \(g(0.2)\), double Kelly, and say what happens to that gambler in the long run.
  2. For \(p = 0.6\) compute \(g(0.1)\), \(g(0.3)\) and \(g(0.4)\). Between which two of \(0.3\), \(0.4\), \(0.5\) does the growth rate cross zero? What do you notice about \(g(0.1)\) and \(g(0.3)\)?
  3. Now the bet pays odds \(b\): win \(b\) per unit staked, or lose the stake. Write down \(g(f)\), show the best fraction is \(f^* = p - \dfrac{1-p}{b}\), check it gives \(2p-1\) when \(b = 1\), and evaluate it for a fair coin paying 3 to 1.
  4. Expected wealth after one round is \(W_0\big(p(1+f) + (1-p)(1-f)\big)\). (a) Simplify, and show it is largest at \(f = 1\). (b) For \(p = 0.6\) and \(N = 10\) rounds at \(f = 1\), find the expected wealth factor and the probability of not being broke. (c) Reconcile (b) with \(g(1) = -\infty\): what is the mean measuring that a typical gambler never sees?

Stretch: half Kelly

Use \(\ln(1+u) \approx u - u^2/2\) to show \(g(f) \approx (2p-1)f - f^2/2\). Find the maximum value, then show that betting half the Kelly fraction keeps three quarters of the growth rate. Check against the exact \(g(0.1)/g(0.2)\) for \(p = 0.6\).

Answers

  1. \(f^* = 0.1\); \(g(0.1) = 0.55\ln 1.1 + 0.45\ln 0.9 = 0.0050\) per round. \(g(0.2) = -0.0001\): slightly negative, so the double-Kelly gambler drifts to ruin despite the edge. For a small edge, double Kelly is roughly break-even.
  2. \(g(0.1) = 0.0150\), \(g(0.3) = 0.0147\), \(g(0.4) = -0.0024\). Zero lies between \(0.3\) and \(0.4\) (at \(f \approx 0.39\)). \(g(0.1)\) and \(g(0.3)\) are nearly equal: the curve is close to symmetric about \(0.2\), a parabola near its top.
  3. \(g(f) = p\ln(1+bf) + (1-p)\ln(1-f)\). \(g' = \dfrac{bp}{1+bf} - \dfrac{1-p}{1-f} = 0\) gives \(bp(1-f) = (1-p)(1+bf)\), so \(f(bp + b(1-p)) = bp - (1-p)\) and \(f^* = p - \dfrac{1-p}{b}\). With \(b = 1\): \(2p - 1\). Fair coin, \(b = 3\): \(f^* = \tfrac12 - \tfrac{1}{6} = \tfrac13\).
  4. (a) \(W_0\big(1 + (2p-1)f\big)\), increasing in \(f\) when \(p > \tfrac12\), so largest at \(f = 1\). (b) \(1.2^{10} = 6.19\); survive with probability \(0.6^{10} = 0.006\). (c) The mean is 6.19 because one path in 165 reaches \(2^{10} = 1024\) and the rest are at zero. The mean is pulled up by a path almost nobody is on. \(g\) measures the growth of the typical path, which is what one gambler, playing once through, experiences.

Stretch. \(g(f) \approx p\big(f - \tfrac{f^2}{2}\big) + (1-p)\big(-f - \tfrac{f^2}{2}\big) = (2p-1)f - \tfrac{f^2}{2}\). Maximum at \(f^* = 2p-1\), value \(\tfrac{(2p-1)^2}{2}\). At \(f^*/2\): \(\tfrac{(2p-1)^2}{2} - \tfrac{(2p-1)^2}{8} = \tfrac34 \cdot \tfrac{(2p-1)^2}{2}\). Half the stake, three quarters of the growth, and far smaller swings. Exact, \(p = 0.6\): \(0.0150/0.0201 = 0.747\).

← PreviousNext: Fourier coefficients by integration →