The Theory of Optimal Betting Spreads.


Posted by Brett Harris on 13 Nov 1997, at 1:10 p.m.



The Theory of Optimal Betting Spreads


Brett Harris

Introduction

The purpose of this article is to show that the theory of optimal betting spreads for
the game of Blackjack has a sound mathematical basis, and to clear up confusion resulting
from inadequate or non-existent definitions of the terms which are used. Furthermore, it
will be demonstrated that the choice of an optimal spread, is independent of the choice of
betting method, be that a proportional Kelly scheme, or a fixed scheme with a known
risk of ruin. In addition, a method is presented which will enable direct calculation of the
optimal spread for a given game, choice of maximum bet, and optional (Wonging) points at which
no bet is made.

In Section 1, the mathematical definitions of betting spreads and betting schemes, are
presented, which allow a precise formulation of the problem. The other parameters such as
system expectation, variance are also defined, as well as the functional n0 which plays a
central role in the analysis. In Section 2, the well-defined mathematical problem of finding
the spread (as defined in Section 1) which minimises the functional n0, subject to the constraints,
is examined. The form of the solution is found, and a method of direct construction
is presented. In Section 3, there is a digression into Kelly betting theory, where it is shown
that subject to the appropriate expansion of the Log utility function, that the minimisation
of n0 is a part of the computation of the optimal Kelly betting scheme. In Section 4, the
problem is approached from the perspective of a fixed betting scheme, where in this case,
instead of choosing a bet size based on our current bankroll as in the Kelly scheme,
bet size must be chosen to give a desired risk of ruin for a particular bankroll.
Further it is shown, that for a fixed risk of ruin, the spread which minimises n0 is the
spread which gives the fastest linear bankroll growth. Section 5 presents an example
of a game with specified parameters, and using the results of Section 2, a direct calculation
of the optimal spread is performed. To illustrate the distinction between this procedure and
the betting scheme used, separate examples of the use of this spread for a Kelly and a fixed
bettor are given. Finally there is a summary of the results and main conclusions of the article.

Section 1 - Definitions

In order to define the problem we require precise definitions of the terms which are
used. Firstly we define a Game as the countable set of values :


i : count index,
e(i) : unit expectation, (1)
v(i) : unit variance,
c(i) : frequency of 'count index' for the game,

where the index i may range over all integer values (-inf to +inf). The values of e(i),
v(i) and c(i) are real, and subject to the requirements,


-inf < e(i) < inf,
v(i) >= 0 ,
Sum{i} c(i) = 1 ,

and it is understood that c(i) -> 0 for large |i| sufficiently fast for all subsequently
defined sums to be convergent.

Since {i} is a countable set, it is possible without loss of generality to order the set
of values such that


e(i+1)/v(i+1) >= e(i)/v(i) , for all i. (2)

Define a Betting Spread to be a set of values b(i) for each i, such that


b(i) = 0 for all i in a subset {I_wong}, (3)
b(i) = 1 for all i in a subset {I_min},
b(i) = M for all i in a subset {I_max},
1 < b(i) < M for all i not in the above subsets.

Note, with the above definition, there can be no negative values of b(i), b(i) is bounded
above by M, and may not assume any values in the interval (0,1). Also, there are no
units monetary or otherwise, associated with the spread b(i). In order to apply b(i) to
a real game of Blackjack, we will later require the definition of an associated
Betting Scheme B(i), which is


B(i) = A * b(i) for all i, (4)

where A is a positive real number with units of currency (Dollars, Pounds etc..).
A convention is used here whereby all quantities which refer to the unit game are given in lower
case, whereas those in an associated monetary system using a betting scheme are given in upper
case.

Now, given a specified Game, and betting spread b(i), we can define the functionals


ev[b] = Sum{all i not in I_wong} c(i) * b(i) * e(i) (5a)
var[b] = Sum{all i not in I_wong} c(i) * b^2(i) * v(i) (5b)

and the Long Run Index


n0[b] = var[b] / (ev[b])^2 . (5c)

The functional n0[b] is called the Long Run Index, because it is equal to the number of
rounds that must be played, with a fixed betting spread, such that the accumulated expectation
equals the accumulated standard deviation. As such, it is a measure of how many rounds must
be played to overcome a negative fluctuation of one standard deviation with such a fixed
spread.

Postulate

The optimal betting spread for a given game is such that n0[b] is minimised, subject to
the constraints of of maximum value M, and specified set {I_wong}, and the requirement
that ev[b] > 0.

At this stage, this is only a postulate based upon the judgement that it is desirable
for the expectation to outgrow the standard deviation as quickly as possible for a fixed
betting spread. Clearly the condition ev[b] > 0 is self-evident, as we only consider games
and spreads which have a positive net expectation. It will be shown later that an optimal
spread defined in this way, is exactly the spread which gives the fastest bankroll growth
in a proportional Kelly system, subject to the usual Log expansion.


Section 2 - Minimisation of n0[b]

At this point we have a well defined mathematical problem:

For a given value of M, specified zero set {I_wong}, and requirement ev[b] > 0,
find the optimal spread {b_opt(i)}, which minimises n0[b].
Firstly, since {I_wong} is a countable subset, it is possible to remove this subset from
the ordered set of values (Game), and the result is still a Game, except the values of c(i)
no longer add to unity. Since this requirement is not necessary for the result, we will assume
without loss of generality, that all zero values {I_wong} have been removed and that the minimum
possible value of b(i) is now unity.

Since n0[b] is a function of all the b(i), if


d(n0[b])/db(i) = [ d(var[b])/db(i) * ev[b] -
2 * d(ev[b])/db(i) * var[b] ] / (ev[b])^3
= 0 , (6)

where


d(ev[b]) /db(i) = c(i) * e(i) (7)
d(var[b])/db(i) = 2 * c(i) * b(i) * e(i) (8)

then Eqn(6) is satisfied if,


[ b(i) * v(i) * ev[b] - e(i) * var[b] ] = 0,

or,


b(i) = e(i)/v(i) * var[b]/ev[b]
= e(i)/v(i) * k[b] (9)

where k[b] is the system functional defined as


k[b] = var[b]/ev[b] . (10)

Note that Eqn(9) is a highly non-linear system, since k[b] depends on the values of all
the b(i), including the particular value on the left hand side. Eqn(9) can be viewed as
a consistency condition for a spread, once it has been found. It also has to be remembered
that it is not possible to satisfy Eqn(9) simultaneously for all values of i, since b(i)
is constrained to be between 1 and M, and be such that ev[b] > 0.

Since the values of e(i)/v(i) are ordered, and k[b] > 0 (since ev[b] > 0), we arrive
at a constraint upon the values of i for which Eqn(9) can be satisfied. Since b(i) is
bounded between 1 and M, we have


1 < e(i)/v(i) * k[b] < M . (11)

If there is some set of values i for which Eqn(11) is satisfied, there will be a maximum
value of e(TM-1)/v(TM-1) in the set. Since the set is ordered, all values of i greater than
or equal to TM will fail to satisfy Eqn(11). Similarly, the minimum value e(T0+1)/v(T0+1)
defines a lower limit such that for all i less than or equal to T0 will also fail Eqn(11),
and by definition T0 < TM.

Construct a semi-optimal betting spread b(i), such that


b(i) = 1 , i <= T0
b(i) = e(i)/v(i) * k[b] , T0+1 <= i <= TM-1 (12)
b(i) = M , i >= TM .

where again, k[b] is a function of all the b(i). Equation (12) is a circular definition,
nevertheless the family of spreads so defined form a subset of all possible spreads
due to the constrained nature of the intermediate values. It will shortly be shown
that for spreads of this form, the value of k[b] can be determined in a consistent
way, and the whole spread may be calculated.

For spreads of the form Eqn(12), the system functionals may be reexpressed as


ev[b] = ev_minus[T0] + k[b]*ev_int[T0,TM] + M*ev_plus[TM] (13a)
var[b] = var_minus[T0] + k[b]^2*var_int[T0,TM] + M^2*var_plus[TM] (13b)

where


ev_minus[T0] = Sum{i<=T0} c(i) * e(i) (14a)
ev_int[T0,TM] = Sum{T0+1<=i<=TM} c(i) * e(i)^2/v(i) (14b)
ev_plus[TM] = Sum{i>=TM} c(i) * e(i) (14c)

and


var_minus[T0] = Sum{i<=T0} c(i) * v(i) (15a)
var_int[T0,TM] = Sum{T0+1<=i<=TM} c(i) * e(i)^2/v(i) (15b)
var_plus[TM] = Sum{i>=TM} c(i) * v(i) . (15c)

Note, that for spreads of the form Eqn(12),


ev_int[T0,TM] = var_int[T0,TM] = (def) D[T0,TM] , (16)

and


ev[b] = ev_minus[T0] + k[b]*D[T0,TM] + M*ev_plus[TM] (17a)
var[b] = var_minus[T0] + k[b]^2*D[T0,TM] + M^2*var_plus[TM] . (17b)

But we also have the definition Eqn(10), which combining with Eqns(17a) and (17b),


k[b]*ev_minus[T0] + k[b]^2*D[T0,TM] + k[b]*M*ev_plus[TM]
= var_minus[T0] + k[b]^2*D[T0,TM] + M^2*var_plus[TM] (18)

where the terms involving D[T0,TM] cancel. Equation(18) can be immediately solved
for k[b], to give


k[b] = [ var_minus[T0] + M^2 * var_plus[TM] ] /
[ ev_minus[T0] + M * ev_plus[TM] ]. (19)

Equation(19) is one of the most important equations in optimal spread theory. It says that
for spreads of the form Eqn(12), the value of k[b] is completely determined by the subsets
{I_min} and {I_max}. But by construction, spreads of the form Eqn(12), satisfy Eqn(9) for
all values of i between T0 and TM, and are therefore of the form required to minimise
n0[b].

However, for an arbitrary pair of values (T0,TM), the value of k[b] given by Eqn(19) may
not necessarily specify a 1-M spread. If some intermediate b(i) < 1 or b(i) > M,
we will have a ratio of maximum to minimum value greater than M, which is not a
1-M spread, and as such cannot be considered as a solution. This provides a constraint
on the values of T0 and TM used in Eqn(19). Again, by the ordering operation, if
b(i) > 1, then b(j) > 1, for all i > j. It is therefore sufficient if


b(T0+1) >= 1 , (20a)

or

k[b] >= v(T0+1)/e(T0+1) , (20b)

where it is also noted that


e(T0+1) > 0 (20c)

is a necessary condition of Eqn(20a).

Similarly, it is sufficient if


b(TM-1) <= M , (21a)

or

k[b] <= M * v(TM-1)/e(TM-1) . (21b)

Note also that since e(TO+1)>0, and TM>TO, then e(TM-1)>0.

Since the functionals defined in Eqns(14) and (15) depend only on the specified
Game parameters c(i), e(i) and v(i), and the chosen values of T0 and TM, it is
a simple matter to compute the value of k[T0,TM] defined by Eqn(19), and by inspection,
exclude all values of T0 and TM which fail to satisfy Eqns(20) and (21). Equation(20c)
provides the most rigid bound on the value of T0, which may prove useful when designing
a practical algorithm.

Provided Eqns(20) and (21) are satisfied, we have a 1-M spread, which satisfies Eqn(9)
for all i between T0 and TM, and since we know k[b] we can compute the b(i).
However, we are not yet done. Since Eqn(9) is satisfied only for a subset of i values,
n0[b] may not necessarily be minimised, subject to the original constraints.

In order to determine if our spread defined by Eqn(12)
and satisfying Eqns(20) and (21), is in fact the spread which minimises n0[b], we need to
examine the behaviour of n0[b] around this point.

At the minimum of n0[b], it is necessary that any variation delta_b(i), subject to
the constraints, will act to increase n0[b], that is if for any i,


b(i) -> b(i) + delta_b(i)

then

n0[b] -> n0[b] + delta_n0[b],

and at the minimum we require

delta_n0[b] >= 0 . (23)

If Eqn(23) is not satisfied then we have found a new spread b'(i) for which n0[b'] has
a smaller value, and hence the original spread b(i) was not solution.

We have three cases to consider, i<=T0, T0 < i < TM, i>=TM, since the constraints are different
in each case.

Case(1) : i <= T0

Since b(i)=1, delta_b(i)>0, since if delta_b(i)<0, we would have b'(i)<1 and so the modified
set b'(i) would not be a spread. Using Eqn(6), and substituting b(i)=1, we have


delta_n0[b] ~= d(n0[b])/db(i) * delta_b(i)
= 2*c(i)/(ev[b]^3) * [ (1)*v(i)*ev[b]
- e(i)*var[b] ] * delta_b(i) >= 0

or

v(i) * ev[b] - e(i) * var[b] >= 0

which gives the condition


ev[b]/var[b] = 1/k[b] >= e(i)/v(i) for all i<=T0 (24)

where due care has been taken with the inequalities, since it is possible e(i) may be
less than zero. Again since the set is ordered, it is sufficient if


1/k[b] >= e(T0)/v(T0) . (25)

Case(2) : i >= TM

In this case b(i)=M, delta_b(i)<0, since if delta_b(i)>0, we again would not have a spread.
Again using Eqn(6), except this time b(i)=M, we arrive at


M * v(i) * ev[b] - e(i) * var[b] <= 0 ,

which gives the analogous condition to Eqn(24),


ev[b]/var[b] = 1/k[b] <= (1/M) * e(i)/v(i) for all i>=TM (26)

and it again sufficient if


1/k[b] <= (1/M) * e(TM)/v(TM) . (27)

Case(3) : T0+1 <= i <= TM-1

For the intermediate case we have d(n0[b])/db(i)=0, so that it is required is to show
that the second derivative is positive, that is that the stationary point of n0[b] is
not a maximum, or a point of inflexion. The algebra is rather tedious, the reader is
invited to fill in the gaps, to show


d^2(n0[b])/db(i)^2 = 2*c(i)*v(i)/(ev[b])^3
* [ ev[b] - c(i)*b(i)*e(i) ]
= 2*c(i)*v(i)/(ev[b])^3
* [ ev_minus[T0] + M*ev_plus[TM] ]
+ 2*c(i)*v(i)/(ev[b])^3 * k[b]
* [ D[T0,TM] - c(i)*e(i)^2/v(i) ] .

But by Eqn(19), the first term is positive, and by Eqn(20c) all e(i)>0 provided i>T0,
so that the second term is always positive, which means we also have


d^2(n0[b])/db(i)^2 >= 0 for all T0+1 <= i <= TM-1 . (28)

Taking the reciprocal of Eqns(20b) and (21b), and combining them with Eqns(25) and (27),
the final conditions are obtained,


e(T0)/v(T0) <= 1/k[b] <= e(T0+1)/v(T0+1) (30)

and


(1/M) * e(TM-1)/v(TM-1) <= 1/k[b] <= (1/M) * e(TM)/v(TM) . (31)

Equations(30) and (31) solve the problem as outlined. The procedure to find the optimal
spread is reduced to finding the value of (T0,TM) for which k[b] as given by Eqn(19),
satisfies Eqns(30) and (31). This may be done by inspection or by a computational algorithm.
Once the correct value of k[b] is found, the spread my be quickly generated using Eqn(12).

An observation can be made here. Equations(30) and (31) impose a 'continuity'
condition on spreads of the form Eqn(12). In other words, k[b]*e(T0)/v(T0) < 1, but
k[b]*e(T0+1)/v(T0+1) > 1, and so there are no 'jumps' in the value of b(i). Eqn(31)
provides a similar condition at TM, that is there is a smooth transition to the maximum
bet. This condition allows the solution to be written in a much more general form.

Combining Eqn(12) with Eqns(30) and (31), gives a spread of the form


b(i) = 1 , if k[b] * e(i)/v(i) =< 1 (32)
b(i) = M , if k[b] * e(i)/v(i) >= M
b(i) = k[b] * e(i)/v(i) otherwise,

which no longer has any explicit ordering requirements on the values of e(i)/v(i).

The solution can be restated in words : Given a spread with a minimum of 1 unit and a
maximum of M units, we have the condition that 'ev/var (Eqn(10)) for the entire game is equal
to ev/var (Eqn (19)) for the game restricted to the max/min values', where b(i) satisfies Eqn(22).

The algorithm previously described by the Author, chooses a first guess spread of the form
Eqn(22) with k[b] replaced with some k', computes k[b] from Eqn(10), then sets k'=k[b],
and iterates until k' has converged to k[b], which by Eqn(22), automatically satisfies
Eqn(30) and (31), and since k'=k[b], is also of the form Eqn(12). The form of Eqn(22)
makes this a computationally simple process to perform.

Note again that at this point, we are talking about betting spreads b(i), which do not
have any monetary units. Moreover, the quantity k[b], is yet to be given any concrete
interpretation. In order to use the above theory in the real world, a betting method
such as a Kelly or fixed scheme must be chosen. Once such a scheme has been chosen,
it becomes possible to directly interpret k[b], and the interpretation will depend
on such a choice.

Section 3 - Kelly Theory

It is now necessary to diverge and discuss Kelly theory. There has been much discussion
about the equivalence or otherwise between the Kelly optimal scheme, devised by Winston
Yamashita, and the minimisation of n0[b] described above. In order to examine this question
a proof of the Yamashita method is given, using the definitions in Section 1 above.

The Kelly Generalization method seeks to find the optimal Kelly betting scheme B(i),
for a given bankroll C. The Kelly utility function (this form from Pete Moss)
may be written as,


J = Sum{i} C(i) Ex[ log(1 + f(i) U(i) ] (33)

where Ex[..] is the expectation operator, and {U(i)} is the set of possible outcomes
at count i, that is {U(i)}={-2,-1,-0.5..etc}, and f(i) is the bankroll fraction such
that


B(i) = C * f(i) . (34)

Expanding the log function using


log(1+x) ~= x - x^2/2 ,

gives the usual approximation for J,


J = Sum{i} C(i) [ f(i) Ex[U(i)] - f(i)^2/2 * Ex[U^2(i)] ] . (35)

But we have


e(i) = Ex[U(i)]
v(i) = Ex[U^2(i)] - (Ex[U(i)])^2 ~= Ex[U^2(i)]

and so


J = Sum{i} c(i) [ f(i) * e(i) - 1/2 * f^2(i) * v(i) ] , (36)

or


J = ev[f] - var[f]/2 (37)

where the definitions Eqn(5) have been used.

The variance is a very good approximation for the second moment for the game of
Blackjack. If one chooses to use Ex[U^2] instead of v(i) it makes almost no difference.
It was in fact demonstrated in a previous post entitled 'Null Result I' on the 'Theory'
page, that even if the full Kelly function Eqn(33) is minimised, the difference in the
value of f(i) is negligible.

Now f(i) is a dimensionless quantity, but is not a betting spread as defined
in Eqn(3), since there is no constraint on the minimum value.

Define a Kelly Spread as


f(i) = 0 for all i in a subset {I_wong}, (38)
f(i) = fmin > 0 for all i in a subset {I_min},
b(i) = M*fmin for all i in a subset {I_max},
fmin < b(i) < M*fmin for all i not in the above subsets.

So again we are presented with a well defined problem:

For a given value of M, specified zero set {I_wong}, and requirement ev[f] > 0,
find the optimal Kelly spread {f_opt(i)}, which maximises J[f].

Again, without loss of generality, it is possible to remove the set {I_wong} from
the ordered set of {i} values. In which case, f(i) is now bounded below by fmin
and above by M*fmin.

Following a similar procedure to Section 2, we seek to find a solution which
satisfies the constraints imposed by Eqn(35). Differentiating J with respect to f(i),


dJ/df(i) = c(i) * [ e(i) - f(i) * v(i) ] (39)

and setting the result to zero gives the familiar Kelly condition,


f(i) = e(i) / v(i) . (40)

Choose a Kelly spread of the form


f(i) = fmin , i <= T0
f(i) = e(i)/v(i) , T0+1 <= i <= TM-1 (41)
b(i) = M*fmin , i >= TM .

Then, using the notation previously defined,


J = fmin * ev_minus[T0] + M*fmin * ev_plus[TM]
- fmin^2 * var_minus[T0]/2 - fmin^2 * M^2 * var_plus[TM]/2
+ D[T0,TM]/2

where the final D[T0,TM]/2 has received a contribution from both the terms in Eqn(37).

Now differentiate again to fix the value of fmin,


dJ/d(fmin) = [ ev_minus[T0] + M * ev_plus[TM] ]
- fmin * [ var_minus[T0] + M^2 * var_plus[TM] ]
= 0 (42)

which when solved for fmin gives


fmin = [ev_minus[T0] + M * ev_plus[TM]] / [var_minus[T0] + M^2 * var_plus[TM]] . (43)

However, it must be checked that the value of fmin is consistent with Eqn(38). So we
must have


fmin < e(i)/v(i) for all T0+1 <= i <= TM-1
M * fmin > e(i)/v(i) for all T0+1 <= i <= TM-1

which by the now familiar properties of the ordered set {e(i)/v(i)}, it is
sufficient that


fmin < e(T0+1)/v(T0+1) (43)

and


fmin > (1/M) * e(TM-1)/v(TM-1) (44)

Now provided Eqn(43) and (44) are satisfied, we have a maximised Eqn(36),
for the given values of (T0,TM). But again, we do not know if this is
the true maximum of J, given the constraints of the problem. This time,
we are attempting to maximise J, not minimise n0, however the same
principles hold. We require that all variations of J, about the
solution, act to decrease J, that is we require delta_J < 0. Also,
we require that at the points where the derivative vanishes, the second
derivative must be negative, in order to be a maximum.

Case(1) : i <= T0

Since f(i)=fmin, delta_f(i) > 0, using Eqn(39) we have


delta_J = c(i) [ e(i) - fmin * v(i) ] * delta_f(i) < 0 ,

which can be solved to give


fmin > e(i)/v(i) for all i <= T0 .

and it is again sufficient if


fmin > e(T0)/v(T0) . (45)

Case(2) : T0+1 <= i <= TM-1

In this case, differentiating Eqn(39) with respect to f(i) gives


d^2 J/ df(i)^2 = - c(i) * v(i) < 0 (46)

which is always true.

Case(3) : i >= TM

In this case f(i)=M*fmin, delta_f(i) < 0, which gives


delta_J = c(i) [ e(i) - M * fmin * v(i) ] * delta_f(i) < 0 ,

and so


fmin < (1/M) * e(i)/v(i) for all i >= TM ,

or


fmin < (1/M) * e(TM)/v(TM) . (47)

Combining Eqns(43),(44),(45) and (47), give the final conditions


e(T0)/v(T0) < fmin < e(T0+1)/v(T0+1) , (48)

and


(1/M) * e(TM-1)/v(TM-1) < fmin < (1/M) * e(TM)/v(TM) . (49)

Note that Eqns(48) and (49) impose a 'continuity' condition on the Kelly
spread Eqn(41), which allows the optimal spread to be written as


f(i) = fmin , if e(i)/v(i) =< fmin (50)
f(i) = M*fmin , if e(i)/v(i) >= M*fmin
f(i) = e(i)/v(i) otherwise,

The Yamashita method can therefore be seen as a way to progressively eliminate
the Kelly spreads which do not satisfy Eqns(48) and (49), to arrive at the
final spread which satisfies Eqn(50).

Now the astute reader may have begun to notice many similarities between
this problem and the one solved in Section 2. In particular, by the
Equations (41),(43),(48) and (49), f(i) can be expressed in terms of
a betting spread b(i), of the form


f(i) = fmin * b(i) (51)

where


k[b] = 1/fmin . (52)

The following statement can be made:

The Kelly scheme f(i) which maximises Eqn(36), can be written in terms of
an optimal (in the n0 sense) betting spread b(i), where k[b] = 1/fmin.

The optimal Kelly betting scheme B(i), can now be written down as


B(i) = C * f(i)
= C * fmin * b(i) = (C/k[b]) * b(i) , (53)

or in other words, the monetary scaling factor A, is given by


A = C / k[b] . (54)

One therefore sees that in the Kelly context, k[b] can be interpreted
as the Kelly bankroll for which the optimal minimum bet is $1.

Now as with all mathematical problems, the correspondence in Eqn(51)
can not be a coincidence. Returning to Eqn(36), it is possible to rewrite
the expression for J in terms of a scalar Kelly fraction f, and a betting
spread b(i),


J = Sum{i} c(i) [ f * b(i) * e(i) - f^2 * b^2(i) * v(i)/2 ] , (55)

or

J = f * ev[b] - 1/2 * f^2 * var[b] , (56)

where now since b(i) is constrained between 1 and M, the extra degree of
freedom is taken up by the Kelly fraction f.

Differentiating with respect to f and setting the result to zero,


dJ/df = ev[b] - f * var[b] = 0 ,

gives


f = ev[b]/var[b] = 1/k[b] . (57)

Note that this is the result given by 'Grimy Fellow', which shows that it is possible
to compute the Kelly fraction for any spread whatsoever. One now has the
betting scheme


B(i) = C * f * b(i) = (C/k[b]) * b(i) , (58)

which is the Kelly betting scheme for the bankroll C and arbitrary spread
b(i). There may be many reasons why a player may choose a non-standard
spread b(i), such as a flat spread, and Eqns(57) and (58) provide the correct
Kelly betting scheme for such a method.

Substituting Eqn(57) back in Eqn(56), gives


J[b] = 1/2 * ev[b]^2/var[b] = 1/2 * 1/n0[b] . (59)

It can be immediately seen that the spread which now maximises J[b], under
the conditions specified, must by Eqn(59), also minimise n0[b].
This now suffices to show complete equivalence between any method which
minimises n0[b], and the Yamashita method which solves for the value
of f(i) which maximises J[f]. However, the Yamashita method, as he likes
to emphasise, is pure Kelly from the outset, and as such is inapplicable to
any betting method which does not use Kelly as a basis. Eqn(59) shows that
while the minimisation of n0[b] is a component of the Kelly scheme, it is
in itself a separate problem. It is possible to use the optimal spread
b(i) in a fixed betting scheme, without any reference to Kelly at all,
and as such, the n0[b] minimisation method has much wider applicability.

Section 4 - Fixed Betting Schemes

A fixed betting scheme differs from a Kelly scheme, in that the betting unit
is not varied as the bankroll changes. As a consequence, the main consideration
for a fixed scheme is Risk of Ruin, where there is a finite chance that the
bankroll may reach zero. In this section, I will show that the optimal betting
spread b(i), is precisely the spread which gives the fastest linear average
growth, for a given initial bankroll and fixed risk of ruin.

Firstly, for the fixed betting scheme B(i), it is possible to define the
Betting functionals,


EV[B] = Sum{i} c(i) * B(i) * e(i) = A * ev[b] (60)
VAR[B] = Sum{i} c(i) * B^2(i) * v(i) = A^2 * var[b] (61)

and the derived quantities


K[B] = VAR[B] / EV[B] = A * k[b] (62)
N0[B] = VAR[B] / (EV[B])^2 = n0[b] . (63)

Note from Eqn(63), N0[B]=n0[b], and so this shows that N0[B] is independent
of A, so that the quantity n0 is an invariant property of the system.

As a short aside, for a Kelly betting scheme of the form Eqn(58), we
have A=C/k[b] and so


EV[B] = C / n0[b] ,
VAR[B] = C^2 / n0[b] , (64)
K[B] = C .

which shows that at the minimum of n0[b], EV[B] as a fraction of bankroll
is maximised, and the system functional K[B] is equal to the bankroll itself.

The historical origin of N0[B] resulted from the observation that if
a player is unlucky enough to be losing at Q standard deviation below
expectation, then the mean profit as a function of rounds (N) is given by


P(N) = EV[B] * N - Q * SD[B] * Sqrt(N) (65)

where SD[B]=Sqrt(VAR[B]). This function initially drops below zero,
and does not reach zero again until


N = Q^2 * VAR[B]/(EV[B])^2 = Q^2 * N0[B] . (66)

Hence, N0[B] can be seen as the number of rounds required to overcome
one standard deviation of 'bad luck'. This is the origin of the interpretation
of N0[B] as a number of rounds, and can be seen as an index which measures
how long the 'long run' is for a particular game.

This however, only suggests that it is a good idea to minimise N0[B]
for a given betting scheme. Using the concept of risk of ruin,
the analysis can be made much more concrete.

I will assume a simple form for the ROR equation, The equation can be
made more general for various bankroll goals, and other requirements, but
I will use the simple, infinite win goal form, given in Blackjack for
Blood, by Bryce Carlson,


R = [ (1 + EV[B]/SD[B]) / (1 - EV[B]/SD[B]) ] ^(-C/SD[B]) . (67)

where C is the starting bankroll.

The exponent C/SD[B] deserves some examination. The system functional K[B]
has units of money, and as such can serve as a reference point. If the
starting bankroll C is equal to


C = alpha * K[B], (68)

then


C/SD[B] = alpha * K[B] / ( Sqrt(N0[B]) * EV[B] )
= alpha * A * k[b] / ( Sqrt(n0[b] * A * ev[b] )
= alpha * Sqrt(n0[b]) . (69)

We can then rewrite Eqn(67) in terms on n0[b] and alpha alone,


R = [ (1 + Sqrt(n0[b]) / (1 - Sqrt(n0[b]) ]
^ ( -alpha * Sqrt(n0[b])) , (70)

which can be written as


R = y ^ (-alpha) ,

where


y = (1 + Sqrt(n0[b]))^(Sqrt(n0[b])
* (1 - Sqrt(n0[b]))^(-Sqrt(n0[b]) . (71)

But for most games n0[b] is of the order of 10000-100000, so that sqrt(n0[b]) is much
greater than 100 and we can use the approximation,


(1 + 1/n)^n ~= (1 - 1/n)^(-n) ~= e = 2.718...

to show that


y ~= e^2 = 7.389 + O(1/Sqrt(n0))

and so y is for most practical purposes independent of n0[b].

So we get the extremely simple form for the risk of ruin,


R = e ^ (-2 * alpha) (72)

where alpha is simply the ratio between the bankroll C and the system
functional K[B].

One immediate result of Eqn(72) is the often quoted figure that the risk of
ruin for a fixed spread, where the bankroll is given by the 'Kelly' bankroll
K[B], is equal to


R(alpha=1) = e^(-2) = 13.5% . (73)

Now given a fixed risk of ruin R, and initial bankroll C, the median
bankroll after N rounds is


C(N) = EV[B] * N + C
= A * ev[b] * N + C (73)

but from Eqn(62) and (68) we have


A = C / (alpha * k[b]) , (75)

and so


C(N) = (C/alpha) * (N/n0[b]) + C (76)

where


alpha = log(1/Sqrt(R)) . (77)

Equation(76) shows that for a fixed initial bankroll C, and a given
risk of ruin R, that the spread b(i) which minimises n0[b] also produces
the fastest linear growth rate for the fixed spread.

Section 5 - Examples

This paper has been rather theoretical so far, and it is now time to
provide some concrete examples to illustrate the above theory.

In previous posts, I have used the example of a six deck AC type game,
using the Zen count. The raw data used to define the 'Game' is


i c(i) e(i) v(i) e(i)/v(i) b(i)_wong b(i)_all


-35 0.0000001 -0.0745192 1.6999757 -0.0438355 0.0000000 1.0000000
-34 0.0000001 -0.1037037 1.6485048 -0.0629077 0.0000000 1.0000000
-33 0.0000003 -0.1069767 1.5451451 -0.0692341 0.0000000 1.0000000
-32 0.0000005 -0.1516315 1.6276797 -0.0931581 0.0000000 1.0000000
-31 0.0000010 -0.0993014 1.6612969 -0.0597734 0.0000000 1.0000000
-30 0.0000017 -0.1346543 1.5801471 -0.0852163 0.0000000 1.0000000
-29 0.0000030 -0.1027628 1.5548879 -0.0660902 0.0000000 1.0000000
-28 0.0000048 -0.0921764 1.5666179 -0.0588378 0.0000000 1.0000000
-27 0.0000075 -0.1044626 1.5383036 -0.0679077 0.0000000 1.0000000
-26 0.0000164 -0.0896264 1.5109915 -0.0593163 0.0000000 1.0000000
-25 0.0000219 -0.0826319 1.5093610 -0.0547463 0.0000000 1.0000000
-24 0.0000364 -0.0880035 1.5023040 -0.0585790 0.0000000 1.0000000
-23 0.0000572 -0.0789209 1.4940599 -0.0528231 0.0000000 1.0000000
-22 0.0000912 -0.0746229 1.4887166 -0.0501257 0.0000000 1.0000000
-21 0.0001327 -0.0706394 1.4823981 -0.0476521 0.0000000 1.0000000
-20 0.0002133 -0.0638460 1.4721590 -0.0433690 0.0000000 1.0000000
-19 0.0003011 -0.0607757 1.4625379 -0.0415550 0.0000000 1.0000000
-18 0.0004595 -0.0555466 1.4523676 -0.0382456 0.0000000 1.0000000
-17 0.0006760 -0.0549823 1.4435975 -0.0380870 0.0000000 1.0000000
-16 0.0009921 -0.0482666 1.4337065 -0.0336656 0.0000000 1.0000000
-15 0.0013876 -0.0452096 1.4237402 -0.0317541 0.0000000 1.0000000
-14 0.0018710 -0.0412545 1.4139025 -0.0291778 0.0000000 1.0000000
-13 0.0029062 -0.0385428 1.4081987 -0.0273703 0.0000000 1.0000000
-12 0.0040088 -0.0351857 1.3998519 -0.0251353 0.0000000 1.0000000
-11 0.0054500 -0.0321861 1.3910524 -0.0231379 0.0000000 1.0000000
-10 0.0076043 -0.0293342 1.3830100 -0.0212104 0.0000000 1.0000000
-9 0.0103346 -0.0261640 1.3749787 -0.0190287 0.0000000 1.0000000
-8 0.0145999 -0.0231706 1.3681997 -0.0169351 0.0000000 1.0000000
-7 0.0196212 -0.0210272 1.3614607 -0.0154446 0.0000000 1.0000000
-6 0.0273889 -0.0180411 1.3548461 -0.0133160 0.0000000 1.0000000
-5 0.0368892 -0.0151977 1.3488639 -0.0112670 0.0000000 1.0000000
-4 0.0524806 -0.0127430 1.3450487 -0.0094740 0.0000000 1.0000000
-3 0.0718151 -0.0098355 1.3449082 -0.0073131 0.0000000 1.0000000
-2 0.1033957 -0.0071077 1.3391724 -0.0053075 1.0000000 1.0000000
-1 0.1198751 -0.0047315 1.3343356 -0.0035460 1.0000000 1.0000000
0 0.1724813 -0.0021764 1.3368349 -0.0016280 1.0000000 1.0000000
1 0.0978904 0.0012517 1.3429840 0.0009320 1.0000000 1.0000000
2 0.0688544 0.0043350 1.3456442 0.0032215 1.7646872 2.8476019
3 0.0493441 0.0074359 1.3386039 0.0055550 3.0429187 4.9102304
4 0.0358517 0.0105640 1.3335183 0.0079219 4.3394861 7.0024470
5 0.0258401 0.0137374 1.3332352 0.0103038 5.6442554 9.1078986
6 0.0187224 0.0171057 1.3368652 0.0127954 7.0090978 10.0000000
7 0.0135823 0.0205192 1.3437686 0.0152699 8.3645932 10.0000000
8 0.0100219 0.0240887 1.3423459 0.0179452 9.8300972 10.0000000
9 0.0071504 0.0276133 1.3603141 0.0202992 10.0000000 10.0000000
10 0.0051650 0.0314434 1.3790079 0.0228015 10.0000000 10.0000000
11 0.0037069 0.0345381 1.3831023 0.0249715 10.0000000 10.0000000
12 0.0025469 0.0391005 1.3974121 0.0279807 10.0000000 10.0000000
13 0.0020176 0.0428115 1.3985083 0.0306123 10.0000000 10.0000000
14 0.0013148 0.0480612 1.3918034 0.0345316 10.0000000 10.0000000
15 0.0009196 0.0508475 1.3836698 0.0367483 10.0000000 10.0000000
16 0.0006557 0.0518204 1.3751118 0.0376845 10.0000000 10.0000000
17 0.0004350 0.0573049 1.3730623 0.0417351 10.0000000 10.0000000
18 0.0002868 0.0601387 1.3662183 0.0440184 10.0000000 10.0000000
19 0.0001999 0.0593845 1.3570088 0.0437613 10.0000000 10.0000000
20 0.0001307 0.0701589 1.3459631 0.0521254 10.0000000 10.0000000
21 0.0000881 0.0700285 1.3438247 0.0521113 10.0000000 10.0000000
22 0.0000557 0.0742329 1.3353606 0.0555902 10.0000000 10.0000000
23 0.0000352 0.0810905 1.3272460 0.0610968 10.0000000 10.0000000
24 0.0000218 0.0843994 1.3198900 0.0639443 10.0000000 10.0000000
25 0.0000135 0.0672628 1.3277630 0.0506587 10.0000000 10.0000000
26 0.0000106 0.0853194 1.3213531 0.0645697 10.0000000 10.0000000
27 0.0000047 0.0898404 1.2963170 0.0693043 10.0000000 10.0000000
28 0.0000031 0.0772955 1.2890069 0.0599652 10.0000000 10.0000000
29 0.0000018 0.0764260 1.3074493 0.0584543 10.0000000 10.0000000
30 0.0000011 0.1038375 1.2847031 0.0808261 10.0000000 10.0000000
31 0.0000005 0.0831818 1.2714899 0.0654207 10.0000000 10.0000000
32 0.0000004 0.1104972 1.1770169 0.0938790 10.0000000 10.0000000
33 0.0000002 0.0486322 1.2043218 0.0403814 10.0000000 10.0000000
34 0.0000001 0.0268293 1.1126948 0.0241120 10.0000000 10.0000000

and the optimal spreads for


(1) 1 to 10, play only i>=-2; b(i)_wong, (78)
(2) 1 to 10, play all; b(i)_all,

are also given for later reference.

Note for this game, the minimum possible value for T0 is 0, since e(0) < 0,
and e(1) > 0.

As outlined in Section 2, the problem reduces to finding the value
of (T0,TM) for which Eqns(30) and (31) are satisfied. Equation (19) shows that
k[b] is a function of T0 and TM, and the basic parameters of the game. It is
therefore only a matter of computing k[T0,TM] for each value of 0 <=T0 < TM, and
checking to see if k[T0,TM] falls between the appropriate values of e(i)/v(i).

Define


l[T] = var(T)/ev(T) , (79)

then Eqns(30) and (31) become


1/l[T0] <= 1/k[T0,TM] <= 1/l[T0+1] (80)

and


(1/M) * 1/l[TM-1] <= 1/k[T0,TM] <= (1/M) * 1/l[TM] . (81)

Now it is a condition that l[T0+1] > 0, but l[T0] may be negative, so
while we can rewrite Eqns(80) and (81) as


l[T0+1] <= k[T0,TM] <= l[T0] (82)

and


M * l[TM] <= k[T0,TM] <= M * l[TM-1] (83)

we require the special case that if l[T0] < 0, the right hand inequality
of Eqn(81) will be deemed to be satisfied.

By tabulating the values of k[T0,TM], l[T0] and l[TM], the values
satisfying Eqns(82) and (83) and hence the optimal spread by Eqn(32), may
be found by inspection.


Case(1) : Play only i>=-2. k[T0,TM]


TO l(T0) | TM 1 2 3 4 5 6 7 8 9 10

0 -614.2 | 1514.9 1134.8 914.8 773.9 677.9 611.8 568.3 543.5 539.0 556.1
1 1072.9 | 0.0 1134.6 915.6 775.5 680.4 615.3 573.2 550.1 547.8 567.7
2 310.4 | 0.0 0.0 908.9 769.6 674.8 609.7 567.2 543.1 538.6 554.4
3 180.0 | 0.0 0.0 0.0 760.5 665.7 600.1 556.5 530.4 522.4 532.0
4 126.2 | 0.0 0.0 0.0 0.0 655.7 589.5 544.6 516.3 504.7 508.3
5 97.1 | 0.0 0.0 0.0 0.0 0.0 579.4 533.2 503.1 488.3 487.0
6 78.2 | 0.0 0.0 0.0 0.0 0.0 0.0 523.1 491.3 473.9 468.8
7 65.5 | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 481.3 461.9 453.7
8 55.7 | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 451.7 441.2
9 49.3 | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 431.4
10 43.9 | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
-----------------------------------------------------------------------------------
10*l(TM)
-6142.4 10729.3 3104.1 1800.2 1262.3 970.5 781.5 654.9 557.3 492.6 438.6
TM 0 1 2 3 4 5 6 7 8 9 10

The procedure is as follows:


(1) Start at the top left hand corner.
(2) Move across the table until k[T0,TM] is greater than the value in
the bottom row M*l[TM].
(3) Check that k[T0,TM] is less than the preceding value in the bottom
row M*l[TM-1].
(4) Now check to see if k[T0,TM] is less than the value at the
left l[T0], or l[T0] < 0.
(5) Check that k[T0,TM] is greater than the next value at the
left l[T0+1].
(6) If any preceding stage is unable to be satisfied, proceed to the
next row and repeat.
(7) If all (2)-(5) are satisfied, we have found (T0,TM) and k[T0,TM]
and are done.

For the example above :


T0 = 0 : k[0,9]=539.0 satisfies (2), (3), and l[0]<0 (4), but
fails (5) since l[1]=1072.9.
T0 = 1 : k[1,9]=547.8 satisfies (2), (3), (4) and (5), so we are done.

Note that for T0>=2, the value of l(T0) becomes much smaller than k[T0,TM] for any TM, making
it impossible to satisfy condition (4).

So the optimal value of (T0,TM) is (1,9) and k[1,9] = 547.8 is the optimal spread parameter.
Looking at the data table above, we can see the optimal spread b(i)_wong which is derived
from this value of k[b], using Eqn(32).

For those who have seen the previous posts using this example, the iterative n0[b] minimisation
method produced


ev sd k ev/sd N0
0.019673 3.2827 547.78 0.59927% 27845

which confirms the exact approach used above.


Case(2) : Play All. k[T0,TM]


TO l(T0) | TM 1 2 3 4 5 6 7 8 9 10

0 -614.2 | 1780.3 1346.8 1111.6 976.1 903.1 881.9 921.6 1061.5 1481.9 3600.5
1 1072.9 | 0.0 1345.5 1111.4 976.7 904.5 883.9 923.8 1061.8 1465.3 3304.0
2 310.4 | 0.0 0.0 1100.9 966.3 892.9 869.3 902.3 1022.7 1361.4 2638.6
3 180.0 | 0.0 0.0 0.0 951.4 876.1 848.4 872.5 972.0 1243.7 2111.0
4 126.2 | 0.0 0.0 0.0 0.0 858.4 826.5 842.0 922.5 1139.5 1751.1
5 97.1 | 0.0 0.0 0.0 0.0 0.0 806.3 814.5 879.6 1055.8 1510.8
6 78.2 | 0.0 0.0 0.0 0.0 0.0 0.0 790.8 843.7 989.7 1344.8
7 65.5 | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 814.6 938.4 1227.6
8 55.7 | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 897.8 1141.5
9 49.3 | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1079.5
10 43.9 | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
----------------------------------------------------------------------------------
10*l[TM]
-6142.4 10729.3 3104.1 1800.2 1262.3 970.5 781.5 654.9 557.3 492.6 438.6
TM 0 1 2 3 4 5 6 7 8 9 10

Again following the procedure outlined above


T0 = 0 : k[0,6]=881.9 satisfies (2), (3), and l[0]<0 (4), but
fails (5) since l[1]=1072.9 .
T0 = 1 : k[1,6]=883.9 satisfies (2), (3), (4) and (5) so we are done.

Again, for T0>=2, all the values of l[T0] are too small to allow (4) to be satisfied.

So we have (T0,TM) = (1,6) and the spread parameter k[1,6] = 883.9. Using this value
in Eqn(32), generates the full spread as given in the table above.

Again as a check, running this case through the n0[b] iterative algorithm gives,


ev sd k ev/sd N0
0.019959 4.2003 883.94 0.47519% 44287

which confirms the result of the direct calculation.

Now for these examples to be of any use, we must choose a betting method.
(1) Kelly Method

In a previous post, the example was given of a Kelly bettor with a bankroll of C=$5000.
Using Eqn(54), we can immediately compute the scaling factor A,


A_wong = $5000/547.8 = $9.13 for the Wonging case,
A_all = $5000/883.9 = $5.66 for the play all case.

The Kelly betting scheme is then given by


B_wong(i) = A_wong * b_wong(i) (84)
B_all(i) = A_all * b_all(i)

with the values of b_wong(i) and b_all(i) given in the data table above.
(2) Fixed Betting Method

In this example, we will keep the initial bankroll C=$5000, and choose a
risk of ruin , R=5%, which gives alpha = 1.498. This means that the
scaling factor A is then from Eqn(74),


A_wong = $5000/(1.498*547.8) = $6.09
A_all = $5000/(1.498*883.9) = $3.78

and again the betting schemes may be computed as in Eqn(84).

As a test of the validity of the above analysis, a simulation was set
up with the same game settings as that which generated the above table.

For a given betting scheme and bankroll, sets of trials were run, where
if the bankroll was doubled a 'win' was recorded, and if the bankroll was
lost, a 'ruin' was recorded. In either case, the system is reset and
another trial begun. This gives the risk of ruin before doubling, which
is only slightly less than the infinite win formula given above.

We have four cases, two with the Wonging scheme and two with the play
all scheme. For each scheme, two bankrolls are used, the $5000 bankroll
specified to give a 5% risk of ruin, and the K[B] bankroll, designed to
test Eqn(73). In all cases, 100 trials were done and the risk of ruin,
the average number of hands to ruin, or to win is computed.

Results:


Spread | Bankroll ROR AvHands(W) AvHands(R) N0[B] alpha
------------------------------------------------------------------------------
B_wong | $5000 4.0% 75887 36073 27845 1.498
B_wong | $3340 12.0% 47114 22351 27845 1.000
B_all | $5000 3.0% 127251 93909 44287 1.498
B_all ! $3340 12.0% 68365 62653 44287 1.000

It can be seen that, while the ROR figures are approximate for the small
number of trials, the figures are consistent with the above analysis.
It is also apparent that the average doubling time is proportional to
N0[B], as it must be said, is the average ruin time. This may be related
to the concept of trip-risk which has been discussed by Bryce Carlson.

Conclusions

In this article, it has been demonstrated that the basis of all forms of
optimal betting, resides with the optimal betting spread b(i). It has been shown
that through the minimisation of the functional n0[b], the optimal spread b(i)
may be computed in a way which is independent of any betting method which may
be used. Further, a method has been given which allows direct calculation of the
functional k[b], which defines the solution of the problem. The explicit Kelly
scheme was examined, and shown to produce the same solution, provided the
minimum Kelly fraction fmin is identified with 1/k[b]. However, it was also
demonstrated that for a fixed betting method, the optimal spread produces
the fastest mean linear growth, for a given bankroll and risk of ruin. It
was shown in this case that the ratio C/(A*k[b]), where C is the bankroll and
A is the betting factor, determines the risk of ruin.

So in conclusion, the concept of an optimal betting spread stands apart from
the betting method used. Once the betting method has been chosen, be it
Kelly or fixed, this then provides the interpretation of the functional k[b].
While the optimal betting scheme can be directly calculated from within
a Kelly system, this must be seen a special case of a more general problem.

Brett Harris.