The Mathematics of Money
A fishing trip, an adoptive grandpa, and the reason a bankroll grows: Kelly's 1956 paper read as Shannon's communication model, all the way to G = H(X) − H(X|Y).
I went fishing for the first time with a good friend of mine. It was something that I had been wanting to try for a while, and he had not gone fishing in a long time, so it seemed like a good way to spend a morning together.
As you can imagine, it was a very unsuccessful morning in terms of the number of fish caught, but luckily, that was not what we optimised for.
On our way back from the beach, we got talking about how my friend used to go fishing with his grandpa when he was a child, and how he hadn’t gone since his grandpa passed. It was emotional for him to pick up the rods again.
When I think back on that day, there is a tiny voice inside my head that says: It would have been nice to have a grandpa! Not to go fishing; that would have been difficult given that I was born in a landlocked country with no lakes or rivers near me. But because of the timeless wisdom that they have distilled over their lives and are desperate to share with you.
Lucky for me, I discovered Edward O. Thorp while listening to a podcast and decided to read his memoir, A Man for All Markets. Reading it felt like what I imagine it is to listen to your grandpa tell stories, and Edward O. Thorp has an infinite supply of them.
Here is one example story from his pre-teen years.
“Pranks and experiments were part of learning science my way. As I came to understand the theory, I tested it by doing experiments. I was learning to work things out for myself … In the upstairs bathroom I shared with my brother, I set up a two-meter amateur radio station… I also created a laboratory space in the laundry room. This was where I did many of my investigations in chemistry, some of which went awry. For instance, having read that hydrogen gas would burn in air with a pale bluish flame, I decided to see for myself. To generate the gas, I poured hydrochloric acid into…”
There is no way I can oversell this book. Getting to the end of it felt sad, not because the ending is sad, but because it felt like saying goodbye to an adoptive grandpa.
I know, I know! You must be feeling deceived. You came here for money and are getting a random story from a guy with a grandpa complex. But I wanted you to know about that book.
In one of the many chapters of his life, Thorp was working on beating the game of blackjack. If you have ever watched 21, the techniques explained in the movie are adaptations of what Thorp published in his book, Beat the Dealer: A Winning Strategy for the Game of Twenty-One.
One of the many problems Thorp had to solve to put his theory into practice was bankroll management: how much of your money to wager on a given bet, given your chances of winning it. While he was talking it over with Claude Shannon, Shannon suggested the Kelly Criterion. In a nutshell, the Kelly Criterion is a tidy formula that tells you exactly how much of your bankroll you should bet, given your probability of winning and the odds on offer.
Deconstructing The Promise
“If the input symbols to a communication channel represent the outcomes of a chance event on which bets are available at odds consistent with their probabilities (i.e., “fair” odds), a gambler can use the knowledge given him by the received symbols to cause his money to grow exponentially. The maximum exponential rate of growth of the gambler’s capital is equal to the rate of transmission of information over the channel. This result is generalized to include the case of arbitrary odds.”
This is how Kelly starts his paper, and it is fascinating. It derives from Shannon’s communication model. In which there is a transmitter of information, there is a channel through which that information is transmitted, and there is the receiver of that information at the other end of the communication channel.
Mapping this to gambling, which is what he does. The transmitter is reality, the future, what actually happens. The channel is whatever model you make use of to predict the outcome of the chance event, for instance, the results of a football game (the right kind, the British kind), and the receiver is you.
And he says the future is screaming at you that Manchester City will lose this game, and you are trying to tune into the future’s frequency through your model (your radio). But the signal is noisy, and you don’t get to listen to exactly what it is saying.
However, if there are bets available at fair odds (for a fair coin toss, for instance, this would be $2 for each of the two possible outcomes, where is the probability of the event, 50%), and your model is actually extracting some signal from what the future is screaming, over the long run, the maximum growth rate of your bankroll equals the rate of transmission of information over that channel: the quality of your radio, the information rate your model actually extracts.
A note on wording, because it is a distinction worth keeping. The capacity of a channel is the best rate it could ever carry, maximised over every possible input distribution. You don’t get to choose the input distribution here, reality does, it plays whatever games it plays. What you get is the rate of transmission achieved by your particular radio against the world as it actually is. That is the quantity Kelly equates to growth, and it is the one we will land on at the end of this post.
He also generalises the result to the case of arbitrary odds, which is the case in actual gambling, where we have bookmaker’s margin, and the house also uses its own radio to tune into the future’s frequency.
And this is beautiful, because it means that, if you build a better radio than the one the house/market has, good enough to overcome the bookmaker’s margin, in the long run, you will make money gambling.
How Exactly?
Well, Kelly’s is really a story of compounding under different uncertainty scenarios. In his paper, he starts explaining the case where you have 100% certainty about the outcome of an event, then he moves to the case where you don’t have 100% certainty, after that, he generalises to arbitrary odds and addresses the case of unfair odds.
I will treat the case of unfair odds in a follow-up article, on this one, we will end with the generalisation to arbitrary odds, which is where he lands his greatest punch on the entire paper.
(A note on notation: every logarithm in this post is base 2, so every quantity below is measured in bits — or, equivalently, in doublings.)
Enter, Fat Tony
Imagine that you have befriended Fat Tony, who has a big influence on the outcomes of Arsenal games, as you have witnessed many times this season; he can pull strings for Arsenal to win whenever he wants. And since he appreciates you, he gives you a tip ahead of time. In this Simpsonian world, imagine there exists a good-hearted bookie that gives you 50/50 odds (2 EUR if Arsenal wins) on every Arsenal game without applying any margin.
You would double your investment every week, and the growth potential of your bankroll is only capped by how much you bet in each game, which, assuming you are rational, should be your entire bankroll on each bet. After N games, you would have your initial amount, 100% return per game.
The average speed at which you grow your money in those N weeks is 100%. But how do you calculate it? Well, it is the average number of times you double your money per week; let’s call it G from now on, and it would be calculated as follows:
The log₂ term simply converts each week’s multiplier into ‘number of doublings’. Each week you multiply your money by 2 (multiplier), and log₂(2) = 1, you double your money once per week thanks to Fat Tony’s meddling in Arsenal games. So, after N games, you will have doubled your bankroll N times (), ergo, .
Later, when tips become unreliable, weekly multipliers will vary, and each week will count as a fraction of a doubling — or even negative (a halving).
G can also be expressed as:
Where is your bankroll after N bets and is your initial bankroll. gives you the total multiplier over N games, converts it into the total number of doublings and we end up with G = 100% as we did before.
In this case, where Fat Tony is god, you will be multiplying your money as follows:

Bad Fat Tony, unreliable Fat Tony
Time to be a little more realistic. Fat Tony would have to be a sort of god to guarantee the result every single week. The most likely scenario is that he gets it wrong sometimes. In this case, what happens if you keep the same strategy as above and bet your entire bankroll each time — which, in theory, maximises our expected value?
Well, if your borderline friend gets it wrong just once, you lose all your money and declare bankruptcy:

This is how our compounding would look if we bet all our money on each game:

The moment our friend gets it wrong, we go to 0 and never recover!
So the best strategy is one that avoids bankruptcy. And all you have to do is just bet a fraction of your money.
Say you bet a fraction of your bankroll (we will call this fraction ) and hold back the rest (). Let’s say you win your first bet, then at fair odds of 2, you would have and your new bankroll becomes .
Tony is on a roll and you win the next one as well, then your new bankroll would be . In the next round, however, Tony crosses paths with a decent referee and you end up losing, in that case, you only lose , the fraction of your bankroll you bet, leaving you with a total wealth of , we can express this sequence as follows:
Here is the fraction of your bankroll, is the number of bets you win and the number of bets you lose.
By choosing to bet a fraction of your bankroll, your money would multiply as follows:

As you can see, much slower than before.
If we want to calculate the average number of doublings as we did above, we just have to swap in the formula we constructed above:
And this can be simplified to:
If we solve the limit, then G is:
Here would be the percentage of times Tony gets it right, and the fraction of times he gets it wrong. Or in other words, the probability of you winning and losing respectively.
From here, in order to get the value of , the fraction of your money you should bet in order to maximise your bankroll in the long run, you would optimise in terms of and solve:
Computation (Chain Rule):
Then:
Getting rid of the fractions:
Isolating the l parts:
Expanding and cancelling:
Finally, we get:
Doing the same for the losing side:
If we plug those values back into our formula for :
Look at what Fat Tony made us do because of his incompetence. Since he is not able to provide us with certainty, and we don’t want to lose all our money, we had to compute the optimal fraction of our bankroll to bet to maximise the long-term growth of our bankroll.
So let’s say we have $100, and we know that Fat Tony only gets it right 80% of the time. We would bet , which in our case is of our bankroll, $60.
Nice! But,
Wouldn’t it be nice to be able to bet on draws and losses and the number of goals, not only for Arsenal but for any game?
That is what John Kelly addresses in his generalisation of this interpretation of information rate, and exactly where he throws the knockout punch.
Fat Tony has a team
As you know, Fat Tony does not act alone; there is Legs, who specialises in Arsenal Losses, Louie on Draws and the infamous Johnny Tight-Lips, who specialises in the Wins. All of them send us signals based on their speciality.
For now, we still consider fair odds are available, where:
Where are the odds paid if event s happens. And is the probability of that event happening.
Since we assume fair odds:
Theoretically, since we have fair odds, we can assume that the gambler bets their entire bankroll on the set of events s.
Here represents the portion of their bankroll that the gambler bets on the outcomes s given that they have received the tip r. In our case, the portion of our bankroll we bet on Arsenal drawing given that Legs gave us the tip that we should.
We can bet the entire bankroll in the game because, since we have fair odds, we can hold back money by simply placing cancelling bets. i.e., we bet on W, D and L according to the certainty we have about their occurrence.
Now recall the bankroll growth formula from earlier:
In this general case:
Let’s unpack this. To make things simple, let’s start with one game only. Arsenal either wins, draws or loses. And we bet a fraction of our bankroll on each outcome. Let’s say 50% for W, 20% for D and 30% for L. And let’s assume odds of 2 for W and 4 for both D and L.
Let’s say Arsenal actually loses, which is what we all want (because you know? they suck). Then:
- 50% of our bankroll that we bet on them winning returns 0, it’s gone.
- 20% that we bet on them drawing is also gone. Returns 0.
- But the 30% we bet on them losing returns $4 per dollar bet.
So after the one game, our new bankroll will be:
Using the earlier terminology:
represents the winning bet. And if we do this a second game, then:
Where . So our bankroll compounds as the iterative product over r (the received symbol) and s (the transmitted symbol). is the number of times r and s both happen. Going back to the one-game example:
- The above is simplified to make it shorter, we would need to include all the combinations of
randsfor it to be fully correct.
So, for , the expression collapses to:
In the general case, holding back money by betting on all outcomes, your compounding would look as follows:

Now we are very close to the punch line. Let’s go one layer out of the bankroll growth rate formula, the log:
If we plug that back into the original Growth formula:
Remember that represents the number of times the s symbol is transmitted (what happens) and the r symbol is received (what Tony’s team predicted would happen). So, we have that:
Since (fair odds), we end up with:
Which is the same as saying that:
If we take only the second part of the equation:
is the Shannon Entropy (average information per signal (per event)). Finally, we have that:
Here is an excellent explanation of what entropy is and the intuition behind it. Some of the best 30 minutes I’ve invested in my life.
The last step is finding the bet size that maximises G
From the above formula of G, the second part () is not dependent on us. So, maximising reduces to maximising the first part.
The first thing to consider is the constraint we have. We are limited by our bankroll. Which makes the process a constrained optimisation problem.
So, we have:
Subject to:
Note that this constraint holds separately for every signal r — one budget per tip — so the optimisation needs one multiplier per r, not one overall. We can proceed with the optimisation using The Lagrangian:
From here, we optimise the Lagrangian with respect to and equal to 0:
We obtain:
Now, by definition, we know that:
Where is the probability of receiving the signal, or in other words, the probability Tony’s team emits the signal. is the probability that the event happens given that we have received the signal.
And remember our constraint:
Putting together the above results, we can express the constraint as:
and since we are summing over s:
Ergo, from the results above:
Simply put, the bet size that maximises our bankroll growth is the probability that s happens given we have received tip r.
Now substitute that optimal bet back into . Careful here: only lives in the first term, so what follows is the first term at its maximum, not yet the whole of . is still sitting outside, waiting:
If you remember how we arrived at above, here we are at the same exact point. Except, this is not the entropy of the event, it is the entropy of the event given the certainty Tony’s team is able to give us. We can express this as:
Finally, bringing back in, the full formula for at the optimum reduces to:
How gorgeous is that result?
Kelly goes on to show how to adjust this for unfair odds, and I will do subsequent posts about that, but for now I want to stop at this gorgeous view.
Under fair odds, the growth of your bankroll is the difference between the uncertainty the market has about an event and the uncertainty that remains given your model.
We intuitively know this, it is obvious, and we use it constantly in our lives to decide what careers to choose. It is the very reason we educate ourselves and we want our kids to acquire as much knowledge as possible.
You might think I am nuts for saying this, but it even defines what it means to be alive. Think about it. A dead thing does not process information, hence, it has no information about the environment, hence it is destined to become the environment. A thing that is alive processes information, it has information about the environment that it uses to survive and keep that life energy contained inside the constraints of a body as long as possible. And the greater the capacity to process information, the greater the chances of survival.
It defines what it means to be a human. In a sense, being human is our ability to process more complex information and use it to our advantage. Maybe it is the reason for curiosity, maybe it is why evolution optimised for curiosity.
Again, you came here for money, so sorry, but I get excited about these things.
And to close
I think that is the perfect conclusion for the subject; I can’t write anything more beautiful.
This is why I would like to conclude with one snippet from the book I mentioned at the start (A Man for All Markets, Edward Thorp), where he writes about his wife, Vivian:
“Though we shared many interests, we also had differences that were enriching. Vivian enjoyed literature, people, psychology, art and drama rather than science. But she had a good scientist’s clear and logical way of thinking, which she applied to society. I offered a rational and scientific understanding of the natural world, and she would help me expand my insights about the human world. I would teach her about things, and she would teach me about people.”
Life might be about processing information, but we do that with a goal; I mean, there has to be a reason for us to want to preserve that life energy we got lucky enough to get. And the older I get, the more I am convinced that that reason is Love.
This is the best epiphany I have had in months:
Love is attention. Deny someone love, and they seek it, loudly. Pay no attention to your work, and it comes back broken. Love is happiness, and happiness is the goal.
With love,
42, Cheers