Kelly Criterion — Cheatsheet Derivation
Step 1 One Period Expectancy
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 (n−h) losses:
Why: The flips compound — each one rescales whatever the previous left. That means multiply, not add. Order doesn’t matter, only h and n−h.
Step 4 Per-Flip Growth Rate G
Take the nth root of total growth to extract the per-period rate:
As n → ∞, law of large numbers: h/n → p, (n−h)/n → 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
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:
Step 7 Solve for f*
Cross-multiply:
Expand:
Collect f terms:
Since p+q = 1:
The Answer
Read as: edge / odds
- Numerator pB−q is your expected profit per unit bet
- Denominator B scales it by the odds
Special case B=1 (even money): f* = p−q
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 |
