Kelly Criterion — Cheatsheet Derivation

Kelly Criterion — Cheatsheet Derivation


Step 1 One Period Expectancy

E = pBq

where p = win probability, q = 1−p = loss probability, B = net odds (win B per unit staked, lose 1).

Why: Weighted average of outcomes. Win B with probability p, lose 1 with probability q.


Step 2 Per-Flip Wealth Multipliers

Bet fraction f of current wealth W:

  • Win: W₁ = W(1+Bf)
  • Lose: W₁ = W(1−f)

Why: You keep the unbet portion W(1−f) regardless. On a win you collect B times your stake Wf on top. On a loss your stake Wf is gone.


Step 3 Wealth After n Flips

After h wins and (nh) losses:

Wₙ = W₀(1+Bf)h(1−f)nh

Why: The flips compound — each one rescales whatever the previous left. That means multiply, not add. Order doesn’t matter, only h and nh.


Step 4 Per-Flip Growth Rate G

Take the nth root of total growth to extract the per-period rate:

G = (Wₙ/W₀)1/n = (1+Bf)h/n · (1−f)(nh)/n

As n → ∞, law of large numbers: h/np, (nh)/nq.

G = (1+Bf)p(1−f)q

Why nth root: Same logic as extracting r from (1+r)n = total growth. Geometric mean, not arithmetic, because the process is multiplicative.


Step 5 Take ln Before Differentiating

Define g = ln(G). Since ln is monotonically increasing, maximizing g gives the same f* as maximizing G.

Apply two log rules:

  • ln(AB) = ln(A) + ln(B)  →  product becomes sum
  • ln(Ap) = p·ln(A)  →  exponent drops to coefficient
g = p·ln(1+Bf) + q·ln(1−f)

Why: Differentiating a product of powers is a mess. A sum of logs is trivial. Valid because ln is monotone — same maximum, easier math.


Step 6 Differentiate and Set to Zero

Rule: ddx[ln(x)] = 1x. Chain rule: multiply by derivative of the inside.

  • ddf[p·ln(1+Bf)] = pB1+Bf  ← chain rule gives B from inside (1+Bf)
  • ddf[q·ln(1−f)] = −q1−f  ← chain rule gives −1 from inside (1−f)

Set dg/df = 0:

pB1+Bfq1−f = 0

Step 7 Solve for f*

Cross-multiply:

pB(1−f) = q(1+Bf)

Expand:

pBpBf = q + qBf

Collect f terms:

pBq = pBf + qBf = Bf(p+q)

Since p+q = 1:

f* = pBqB = pqB

The Answer

f* = pBqB

Read as: edge / odds

  • Numerator pBq is your expected profit per unit bet
  • Denominator B scales it by the odds

Special case B=1 (even money): f* = pq

Your optimal bet equals your raw edge.


Key Insights

What Why it matters
Multiplicative wealth function One bad bet can’t be offset by other bets — sizing matters
Geometric mean not arithmetic Compounding processes need per-period rates, not averages
ln transform Turns product into sum without moving the maximum
Chain rule on ln(1−f) The −1 derivative is what creates a finite optimum
p+q=1 The simplification that closes the algebra cleanly

Leave a Reply