Part 1 - A Simpler Problem

Introduction to Kelly Criterion and Expected Value

March 3, 2025

This is the part 1 of a 3 part series analyzing a betting game. If you'd like to jump to another part here are direct links:

An Even Simpler Game: An Introduction to the Kelly Criterion

Before we look at a situation with 2 coins, let's consider a game with just 1. Say you are allowed to make repeated even-money bets on a coin you know has a 60% chance of landing on heads. Obviously you'd want to bet on heads every time1. But how much would you want to bet each round to maximize your profits?

This problem is well-studied. John Larry Kelly developed the Kelly criterion in 1956. Essentially, when faced with a betting situation like this the criterion states that one should place bets that will maximize the expected value of the logarithm of the wealth (or, equivalently, maximize the geometric growth rate, which I personally find easier to think about).

This probably sounds extremely complicated. An intuitive approach is to think about how you might approach betting in such a situation. Every bet that you would make would be a percentage of how much you currently have - it doesn't make sense to put the same amount of money on a stock if you have $10,000 vs $10,000,000. Therefore, repeated winnings and losses would multiply with each other (rather than add and subtract) so a geometric approach makes more sense than an arithmetic one.

You can find how much you could expect to win by finding how many bets you would expect to win and to lose. In 10 flips you should expect 6 heads and 4 tails to occur. If the percent of your stake that you bet each time is ff, then the most probable outcome is

s=s0(1+f)6(1f)4s = s_0(1+f)^6 \cdot (1-f)^4

where s0s_0 is your initial stake and ss is what you would expect your end stake to be. The rate, then, would be the 10th root, so

r=(1+f)0.6(1f)0.4=(1+f)p(1f)1p\begin{align} r &= (1+f)^{0.6} \cdot (1-f)^{0.4} \notag \\ &= (1+f)^{p} \cdot (1-f)^{1-p} \notag \end{align}

Our standard geometric growth rate has emerged (though in the future we will be substituting q=1pq=1-p for readability).

In order to find what value of ff maximizes this function we need to take the derivative with respect to ff and set it equal to 0. The algebra is easier if maximize log(r)log(r) instead of rr which we can do because the log is monotonic. We have:

r=(1+f)p(1f)qE=log(r)=plog(1+f)+qlog(1f)r = (1+f)^{p} \cdot (1-f)^{q}\\ E = \log (r) = p \log(1+f)+q \log(1-f)

Thus the derivative is

dEdff=f=p1+fq1f=0\left. \frac{dE}{df} \right|_{f=f^{*}} = \frac{p}{1+f^{*}} - \frac{q}{1-f^{*}} = 0

So, after a bit of algebra, remembering p+q=1p+q=1, we have

f=pqf^{*} = p - q

In our example where p=0.6p=0.6, f=0.2f^{*}=0.2, so according to the Kelly criterion you should bet 20% of the stake every time.

What was derived here was not rigorous and describes only a special case of the Kelly criterion2. However, the above will be enough to motivate the rest of this discussion.

Finishing Out Our Example: Notes on the Differences Between Expected Value and Probable Values

Now that we know how much we are supposed to bet we can plug it back into our geometric growth rate formula to determine how much we can expect to make.

Before we said that

s=s0(1+f)pr(1f)qrs = s_0(1+f)^{p\cdot r} \cdot (1-f)^{q\cdot r}

rr being the number of rounds played. Ignoring the fact that we may be betting small fractions of a penny, if we are able to be on bet on 10 flips and start with $1, we find

s=1(1.2)6(0.8)4=1.223\begin{align} s &= 1\cdot(1.2)^{6} \cdot (0.8)^{4} \notag \\ &= 1.223 \notag \end{align}

Not terrible, but what if we are given 100 flips?

s=1(1.2)60(0.8)40=7.490\begin{align} s &= 1\cdot(1.2)^{60} \cdot (0.8)^{40} \notag \\ &= 7.490 \notag \end{align}

There is a problem though. These figures are not actually the expected values of these scenarios, these are the most probable outcomes.

The expected value is defined as the summation, over all possible outcomes, of the value of the outcome multiplied by the probability of that outcome. In mathematical notation,

E[S]=isipi\operatorname {E} [S]=\sum _{i}s_{i}\,p_{i}

In this situation,

si=s0(1+f)i(1f)ris_i = s_0(1+f)^{i} \cdot (1-f)^{r-i}

the stake after obtaining ii heads (with rir-i tails), and the probability is

pi=(ri)piqrip_i = \binom{r}{i}p^i\,q^{r-i}

the standard binomial distribution. With 100 flips, plugging the above in, we find that

E[S]=50.505\operatorname {E} [S]=50.505

considerably higher than our last value. As a side-note, we can actually find this much easier by using the arithmetic mean:

E[S]=((1+f)p+(1f)q)r\operatorname {E} [S]=((1+f)^p + (1-f)^q)^r

as the expected value is in fact the arithmetic mean over all possible outcomes.

But regardless, why is this new measure so much higher than the old one? Why did we build our optimization function around the geometric mean when the expected value uses the arithmetic?

To answer the first question, the expected value is much higher because there is a small chance of winning a very large amount (whereas you can only lose so much). These low-probability high-payoff values skew the average up. But over many trials the expected value does in fact give a much more accurate approximation of how much you could expect to win.

As to the latter, if we had instead chosen the arithmetic mean as our optimization function the outcomes are even more extreme: when considering any p>0.5p > 0.5, f=1f=1, giving an impossibly small chance of winning 2r2^r. Otherwise the payoff is 0.

The expected value of this situation is higher, the massive payoff of 2r2^r making up for it's miniscule probability of hitting. The key to the Kelly Criterion, though, is that it guarentees the best results in the long run.

Continue to Part 2, which will explore the actual problem as proposed. This will answer the basic question and includes some Python to simulate the problem and perform some calculations.

Footnotes

  1. This might not be completely obvious to some. This was actually performed in study: participants were given $25 dollars and 30 minutes to make bets. They kept whatever they won (limited to a maximum of $250). Some of the participants lost when they bet their entire stake on tails. You can read the full paper here.

  2. This article is a fantastic resource for exploring more of the areas that the full criterion covers. I'm a big fan of the interactive components.