Lesson 2.1: Probability, expected value and the Kelly idea
Learn expected value, variance and the law of large numbers, then the Kelly fraction: how much to bet when you have an edge, and why half Kelly is safer.
By the end of this lesson you will be able to work out the expected value and the spread of outcomes of a trade or a strategy, say why a high win rate says nothing about whether a strategy makes money, estimate how many trades it takes before a real edge shows through the noise, and use the Kelly fraction to choose how much of your capital to risk on an edge. You will show that a strategy that wins 55 per cent of the time at even odds has an edge of ₹100 per ₹1,000 risked but is still behind after 100 trades about one time in six, that the best fraction of capital to bet in that case is 10 per cent, and that betting double that fraction earns no growth at all. You should have read Module 1, especially Lesson 1.3 on returns and volatility. The mathematics is probabilities, averages, square roots and one natural logarithm. This course is education about how markets and research work, not investment advice.
Module 1 explained what a market is and how to measure what happens in it. This module supplies the mathematics that every later lesson uses. We begin with the oldest tool of the trade: probability. A trade is a bet on an uncertain outcome, and a trader's whole job is to take bets that are favourable and to size them so that the unfavourable runs do not end the career. Two questions follow. Is this bet worth taking? And how much should I put on it? The first is answered by expected value. The second, surprisingly, is answered by a different calculation, and getting it wrong ruins more good strategies than a bad signal ever does.
Expected value: the average outcome of a bet
A random variable is a quantity whose value depends on chance, such as the profit on the next trade. If it can take values x₁, x₂, ... with probabilities p₁, p₂, ... that add to one, its expected value, written E[X], is the probability-weighted average:
E[X] = p₁x₁ + p₂x₂ + ...
The expected value is what you would earn per trade on average if you could repeat the same bet a very large number of times. Take a simple strategy. On each trade you risk ₹1,000. With probability 55 per cent you win ₹1,000 and with probability 45 per cent you lose ₹1,000. Then
E[X] = 0.55 × 1,000 + 0.45 × (−1,000) = 550 − 450 = ₹100 per trade.
That ₹100 is the strategy's edge: the average profit per trade, before costs. A bet with a positive expected value is favourable, one with a negative expected value is unfavourable, and one with zero is fair.
Win rate is not edge
Traders love to quote a win rate, the fraction of trades that make money. It is the most quoted and least useful number in retail trading, because it ignores how much is won and how much is lost. Compare three illustrative strategies, each risking ₹1,000 as its worst case.
Strategy · Win probability · Average win · Average loss · Expected value per tradeA: even odds · 55% · ₹1,000 · ₹1,000 · 0.55 × 1,000 − 0.45 × 1,000 = +₹100
B: few wins, big wins · 40% · ₹3,000 · ₹1,000 · 0.40 × 3,000 − 0.60 × 1,000 = +₹600
C: many wins, rare disaster · 90% · ₹100 · ₹1,000 · 0.90 × 100 − 0.10 × 1,000 = −₹10
Strategy B loses six trades in ten, and it is the best of the three. Strategy C wins nine trades in ten, feels wonderful for months, and loses money. It is the shape of many "income" strategies that sell insurance against rare events: steady small premiums, then one large loss that takes back more than everything collected. A win rate means something only together with the size of the average win and the average loss. The right summary is the expected value per trade, or, for a trader who wants a ratio, the payoff ratio b, the average win divided by the average loss, together with the win probability p. The edge is then p × b − (1 − p) in units of the amount risked. For A it is 0.55 × 1 − 0.45 = 0.10, for B it is 0.40 × 3 − 0.60 = 0.60 and for C it is 0.90 × 0.1 − 0.10 = −0.01.
Predict first: a strategy wins 55 per cent of the time at even odds and has an edge of ₹100 per trade. After 100 trades, what is the probability that it is behind, with a total loss? Pick a number: nearly zero, about 5 per cent, about 15 per cent, or about 40 per cent. Then read on.
Variance, standard deviation and the law of large numbers
The expected value tells you where the average sits. The variance tells you how far individual outcomes stray from it. It is the expected squared distance from the mean:
Var(X) = E[X²] − (E[X])²
and the standard deviation σ is its square root, in the same units as X. For strategy A, each outcome is ₹1,000 in size, so E[X²] = 1,000,000 and Var = 1,000,000 − 100² = 990,000, which gives σ = ₹995 per trade. The standard deviation is almost ten times the edge. A single trade says nothing about whether the strategy works.
Across many independent trades, two facts combine. The mean of the total grows in proportion to the number of trades n, and, because variances of independent bets add, the standard deviation of the total grows only with the square root of n. This is the same square-root rule as Lesson 1.3 used to annualise volatility:
Total expected profit: n × E[X]
Total standard deviation: σ × √n
The ratio of the two, the z-score: z = n × E[X] ÷ (σ × √n) = (E[X] ÷ σ) × √n
This is the law of large numbers at work: as n grows, the mean of the total outruns its noise, and the average profit per trade, which has standard deviation σ ÷ √n, settles towards E[X]. But notice how slowly. For strategy A, E[X] ÷ σ = 100 ÷ 995 = 0.1005, so z = 0.1005 × √n.
After 10 trades: expected profit ₹1,000, standard deviation ₹3,146, z = 0.32. The probability of being behind is about 37.5 per cent.
After 100 trades: expected profit ₹10,000, standard deviation ₹9,950, z = 1.00. The probability of being behind is about 15.7 per cent. That answers the question above: about one time in six.
After 250 trades, about a year of daily trading: expected profit ₹25,000, standard deviation ₹15,732, z = 1.59, and still a 5.6 per cent chance of a loss.
After 1,000 trades: expected profit ₹100,000, standard deviation ₹31,464, z = 3.18, and the chance of being behind is 0.07 per cent.
The probability of being behind comes from the normal distribution: it is the chance that a normal variable falls more than z standard deviations below its mean. The sum of many independent trades is very close to normal by the central limit theorem, which Lesson 2.2 returns to. In short, a genuine edge of 10 per cent of the amount risked needs on the order of a thousand trades before it is clearly visible.
Now try your own numbers. Change the win probability and the sizes of the average win and loss, and watch how many trades it takes for the odds of being behind to fall.
Betting too much: expected value is not enough
If the edge is positive, you might think the answer to "how much should I bet?" is "as much as possible". It is not, and the reason is the most important idea of this lesson.
Suppose you can bet at even odds with a 55 per cent chance of winning, and you put all your capital on each bet. Each bet multiplies your wealth by 2 with probability 0.55 and by 0 with probability 0.45, so the expected multiplier per bet is 0.55 × 2 = 1.10. After ten bets the expected wealth is 1.10¹⁰ = 2.59 times what you started with. By the expected-value rule this is a wonderful strategy. But you survive ten bets only if you win all ten, with probability 0.55¹⁰ = 0.25 per cent. In 99.75 per cent of cases you are wiped out. The average is carried entirely by one outcome in four hundred, in which your wealth is 1,024 times the start.
The paradox is the same one as in Lesson 1.3: the arithmetic average of outcomes across many possible paths is not what a single investor experiences on one path. Wealth compounds, so what matters is the growth rate of wealth along a typical path, and that is determined by the average of the logarithm of the multiplier, not of the multiplier itself. A loss of 100 per cent is infinitely bad in logarithms, which is exactly why it must be avoided.
The Kelly criterion
In 1956 John Kelly, a physicist at Bell Labs, solved the problem of how much to bet. Suppose a bet wins with probability p and pays b units for every unit staked, and loses with probability q = 1 − p, losing the stake. You bet a fraction f of your capital each time. After a win, capital multiplies by 1 + bf, and after a loss by 1 − f. The expected logarithmic growth per bet is
g(f) = p ln(1 + bf) + q ln(1 − f)
The best fraction is the one that makes g as large as possible. Setting the derivative to zero, p × b ÷ (1 + bf) − q ÷ (1 − f) = 0, and solving gives the Kelly fraction:
f = (bp − q) ÷ b = p − q ÷ b
The numerator, bp − q, is the edge, and the denominator, b, is the payoff ratio. In words: bet your edge divided by the odds.
Worked example 1. The even-odds strategy has p = 0.55, q = 0.45 and b = 1. Then f = 0.55 − 0.45 = 0.10. Bet 10 per cent of capital each time. The growth per bet is g(0.10) = 0.55 × ln(1.10) + 0.45 × ln(0.90) = 0.55 × 0.09531 − 0.45 × 0.10536 = 0.05242 − 0.04741 = 0.00501, or 0.50 per cent per bet. At that rate, wealth doubles in ln 2 ÷ 0.00501 = 138 bets.
Worked example 2. Strategy B wins 40 per cent of the time and pays 3 to 1. Then f = 0.40 − 0.60 ÷ 3 = 0.40 − 0.20 = 0.20. The Kelly bet is 20 per cent of capital, and the growth per bet is 0.40 × ln(1.6) + 0.60 × ln(0.8) = 0.40 × 0.47000 − 0.60 × 0.22314 = 0.18800 − 0.13389 = 0.0541, or 5.4 per cent per bet. A losing streak of four trades takes 1 − 0.8⁴ = 59 per cent of the capital. This is why so few people can stomach full Kelly even when the maths is right.
Worked example 3. Strategy C has a negative edge, 0.9 × 0.1 − 0.1 = −0.01. The Kelly fraction is negative, which means: do not take this bet. If a bet has no edge, the right size is zero.
The shape of the growth curve
Look at how the growth rate depends on the fraction bet, for the even-odds strategy:
Fraction of capital bet · Growth per bet2% · 0.18%
5% (half Kelly) · 0.38%
10% (Kelly) · 0.50%
15% · 0.37%
20% (double Kelly) · −0.01%
25% · −0.67%
30% · −1.62%
50% · −8.89%
Three features matter. First, the curve is flat near the top: betting half of Kelly gives 0.38 per cent against 0.50 per cent, 75 per cent of the growth for half the bet, and with far smaller swings. Second, the curve is steeply asymmetric: betting twice the Kelly fraction gives growth of about zero. You take double the risk to earn nothing. Third, beyond double Kelly the growth is negative, so a trader who overbets will lose money on a strategy that has a genuine edge, and the more they bet, the faster.
Change the odds and the size of the bet below, and find the fraction at which growth is highest and the one at which it turns negative.
Kelly for a trader: leverage and the Sharpe ratio
Kelly's rule was derived for bets with two outcomes, but it has a continuous version that is more useful to a trader. Suppose a strategy earns an expected excess return μ per year with a volatility σ. If you invest a multiple f of your capital in it, using leverage when f is above one, the log growth rate of your wealth is, as Lesson 1.3 showed, the mean minus half the variance:
g(f) = fμ − f²σ² ÷ 2
Setting the derivative to zero gives
f = μ ÷ σ²
Take a strategy with an expected excess return of 8 per cent a year and a volatility of 16 per cent, a Sharpe ratio of 0.5. Then f = 0.08 ÷ 0.16² = 0.08 ÷ 0.0256 = 3.125, or about 3.1 times leverage. The growth rate at that leverage is 3.125 × 0.08 − 3.125² × 0.0256 ÷ 2 = 0.25 − 0.125 = 12.5 per cent a year, which equals half the square of the Sharpe ratio: 0.5² ÷ 2 = 0.125. The volatility of the levered position is 3.125 × 16 = 50 per cent a year, a figure few investors could tolerate.
Leverage f · Expected growth (% a year) · Volatility (% a year)1.0 · 6.7 · 16
1.56 (half Kelly) · 9.4 · 25
3.13 (full Kelly) · 12.5 · 50
6.25 (double Kelly) · 0.0 · 100
Half Kelly captures 75 per cent of the growth, 9.4 against 12.5, at half the volatility, and double Kelly again produces zero growth with 100 per cent volatility. The relation between growth and the Sharpe ratio, g\ = SR² ÷ 2, is worth remembering: it says that a strategy's long-run growth, when sized optimally, depends on nothing but its Sharpe ratio. That is why quants obsess over Sharpe ratios, which Lesson 4.2 covers.
Why practitioners use fractional Kelly
Full Kelly is a theoretical optimum that relies on knowing p and b, or μ and σ, exactly. In trading you never do. Lesson 1.3 showed that a mean return is estimated with a large standard error: after ten years of data, a true mean of 6 per cent a year is within one standard error of zero. If your estimate of the edge is twice the true edge, you will bet twice the Kelly fraction and, as the table shows, earn about nothing. Overestimating is far more costly than underestimating, because the growth curve falls off a cliff on the right and only slopes gently on the left. For that reason, professionals typically bet a fraction of Kelly, often between one quarter and one half, and treat the Kelly number as a ceiling.
Other reasons point the same way. Trades are rarely independent, so the real risk is larger than the formula assumes. Drawdowns under full Kelly are brutal: a rough rule says that you should expect, at some point, to see your capital halve. And an investor's tolerance for losses is finite, whereas the Kelly mathematics treats capital as endlessly divisible and the investor as endlessly patient.
Putting it into practice
1. Estimate the edge honestly, after costs. Use the edge net of the costs of Lesson 1.4. An edge of ₹100 a trade that costs ₹60 in spread and slippage is an edge of ₹40.
2. Compute the Kelly fraction as a ceiling, not a target. Use a quarter to a half of it.
3. Allow for the uncertainty in your estimate. If the edge is known only to within a factor of two, size for the lower end.
4. Treat a negative or zero edge as a stop sign. The correct bet is zero.
5. Count correlated bets as one. Ten trades that all depend on the same view of the market are one bet ten times as large, not ten independent bets.
6. Judge the strategy by trades, not days. The number of independent trades, not the number of months, sets how soon the edge becomes visible.
The code below simulates all of this on your own machine: it computes the edge, the odds of being behind, and the median wealth after 1,000 bets at different fractions of Kelly.
python
import numpy as np
from math import log, sqrt
p, b = 0.55, 1.0
edge = p b - (1 - p)
kelly = edge / b
print("edge per unit risked", edge, "Kelly fraction", kelly)
expected value and spread of 100 trades of 1,000 at even odds
win, loss = 1000.0, 1000.0
ev = p win - (1 - p) loss
sd = sqrt(p win2 + (1 - p) loss2 - ev2)
n = 100
print("EV", ev, "sd per trade", round(sd, 1), "z after 100 trades", round(n ev / (sd sqrt(n)), 2))
growth per bet at different fractions of Kelly
def growth(f):
return p log(1 + b f) + (1 - p) log(1 - f)
for k in (0.25, 0.5, 1.0, 2.0):
print("fraction of Kelly", k, "growth per bet", round(growth(k kelly) 100, 3), "%")
simulate 1,000 bets, 2,000 paths, and report the median final wealth
rng = np.random.defaultrng(1)
wins = rng.random((2000, 1000)) < p
for k in (0.25, 0.5, 1.0, 2.0):
f = k kelly
wealth = np.prod(np.where(wins, 1 + b f, 1 - f), axis=1)
print("fraction of Kelly", k, "median wealth", round(float(np.median(wealth)), 2),
"share of paths that lost money", round(float((wealth < 1).mean()), 3))
Common mistakes
Quoting a win rate as if it were an edge. A strategy that wins 90 per cent of the time can lose money, and one that wins 40 per cent of the time can be the best you have.
Ignoring the size of losses. The average loss and the rare large loss matter as much as the frequency of wins.
Believing a short run. With an edge of 10 per cent of the amount risked, the strategy is behind one time in six after 100 trades. A short track record says very little.
Betting all your capital on a favourable bet. The expected value is high and the chance of ruin is nearly certain.
Betting more than twice Kelly. Growth turns negative: you take more risk and lose money on a good strategy.
Trusting the edge estimate. Edges are measured with large errors, and errors in the direction of overestimating are expensive.
Treating correlated trades as independent. The formula assumes independence. Five trades on the same theme are one bet.
Forgetting costs. The edge that matters is the edge after spread, fees and slippage.
Key takeaways
The expected value of a bet is the probability-weighted average of its outcomes. The edge of the even-odds strategy is 0.55 × 1,000 − 0.45 × 1,000 = ₹100 per trade.
A win rate means nothing alone. A strategy that wins 40 per cent of the time at 3 to 1 earns ₹600 a trade, and one that wins 90 per cent at 1 to 10 loses ₹10.
The standard deviation of the total grows with √n, so the z-score of an edge grows with √n. A 10 per cent edge needs about a thousand trades to be clear: after 100 trades the chance of being behind is 15.7 per cent.
Betting everything on a favourable bet has a high expected value and an almost certain ruin, because wealth compounds and growth depends on the average of the logarithm.
The Kelly fraction is f\ = p − q ÷ b, or μ ÷ σ² in continuous form. It maximises the growth rate, which at best is half the square of the Sharpe ratio.
The growth curve is flat near the top and falls steeply on the right. Half Kelly gives 75 per cent of the growth, and double Kelly gives none.
Practitioners bet a fraction of Kelly, because edges are overestimated, trades are correlated, and nobody can live through a full-Kelly drawdown.
Check yourself
1. A strategy wins 30 per cent of its trades, with an average win of ₹5,000 and an average loss of ₹1,500. What is its expected value per trade?
0.30 × 5,000 − 0.70 × 1,500 = 1,500 − 1,050 = ₹450 per trade. A low win rate with a large payoff can be strongly profitable.
2. A strategy has an edge of ₹50 a trade and a standard deviation of ₹500 per trade. What is the z-score of its total profit after 400 trades?
z = (50 ÷ 500) × √400 = 0.10 × 20 = 2.0. The chance of being behind is about 2.3 per cent.
3. A bet wins with probability 0.6 at even odds. What is the Kelly fraction, and what does half Kelly bet?
f\ = p − q ÷ b = 0.6 − 0.4 = 0.20, so 20 per cent of capital. Half Kelly bets 10 per cent.
4. Why is betting twice the Kelly fraction a bad idea even though the strategy has a real edge?
Growth is roughly zero at double Kelly and negative beyond it, so you take twice the risk for no reward, and any error in the estimate of the edge pushes you over the cliff.
5. A strategy has an expected excess return of 6 per cent a year and a volatility of 12 per cent. What is the full Kelly leverage, and what growth does it give?
f\ = 0.06 ÷ 0.12² = 0.06 ÷ 0.0144 = 4.17. The growth is SR² ÷ 2, with SR = 0.5, which is 12.5 per cent a year, at a volatility of 4.17 × 12 = 50 per cent.
6. You have five trade ideas that all depend on the same view of the rupee. How many independent bets do you have?
About one. Size them together as one position, not as five Kelly bets.
Try this
Set aside forty-five minutes. You need a spreadsheet or Python.
1. Write down a strategy of your own, real or imagined, as three numbers: the probability of a win, the average win and the average loss, all in rupees. If you have a trading journal, use your actual figures.
2. Compute the expected value per trade, and the standard deviation per trade. Say whether the strategy has a positive edge.
3. Use the first simulator to find how many trades it takes for the chance of being behind to fall below 5 per cent. Compare that with the number of trades you make in a year.
4. Compute the Kelly fraction, then half and double. Use the second simulator to read the growth at each.
5. Run the code in this lesson, change p to 0.52, and note how much the Kelly fraction and the median wealth change. Then set p to 0.50 and describe what happens.
6. Repeat the Kelly calculation with an edge you have overestimated by a factor of two, and say what that does to your growth.
7. Write five sentences: the edge, the number of trades it needs, the Kelly fraction, the fraction you would actually use and why.
A good result is a one-page note with your three numbers, the Kelly fraction, a chosen fraction of it, and a clear statement of how many trades you need before you can believe the edge. The next lesson looks at the shape of the outcomes themselves: why returns have fat tails, and why that changes how much risk you really carry.
Read more
John Kelly's 1956 paper "A New Interpretation of Information Rate" in the Bell System Technical Journal is the original source. Edward Thorp's "The Kelly Criterion in Blackjack, Sports Betting and the Stock Market" is a readable account of using it in practice, including fractional Kelly. For probability foundations, An Introduction to Probability Theory and Its Applications by William Feller is the classic, and Fooled by Randomness by Nassim Taleb is an accessible discussion of how luck passes for skill in small samples.
Tags: Quant Trader Probability Expected value Kelly criterion Position sizing