Why We Lose Even When the Odds Are Very Favorable

Ravi Jagannathan
Ravi Jagannathan
7 min read
Posted on September 27, 2022
Why We Lose Even When the Odds Are Very Favorable

Introduction

There are some incredible mathematical strategies that are commonly used by algorithmic traders and professional gamblers alike. The invention of the trick, which we shall discuss in this article goes back to a larger-than-life story of three physicists who “broke the Vegas casino” using mathematics and a hidden calculator machine. One of them is known to all electrical engineers – Claude Shannon, the father of information theory.

Consider a game of a weighted coin that has 90% chance of showing up heads. The 90% is known to the casino as well as the player. The bet is $1 and if you win calling heads, you get $2 back. If you lose you forfeit the bet. How should you play this a hundred times in succession?

If you bet all your money and keep on playing, sooner after a few games (around 10 in the above example) you will lose all and go bankrupt. If you bet too less, you won’t be making enough. Thus, sizing of bets is important for professional poker players. Poker is a game of calculable probabilities and a choice of playing next round or losing it all. A true professional plays the round and sizes his bets based on the calculated probability of winning. The wins come as a slow and steady trickle. In all the casinos the probability is well known.


 

Connecting the Dots

There is a string that binds an advertiser, an equity trader, and a professional gambler into a similar situation. The probability of an option ending up as money earned or lost is approximately known by the Black-Scholes-Merton (BSM) model – named after the mathematicians who received a Nobel Prize in Economics. The option buyer (or seller) is staking a portion of his portfolio betting on the outcome of a known probability. If he bets the entire portfolio on something, it’s almost certain that sooner or later he will lose his portfolio and exit.

What is not immediately realized is that performance advertising is also a form of gambling of known probabilities. Recap that an ad is shown on a piece of real estate. You pay a certain amount to the publisher of the real estate and bet that an event such as a click or a sale would occur. If the event occurs, you win the bet and get paid. If the event doesn’t occur the bet is lost. It’s similar for search clicks as well. In case of pay-per-click if a conversion sale doesn’t happen, the loss is a total loss.

At an aggregated level the advertising campaign looks likes a single bet. For an ad campaign featuring hundreds and thousands of keywords they get thousands and millions of ads served. A bet is a performance of one campaign for one single day. The daily budget for the campaign is the bet amount. The bet is over after one whole day which means that the results of the bet are known at the end of the day. Here the campaign itself is the game.

A typical good day would be bet with a daily budget of $500 that returns $620.

A typical bad day would be bet with a daily budget of $500 that returns $300.

Typically, for any given day the returns vary between $300 and $650 for every $500 spent.

Obviously, the number of good days balances out the bad days or else there would be no business.

The portfolio is the entire money the advertiser has for marketing that we can bet on a single day or keep some in cash. It could be an entire quarter’s marketing budget of $5,000. If we bet the entire portfolio every day, on one bad day something goes wrong with very few installs and the entire money is lost.

With a known and high probability of winning, the only decision to make is how much should you allocate. If such a formula exists, anybody could play the game repeatedly betting the amount given by the formula. In the ad tech ecosystem the decision is fully automated through software applications running 24x7.

Mathematically, let’s consider the following scenario on a given day:

Daily Budget (B) $1000
Win Probability High (P) 90%
Returns Positive (G) 1.2 times the bet
Loss (L) 0.5 times the bet

We must find a fraction of the portfolio to bet on.

The mathematics of the above is elementary calculus:

  • K is the fraction of you daily budget

  • G is the positive return on a bet expressed as a fraction of the bet

  • L is the loss on a bet expressed as a fraction of the bet. A total loss is the fraction 1

  • You plan the game N times (where N is large)

  • P is the probability of win

 

A Win Scenario

Betting K*B returns K*B*G, so you're left with B(1 + G*K).

For example, with a budget of $1,000 bet 15% of it ($150) when you have an expected profit of 20%.

Here, G = 0.15 and K = 0.2; so, the next day's budget B(1 + G*K) = 1000(1 + 0.15*0.2) = $1,030

 

A Loss Scenario

Betting K*B returns a loss of K*B*L, so you're left with B(1 - L*K*B).

After N games with probability P chance of winning, we get P*N times of win and (1 - P)*N time loss.

For example, consider that you have a winning chance of 0.6 and you play 10,000 times. You will likely win 6,000 times and lose 4,000 times.

 

Mathematical Derivation for the Curious

The left over money, M = B * [ (1 + K*G)PN + (1 - K*L)(1-P)N ]

Now, we must maximize the left-hand side. Note this is an equation in one variable K (the bet size). Others being known, elementary calculus takes derivative with respect to K and set it to zero.

A small trick before that. Maximizing M is same as maximizing log(M)

log(M) = log(B) + P * N * log(1 + K*G)+(1 - P) * N *log(1 - K*L)

Noting that the derivative of log x = 1/x and the derivative of a constant = 0

d/dx (left hand side) = 0 is the same as 0 = 0 + P*G/(1 + K*G) - L/(1 - K*L) + P*L/(1 - K*L)

After rearranging the terms, we get the Kelly Criterion formula

G*P/ (1 + K*G) = L(1 - P) / (1 - K*L)

To avoid oversimplifying further let’s observe a couple of examples.

 

A Sample Game of Known Outcome/Campaign

Probability of win is 90%. Probability of loss is 10%.

Gain yields 1.5 times the amount bet, G = 1.5

Loss is total, L = 1

Insert all the above in the formula

→ 0.9*1.5 / (1 + K*1.5) = 1(1-0.9)/ (1- K)

→ 1.35 * (1 - K) = 0.1 + 0.1*1.5*K

K = 0.833

In this scenario never bet more than 83% of your budget on the game, although the win looks fantastic having 90% chances of winning.

 

Explore and Exploit

A curious reader might ask that who sets up the campaigns with known probabilities so nicely? Why does the casino allow gambling on known probabilities? Why doesn’t equity market adjust itself to wipeout advantage? Can’t there be such thing as a perpetual machine!

Yes, all the above are perpetual machine for money printing, but in real life the owners of the machines ensure that it can’t be used perpetually. 

As Kelly and Shannon discovered the trick, the casinos simply changed the tables. Although, these days the professional gamblers have most likely entered the Griffin Book and have been banished forever from the casinos. So, gamblers look out for casinos to participate and play in poker tournaments where they have a good chance of winning.

The seasoned professionals know that there are two betting games taking place simultaneously. Above is only the exploit side of the business where you have targeted campaigns that perform as expected, or casinos with well understood games, or equities that perform same year on year.

There is a second more difficult game of finding the casino to play, finding the campaign that targets and discovers the equity to trade on. This is the explore side of the business.

There is an advertising concept known as channel burnout which occurs when an advertiser ends up buying every single user who shows up on the website. Equities stop their growth or descent after some time. Thus all casinos come to an end and new ones must be discovered to replace them and stay in business. Similarly, an ad campaign should find new ways to target customers and the equity trader needs to find new equities.

This explore side of the discovery game is similar but a way harsher game to play. The losses can be total, while the payoffs are also more extreme. The win here is not for profits but a new avenue to explore. The explore and exploit are similar but widely differ in payoffs.

The exploit side of the business looks like this. With a daily budget of $1,000 a good day will cost you $800 while a bad day will cost you $1500. Here most of the days will turn out to be good days.

The explore side of the business looks like this. With a daily budget of $1,000 a good day will find something (equity, campaign targeting, casino) to exploit, while a bad day will send you back to $0. Here most of the days will turn out to be bad days.

The solution is identical to the previous problem. In the explore situation budget B probability will force you to try a lot more P. The win is many times the bet G. The loss is total L= 0. We must ascribe a value on finding a target for a campaign. To avoid double counting, there should be a proportional distribution of the lifetime value of a campaign in explore and exploit strategies.

 

Exploit to Find a Profitable Campaign/Casino/Equity

Gain is 20 times the bet, which means finding a good target is worth 20 times the amount bet. If you spend $1,000 for an unsuccessful campaign, once you find something profitable it should be worth about $20,000.

Loss is total if you don’t find a game.

Probability is 0.01 i.e., 1% chance of success (observe the steep drop compared to previous example)

Now insert it into the formula

→ 20*0.01 (1+ 20K) = 0.99/(1-K)

→ 2 – 2K = 0.99 + 19.8K

K = 4.6% of the budget

To avoid channel burnout, spend about 5% of the daily budget on exploration.

 

Epilogue

Kelly and Thorpe became Wall Street legends with their fund. Their seminal paper is the Kelly Criterion described above. Shannon retired with his winnings. A movie was later made based on their exploits.