Mathematics of bookmaking

Author
Published

September 6, 2021

(sports) Betting is similar to gambling

Introduction

Have you ever placed a bet ? Wondered what the odds actually mean ?

It’s all linked to probability.

Setup

Let us place focus on a betting situation: a bookie offers odds on an event AA, and on its complementary A\overline{A}. There can be multiple binary events at the same time (or close). We will then extend to multiple outcomes.

In our case, we consider real-life processes, which are physical, and their outcomes. We regularly take the example of sports gambling, where processes are fixtures, which generate various outcomes.

For a given bet, we have (decimal) odds oAo_A such that if you place a bet with stake ss on event AA, you lose ss in all cases, and if you win, you get soAso_A in addition. So your total net gain is s(oA1)s(o_A - 1) in case of a win, and s-s otherwise.

Denote

  • πA:=1oA\pi_{A} := \frac{1}{o_A} the inverse odds. This quantity is usually not a probability.

Define the net unit gain:

  • GAo:=oA1A1G^o_A := o_A \mathbf{1}_A - 1

sGAo=s(oA1A1)sG^o_A = s(o_A \mathbf{1}_A - 1) is then the net gain of placing a bet on event AA with stake s and inverse odds πA\pi_A.

Let us also define the natural bet, that is the bet on AA with a stake of πA\pi_A:

  • FAπ:=πAGAo=1AπAF^{\pi}_A := \pi_A G^o_A = \mathbf{1}_A - \pi_A

We will see that this quantity is useful to stake the bets in order to combine them. Intuitively, it makes sense to stake bets with low odds with large money since you are (supposedly) likely to win, and bets with high odds with fewer money since you are (supposedly) unlikely to win.

Define pp a probability on the universe Ω\Omega, and pAp_A the probability of AΩA \subset \Omega. This might be the true probability law on sports events, or your belief of it, or someone else’s belief. All we know it that it is a coherent belief since pp satisfies the axioms of probability.

A bet is sure when its gain is deterministic, i.e. there is not randomness involved.

When there is no possible confusion, we write GAGAoG_A \cong G^o_A and FAFAπF_A \cong F^{\pi}_A

Coherent odds

Coherence

We say that the odds are coherent for a given bookie, or that a book is coherent, if we have the following:

  • πAB=πA+πB\pi_{A \cup B} = \pi_A + \pi_B when AB=A \cap B = \emptyset

It is another way to say that π\pi is additive.

Then we can deduce other rules:

  • πAB=πA+πBπAB\pi_{A \cup B} = \pi_A + \pi_B - \pi_{A \cap B}

  • A,πΩ=πA+πA\forall A, \pi_{\Omega} = \pi_A + \pi_{\overline{A}}

This last equality shows that the booksum is universal. This also allows us to prove that

  • π=0\pi_{\emptyset} = 0

Which means that π\pi is a measure, and which is finite.

Warning: πA1πA\pi_{\overline{A}} \neq 1 - \pi_A, rather πA=πΩπA\pi_{\overline{A}} = \pi_{\Omega} - \pi_A. We will see that afterwards, this allows the bookie to make a profit.

If we apply the right transformation to π\pi, we might get (approximately) the implied probability law p^\hat{p} estimated by the bookie, and his margin on each bet.

Note that the popular saying that πp^\pi \simeq \hat{p} is false, since those do not sum to 1. To go further see the implied probability section.

Product

We say that A ⁣ ⁣ ⁣BA {\perp \!\!\! \perp} B (for π\pi) if we have πAB=πAπB\pi_{A \cap B} = \pi_A \pi_B.

  • For A ⁣ ⁣ ⁣BA {\perp \!\!\! \perp} B, GAB+1=(GA+1)(GB+1)G_{A \cap B} + 1 = (G_A + 1)(G_B + 1)

i.e.

  • FAB=(FA+πA)(FB+πB)πAπBF_{A \cap B} = (F_A + \pi_A)(F_B + \pi_B) - \pi_A \pi_B

Additivity

Let AA, BB such that AB=A \cap B = \emptyset. We have :

  • GAB=πAπA+πAGA+πBπA+πAGBG_{A \cup B} = \frac{\pi_A}{\pi_A + \pi_{\overline{A}}} G_A + \frac{\pi_B}{\pi_A + \pi_{\overline{A}}} G_B.

i.e.

  • FAB=FA+FBF_{A \cup B} = F_A + F_B.

In the general case, when ABA \cap B \neq \emptyset, we have:

  • FA+FB=FAB+FABF_A + F_B = F_{A \cap B} + F_{A \cup B}

The sure universal bet

When we apply the additivity formula for BAB \leftarrow \overline{A}, we get:

  • GΩ=πAπA+πAGA+πAπA+πAGA=1πA+πA1G_{\Omega} = \frac{\pi_A}{\pi_A + \pi_{\overline{A}}} G_A + \frac{\pi_{\overline{A}}}{\pi_A + \pi_{\overline{A}}} G_{\overline{A}} = \frac{1}{\pi_A + \pi_{\overline{A}}} - 1

i.e.

  • FΩ=FA+FA=1(πA+πA)F_{\Omega} = F_A + F_{\overline{A}} = 1 - (\pi_A + \pi_{\overline{A}})

Unsurprinsingly, this is a sure bet. It is the opposite of the margin of the bookie. That is the gain of the unit bet on the sure event Ω\Omega, placing a bet on both AA and A\overline{A} with the proper stakes ratio.

By identifying GΩ=1Ω1πΩ1G_{\Omega} = \mathbf{1_{\Omega}}\frac{1}{\pi_{\Omega}} - 1, we recognize that:

  • πΩ=πA+πA\pi_{\Omega} = \pi_A + \pi_{\overline{A}}

This quantity πA+πA\pi_A + \pi_{\overline{A}} is the booksum in general (for a given event AA).

Let us write what is now trivial:

  • GΩ=1πΩπΩ=1πΩ1=oΩ1G_{\Omega} = \frac{1 - \pi_{\Omega}}{\pi_{\Omega}} = \frac{1}{\pi_{\Omega}} - 1 = o_{\Omega} - 1

  • FΩ=1πΩF_{\Omega} = 1 - \pi_{\Omega}

Transition

Note that we always have FA+FA=1(πA+πA)F_A + F_{\overline{A}} = 1 - (\pi_A + \pi_{\overline{A}}), even if the odds are uncoherent. However, if the odds are not coherent, we can’t say that this quantity is indeed FΩF_{\Omega}. For instance, the bookie could theoretically offer other odds for the event Ω\Omega, leading to πΩπA+πA\pi_{\Omega} \neq \pi_A + \pi_{\overline{A}}. However, would they really offer such a bet ?

In the following sections, we do not assume coherent odds. However, we use the notations

  • π^Ω:=πA+πA\hat{\pi}_{\Omega} := \pi_A + \pi_{\overline{A}}

  • G^Ω:=1πA+πA1\hat{G}_{\Omega} := \frac{1}{\pi_A + \pi_{\overline{A}}} - 1

  • F^Ω=1(πA+πA)\hat{F}_{\Omega} = 1 - (\pi_A + \pi_{\overline{A}})

Fairness

A fair bet implies Ep[FA]=0\mathbb{E}_p[F_A] = 0. Since Ep[FA]=pAπA\mathbb{E}_p[F_A] = p_A - \pi_A, we then have:

  • pA=πA=1oAp_A = \pi_A = \frac{1}{o_A}.

In this case, the odds are coherent since π=p\pi = p is a probability measure. We have 1oA+1oA=1\frac{1}{o_A} + \frac{1}{o_{\overline{A}}} = 1, that is oA=oAoA1o_{\overline{A}} = \frac{o_A}{o_A - 1}.

We also have the following:

  • πΩ=1\pi_{\Omega} = 1

  • GΩ=FΩ=0G_{\Omega} = F_{\Omega} = 0

This last formula is crucial to understand fairness. It is useful to hedge your bets with the right amount, since e.g. GA=oAoAGA-G_A = \frac{o_A}{o_{\overline{A}}} G_{\overline{A}}. More on this at Negative bets.

Note that even if bookkeepers were unwilling to make a profit, they don’t really know the true probability (is there such a thing?). So the best they can do is to offer odds that are fair for a probability measure p^\hat{p}, that is the reflection of their honest and coherent beliefs. This is equivalent to π=p^\pi = \hat{p}, and thus to the two following statements:

  • π\pi is coherent (additive), e.g. π\pi is a (finite) measure

  • πΩ=1\pi_{\Omega} = 1

Arbitrage

Let’s compute the original hedging quantity that sums to zero in a fair betting situation. Recall that G^Ω\hat{G}_{\Omega} is the gain of placing a bet on AA combined with a bet on A\overline{A} with the proper stakes. In an unfair (real) situation, this does not sum to zero.

If the booksum π^Ω<1\hat{\pi}_{\Omega} < 1, then G^Ω>0\hat{G}_{\Omega} > 0: this means that one can bet on both outcomes and make a sure profit, according to any outcome. This is called an arbitrage (or arb).

Thus, a bookie needs to set the booksum π^Ω1\hat{\pi}_{\Omega} \geq 1, otherwise this will lead to quick bankruptcy: everyone in the know will bet on both outcomes (with the proper stakes ratio).

Moreover, the higher the booksum, the higher the profits for bookies since F^Ω=1πΩ\hat{F}_{\Omega} = 1 - \pi_{\Omega}. Recall that your loss is the bookie’s gain.

However, since maximizing the booksum means minimizing the average odds, informed bettors will likely place their bets with another bookie. Thus, for the bookie, it is all about maximizing the booksum while still attracting customers, keeping in mind that competitors do the same.

Value betting

Let us now consider this smart bookie configuration: πΩ>1\pi_{\Omega} > 1. Is there still any opportunity to make money as a bettor (and lose money as a bookie)? Well, probably. Recall the expected gains for a given event:

Ep[FA]=pAπA\mathbb{E}_p[F_A] = p_A - \pi_A

This means that if you trust your belief pAp_A, and that it is higher than the one the bookie offers you:

  • pA>πA=(1+ϵA)p^Ap_A > \pi_A = ( 1 + \epsilon_A) \hat{p}_A with ϵA\epsilon_A the margin

then you should bet. In practice, you should probably look for differences that are wide enough for you to bet.

However, in this case there is no sure bet, and hence no sure profit = there is only an estimate of the expectation. Hence, this is much riskier than an arbitrage. In order to make a profit based on this, you need to bet on many opportunities where you find a positive expectation, so that on average your gain should be positive. If you have a robust estimation method, then you will make a profit if you size your bets correctly (see e.g. the Kelly criterion). On the other hand, if you your estimates are often off compared to the bookies’, then you will eventually go bankrupt (see the gambler’s ruin).

Negative bets

Negative bets are simply when you take the role of the bookie: you offer someone else a bet. Then, their gain is exactly your loss, and vice-versa. Hence, placing a negative bet is simply the opposite of the positive bet that the person takes. But what if you cannot offer someone else a bet at the price you buy it? It is hard to find either a bookie that allows you to take his place, or an exchange that does not take commissions.

Well, we have to resort to F^Ω\hat{F}_{\Omega}. Recall that, in the general case:

F^Ω=FA+FA=1π^Ω\hat{F}_{\Omega} = F_A + F_{\overline{A}} = 1 - \hat{\pi}_{\Omega}.

If the fair situation, F^Ω=0\hat{F}_{\Omega} = 0. Thus, we can simply place the opposite bet with the proper stake:

  • FA=FA- F_A = F_{\overline{A}}

However, in the unfair situation, considering a smart bookie, we have:

  • FA=FAϵAF_{\overline{A}} = - F_A - \epsilon_A

where ϵA=π^Ω1>0\epsilon_A = \hat{\pi}_{\Omega} - 1 > 0. This is the bookie’s margin: you cannot hedge yourself at net zero cost. You must pay the price to the bookie. You can clearly see that again by placing a sure net negative bet:

  • FA+FA=ϵA<0F_A + F_{\overline{A}} = - \epsilon_A < 0

Note that if the bookie is not smart, or that you are dealing with several bookies at the same time, treating them as one bookie offering the highest odds for any event, you might see an opportunity where F^Ω>0\hat{F}_{\Omega} > 0, that is ϵA<0\epsilon_A < 0. This quantity becomes you sure net gain in this arbitrage case.

Incoherent odds

In the case of incoherent odds, a bettor can build a dutch book against the bookie, that is a set of bets that constitutes a surebet. That is, provided the bookie offers odds on all relevant events, which they don’t in practice to avoid this situation.

See Appendix for the construction of surebets with the help of reversing (negative) bets.

Thinking like a bookie

If we think like a bookie, here are our tasks in order to thrive:

  • Estimate the true probabilities as precisely as possible
  • Set the odds lower than the estimated ones (inverse odds are thus higher than estimated probabilities)
  • Attract bettors by offering high enough odds
  • Minimize the risk

As a bookie, you want to minimize the risk, i.e. the largest sum of money you could potentially lose. Consider for example that a large number of people do bet on an unlikely outcome, with high odds, and this event realizes. In order to avoid this, the bookie can intentionally skew the odds while realizing that many people (or few people with large sums of money) are betting on this outcome. This can also mean that there is a value opportunity for bettors, i.e. that the odds are not set properly. In this example, the bookie can monitor the volume of bets, while computing the risk, and decrease it when it is too high by decreasing the corresponding odds and increasing the odds of opposite events, in order to attract bettors. He can also place bets at another bookie in order to hedge.

Implied probability

We want to know the implied probabilities of the odds, the probability estimated by the bookie. We actually need to reverse engineer the recipe that they use in order to maximize profit based on their estimate of the true probabilities, in order to recover them. This is basically an inverse problem.

Denote:

  • πA=(1+ϵA)p^A\pi_A = (1 + \epsilon_A) \hat{p}_A

with p^A\hat{p}_A the bookie’s (coherent) belief, ϵA\epsilon_A the bookie’s margin on event A. The bookie certainly hopes that ϵA>0\epsilon_A > 0, and tries to do that.

Basic normalization

An easy technique to get a probability from consistent (and unfair) odds is to normalize the inverse odds:

  • p^:=1π^Ωπ\hat{p} := \frac{1}{\hat{\pi}_{\Omega}}\pi

This assumes that the A,ϵA=π^Ω1\forall A, \epsilon_A = \hat{\pi}_{\Omega} - 1: the bookies’ margin is uniform on all outcomes, which is probably false in real situations. However, this provides a first guess that is easy to compute.

If we assume that π\pi is coherent, it is immediate that we have p^Ω=1\hat{p}_{\Omega} = 1 and thus p^\hat{p} is a probability measure.

Shin’s model

See Shin 1991, Strumbelj 2014 for further analysis.

Multiple odds

Single event

Observe that for any given event, Fπ π0\\{F^{\pi}\ | \pi \ge 0 \\} is a convex set:

αFπ1+(1α)Fπ2=Fαπ1+(1α)π2\alpha F^{\pi_1} + (1 - \alpha) F^{\pi_2} = F^{\alpha \pi_1 + (1 - \alpha)\pi_2}.

This gives us a useful formula to combine gains, betting on mutiple odds at once:

xFAπ1+yFπ2=(x+y)(xx+yFπ1+yx+yFπ2)=(x+y)Fαπ1+(1α)π2x F^{\pi_1}_A + y F^{\pi_2} = (x + y) (\frac{x}{x + y}F^{\pi_1} + \frac{y}{x+y}F^{\pi_2}) = (x + y) F^{\alpha \pi_1 + (1 - \alpha) \pi_2}

where α=xx+y\alpha = \frac{x}{x+y}.

In practice, you can also use GG with the odds:

xGo1+yGo2=(x+y)Gαo1+(1α)o2x G^{o_1} + y G^{o_2} = (x + y) G^{\alpha o_1 + (1 - \alpha) o_2}

If we have access to multiple odds at a given time, we have virtually access to all the odds in between. Why would you bet in-between though, since you should take the highest odds?

Also, this trick might be useful to reduce a position to one equivalent bet, or expand a single bet into multiple ones. This might also be useful to test a risk assessment system (with e.g. a property-based testing framework).

A more realistic situation arises when we place multiple bets on the same event at different times, while odds have been varying (in-play betting for example). If you did spot value at time tt and the odds move in your favour, then you should still bet at time t+δtt + \delta t. In order to simplify you position, you can virtuallly reduce your two bets to one equivalent bet at odds in-between.

Appendix

Measure theory

  • μ(A)=A1Adμ\mu (A) = \int_A \mathbf{1}_Ad\mu

  • 1AB=1A1B1_{A \cap B} = 1_A 1_B

  • 1AB=1A+1B1AB1_{A \cup B} = 1_A + 1_B - 1_{A \cap B}

Probability theory

A probablity pp defined on any AΩA \subset \Omega is a finite measure that satisfies the property pΩ=1p_{\Omega} = 1.

  • Ep[1A]=pAE_p[1_A] = p_A

  • We say A ⁣ ⁣ ⁣BA {\perp \!\!\! \perp} B for pp iff pAB=pApBp_{A \cap B} = p_A p_B i.e. Ep[1A1B]=Ep[1A]Ep[1B]E_p[\mathbf{1}_A \mathbf{1}_B] = \mathbb{E}_p[\mathbf{1}_A] \mathbb{E}_p[\mathbf{1}_B]

  • More generally, we say X ⁣ ⁣ ⁣YX {\perp \!\!\! \perp} Y for pp iff Ep[XY]=Ep[X]Ep[Y]E_p[XY] = E_p[X] E_p[Y]

Basic bets properties

  • π>0\pi > 0, o>1o > 1

  • Ep[GA]=pAπA1\mathbb{E}_p[G_A] = \frac{p_A}{\pi_A} - 1

  • Vp(GA)=pA(1pA)πA2\mathbb{V}_p(G_A) = \frac{p_A (1 - p_A)}{\pi_A^2}

  • Ep[FA]=pAπA\mathbb{E}_p[F_A] = p_A - \pi_A

  • Vp(FA)=pA(1pA)\mathbb{V}_p(F_A) = p_A (1 - p_A)

Surebets on an incoherent book

Incompatible events

Let’s consider the case when the odds are incoherent. In the case of AB=A \cap B = \emptyset, if you chose to bet both on AA and BB separately, then you can actually (implicitly) bet on ABA \cup B with the proper stakes proportion. We assume that the bookie offers (incoherent) odds for AA, BB, ABA \cup B and AB=AB\overline{A \cup B} = \overline{A} \cap \overline{B}. This situation never arises in the scope of binary outcomes sports but rather typically in football (soccer): {A,B,AB}Home,Away,Draw\{A, B, \overline{A \cup B}\} \cong \\{Home, Away, Draw\\}

We introduce proper notation:

  • C:=ABC := A \cup B

We want to compare FA+FBF_A + F_B and FCF_C.

One side

We compute the theoretical sum of a positive and a negative bet:

FA+FBFC=πC(πA+πB)F_A + F_B - F_C = \pi_C - (\pi_A + \pi_B)

If the “coherent” version of the inverse odds for CC are low enough, there is an opportunity. One has to bet with the inverse formula:

FC=FC+(πC+πC1)F_{\overline{C}} = - F_C + (\pi_C + \pi_{\overline{C}} - 1)

Consider the betting opportunity:

  • F^Ω:=FA+FB+FC=(πCπAπB)(πC+πC1)=1(πA+πB+πC)\hat{F}_{\Omega} := F_A + F_B + F_{\overline{C}} = (\pi_C - \pi_A - \pi_B )- (\pi_C + \pi_{\overline{C}} - 1) = 1 - (\pi_A + \pi_B + \pi_{\overline{C}})

We have a sure (triple) bet. We will make a profit if and only if this quantity is positive, i. e.:

  • π^Ω:=πA+πB+πC<1\hat{\pi}_{\Omega} := \pi_A + \pi_B + \pi_{\overline{C}} < 1

This is exactly the same arbitrage formula as before, but with three outcomes.

The other side

This time we target FCFAFBF_C - F_A - F_B. In this case, we place the following bets:

FA=FA(πA+πA1)F_{\overline{A}} = - F_A - (\pi_A + \pi_{\overline{A}} - 1)

We use exactly the same formula for BB, and we get a betting opportunity:

FA+FB+FC=2(πA+πB+πC)F_{\overline{A}} + F_{\overline{B}} + F_C = 2 - (\pi_{\overline{A}} + \pi_{\overline{B}} + \pi_C)

General case

This time, we do not assume AB=A \cap B = \emptyset.

We leverage the following:

  • 1AB=1A+1B1AB1_{A \cap B} = 1_A + 1_B - 1_{A \cup B} i.e. 1D=1A+1B1C1_D = 1_A + 1_B - 1_C

  • 1AB=1A1B1_{A \cap B} = 1_A 1_B.

Let D:=ABD := A \cap B.

We essentially want to compare FDF_D and FA+FBFCF_A + F_B - F_C.

Then, consider the following pseudo-bet with the pseudo-odds πA+πBπC\pi_A + \pi_B - \pi_C:

FA+FBFC=1A+1B1C(πA+πBπC)F_A + F_B - F_C = \mathbf{1}_A + \mathbf{1}_B - \mathbf{1}_C - (\pi_A + \pi_B - \pi_C)

Now we need to compare this to

FD=1A+1B1CπDF_D = \mathbf{1}_A + \mathbf{1}_B - \mathbf{1}_C - \pi_D

One side

First, we target FA+FBFCFDF_A + F_B - F_C - F_D. In order to actually place an approximation of this bet, we need to reverse the two negative bets FC-F_C and FD-F_D.

First we have:

FC=1C+πC+1(πC+πC)=1C+1πCF_{\overline{C}} = - \mathbf{1}_C + \pi_C + 1 - (\pi_C + \pi_{\overline{C}}) = - \mathbf{1}_C + 1 - \pi_{\overline{C}}

With the same reasoning, we have use FD=FD(πD+πD1)=(1A+1B1C)+1πDF_{\overline{D}} = - F_{D} - (\pi_D + \pi_{\overline{D}} - 1) = - (\mathbf{1}_A + \mathbf{1}_B - \mathbf{1}_C) + 1 - \pi_{\overline{D}}.

We get the sure bet combinations:

F^ϵ1:=FA+FB+FC+FD=2(πA+πBπCπD)\hat{F}_{\epsilon_1} := F_A + F_B + F_{\overline{C}} + F_{\overline{D}} = 2 - (\pi_A + \pi_B - \pi_{\overline{C}} - \pi_{\overline{D}})

The other side

Consider the opposite quantity:

FD+FCFAFBF_D + F_C - F_A - F_B

We need to reverse the bets on A and B to get a sure bet:

F^ϵ2:=FA+FB+FC+FD=2(πC+πDπAπB)\hat{F}_{\epsilon_2} := F_{\overline{A}} + F_{\overline{B}} + F_C + F_D = 2 - (\pi_C + \pi_D - \pi_{\overline{A}} - \pi_{\overline{B}})

Provided we can place bets on AA, BB, C=AB=AB\overline{C} = \overline{A \cup B} = \overline{A} \cap \overline{B} and D=AB=AB\overline{D} = \overline{A \cap B} = \overline{A} \cup \overline{B}, we need to check the two above-mentioned quantities. However, it is usually not possible to compose bets in such a fashion: the bookies does not offer any bet on AB\overline{A} \cup \overline{B}.

Reuse

Citation

BibTeX citation:
@online{guy2021,
  author = {Guy, Horace},
  title = {Mathematics of Bookmaking},
  date = {2021-09-06},
  url = {https://blog.horaceg.xyz/posts/betting-theory/},
  langid = {en}
}
For attribution, please cite this work as:
Guy, Horace. 2021. “Mathematics of Bookmaking.” September 6, 2021. https://blog.horaceg.xyz/posts/betting-theory/.