There is a formula !

by Brett Harris.



Posted by brh on May 27, 1997 at 10:20:48: In Reply to: There must be a formula posted by David D'Aquin on May 24, 1997 at 09:28:45:

Hi people,

I have thought about this for a while and come up with a solution. Yes it is possible to find the optimal betting spread for a given max and min bet.

The proof is in two stages. The first part shows how betting proportionally to VAR(i)/EV(i) for each TC, in between the max and min bet minimises N0, and therefore maximises growth. The second part shows how to match the true count at maximum bet to give the correct VAR/EV for the entire system, which matches the bankroll used to calculate the proportional bets.

Firstly, we need the following quantities.

E(i) = expectation per unit bet at true count i
V(i) = variance per unit bet at true count i
C(i) = proportion of hands which occur at true count i
B(i) = bet at each true count i (yet to be determined)
T = true count at which maximum bet is reached (yet to be determined)

Let the betting spread be 1 to M, and although I will assume no wonging, it does not affect the argument. I will redefine (cf unbalanced counts) the true count such that E(i) > 0 for i=1,2... , and E(i) < 0 for i=0,-1,-2 ... .

Then the total system values are given by :

E_tot = Sum(i=-inf,inf)[ C(i) E(i) B(i) ]

= Sum(i=1,T) [ C(i) E(i) B(i) ]
+ M * Sum(i=T+1,inf) [ C(i) E(i) ]
- 1 * Sum(i=-inf,0) [ C(i) |E(i)| ]

= Sum(i=1,T) [ C(i) E(i) B(i) ]
+ M * Q(T)
- E_minus

V_tot = Sum(i=-inf,inf)[ C(i) V(i) B(i)^2 ]

= Sum(i=1,T) [ C(i) V(i) B(i)^2 ]
+ M^2 * Sum(i=T+1,inf) [ C(i) V(i) ]
+ 1 * Sum(i=-inf,0) [ C(i) V(i) ]

= Sum(i=1,T) [ C(i) V(i) B(i)^2 ]
+ M^2 * R(T)
+ V_minus

where

Q(T) = Sum(i=T+1,inf) [ C(i) E(i) ]
R(T) = Sum(i=T+1,inf) [ C(i) V(i) ]
E_minus = Sum(i=-inf,0) [ C(i) |E(i)| ]
V_minus = Sum(i=-inf,0) [ C(i) V(i) ]

Now since N0 is defined as N0 = V_tot/(E_tot)^2, it is possible to differenciate NO with respect to the B(i), and set the result to zero. After some algebra this gives :

dN0/dB(i) = 2/E_tot^3 * C(i) * [ E_tot V(i) B(i) - V_tot E(i) ] = 0

Solving for B(i) gives:

B(i) = E(i)/V(i) * V_tot[B]/E_tot[B]

where the square brackets remind us that V_tot and E_tot are themselves functions of all of the B(i)'s. So this tells us that the bets at the intermediate levels are proportional, but we do not know the value of the constant V_tot/E_tot, since this also depends on the B's. But, this does not matter, we do know that B(i) can be written as B(i) = E(i)/V(i) * K, where K is yet to be determined. This is the first part of the proof, and is basically Winston's theorem.

The intermediate bets are Kelly bets, proportional to a yet undetermined bankroll.

Now substituting these values of B(i) back into the original defintion of E_tot and V_tot gives

E_tot = K * P(T) + M * Q(T) - E_minus
V_tot = K^2 * P(T) + M^2 * R(T) + V_minus

where

P(T) = Sum(i=1,T)[ C(i) * E(i)^2 / V(i) ]

But we know by definition that K = V_tot/E_tot, or E_tot * K = V_tot, so by substitution

K^2 * P(T) + K * M * Q(T) - K * E_minus = K^2 * P(T) + M^2 * R(T) + V_minus

which solving for K gives:

K(T) = [ M^2 * R(T) + V_minus ] / [ M * Q(T) - E_minus ] (1).

Notice that the terms involving K^2 * P(T) cancel out, as these correspond to the intermediate bets, and in a sense they are already optimally matched.

Look at the above expression, R(T) is the unit variance from tc values above the max bet, so the first term is the variance from the max bets, V_minus is the variance from the min bets, so the numerator is the combined variance from the non-optimal bets. Similarly, the denominator is the combined expectation from the non-optimal bets. So this expression is the ratio of non-proportional variance to non-proportional expectation.

But it is not yet the solution, as we are not constrained in our choice of T. However, there is another expression for K which we have not yet used, which is that at tc=T, our bet is M, which is proportional to V(T)/E(T), in fact

M = K * E(T) / V(T), or K(T) = M * V(T)/E(T) (2).

We now have two expressions for K(T), which when combined can be solved simultaneously for one unique value of T, which is the point of maximum bet. This is the second part of the proof.

For the value of T which simultaneously solves Eq (1) and (2), we have the optimal betting spread from 1 to M, which minimizes N0, and the bankroll K units required for the spread.

Another way of stating the result is that for the optimal betting spread with constraints, the ratio of non-optimal variance to non-optimal expectation is equal to the ratio of variance to expectation for the optimal bets, where all bets are optimal between the max and minimum bets.

Simultaneously solving (1) and (2), still requires some trial and error with a spreadsheet, but one now has only one degree of freedom, namely the value of T. Actually, if one differentiates (1) with respect to T, (a procedure which requires care in handling the boundary terms at i=T), and sets the result to zero, equation (2) is obtained. This leads to the corollory

The value of T which solves Eq (1) and (2), is the value of T which minimises the value of Eq (1).

This is useful, since Eq (2) is basically a decreasing function of T, reflecting smaller bankroll requirements at higher tc's, but Eq (1) is, like N0, a function with a definite minimum which can be found with some trial and error.

I think Richard Reid identified Eq (2) in his post, and Winston has been advocating proportional bets at intermediate levels for a while. I hope this proof can clear up some of the confusion.

Cheers, brh.
Return to: Bet Sizing