Jim Killingsworth

Fixed Frac­tions and Fair Games

A gam­bler has a $100 bankrol­l. He’s feel­ing lucky and he wants to make some bet­s. But he on­ly wants to play fair games where the ex­pec­ta­tion is breakeven for a large num­ber of plays. If the gam­bler plays a fair game re­peat­ed­ly us­ing a con­stant bet amoun­t, would it still be a fair game if he de­cides to bet a fixed frac­tion of his bankroll in­stead of bet­ting a fixed con­stant amoun­t?

Coin Toss Game

Sup­pose the gam­bler wants to place bets on the out­come of a coin toss. Ig­nor­ing the small pos­si­bil­i­ty of the coin land­ing on its edge, there are on­ly two pos­si­ble out­comes: heads or tail­s. We can mod­el a re­peat­ed coin toss game us­ing the fol­low­ing no­ta­tion:

Figure 1

If we as­sume it’s a fair coin, then each of the two out­comes has a 50% prob­a­bil­i­ty of oc­cur­ring for each toss of the coin:

Figure 2

The gam­bler needs to de­cide how much to bet on each play. If he bets his en­tire stake, then he risks los­ing every­thing in the first round. If he on­ly bets a por­tion of his bankrol­l, then he can af­ford to ab­sorb a few loss­es with­out go­ing broke. There are two bet­ting strate­gies the gam­bler can choose from: a fixed con­stant bet size strat­e­gy and a fixed frac­tion bet size strat­e­gy. The gam­bler must choose one strat­e­gy and stick to it for every round of the game.

Fixed Con­stant Bet Size

Us­ing the fixed con­stant bet size strat­e­gy, the gam­bler must choose a spe­cif­ic amount he wants to wa­ger on each play. Sup­pose the gam­bler wants to bet $20 on each round. We can mod­el this as 20% of the gam­bler’s ini­tial bankrol­l:

Figure 3

Now let’s de­fine a re­ward func­tion to de­ter­mine the pay­off for each round based on the out­come of the coin toss:

Figure 4

The gam­bler gains $20 if the coin lands on head­s; he los­es $20 if the coin lands on tail­s. Is this a fair game? The an­swer might seem ob­vi­ous, but let’s make some em­pir­i­cal ob­ser­va­tions just to be sure. We can use the re­ward func­tion above in the fol­low­ing equa­tion to com­pute the gam­bler’s hold­ings for a se­ries of coin toss­es:

Figure 5

Us­ing a ran­dom num­ber gen­er­a­tor, we can run a com­put­er sim­u­la­tion of the coin toss game and plot the gam­bler’s bankroll af­ter each round. Here is a plot of the gam­bler’s hold­ings over a pe­ri­od of 200 plays us­ing a ran­dom se­quence of coin toss­es:

Figure 6

It looks like it just zigza­gs up and down ran­dom­ly with no clear pat­tern. Em­pir­i­cal­ly, this does­n’t tell us much. If we run 10,000 unique sim­u­la­tions like the one above and then take the av­er­age val­ue for each play, here is the re­sult that emerges:

Figure 7

The val­ue ap­pears to have a steady mean of $100, sug­gest­ing that this is in­deed a fair game with a breakeven ex­pec­ta­tion. Tak­ing the me­di­an val­ue for each round pro­duces a sim­i­lar re­sult:

Figure 8

The me­di­an val­ue strad­dles the breakeven val­ue of $100, lend­ing fur­ther ev­i­dence that this is in fact a fair game. But can we de­ter­mine the ex­pect­ed out­come an­a­lyt­i­cal­ly? Con­sid­er the arith­metic mean as the num­ber of plays ap­proach­es in­fin­i­ty:

Figure 9

If we know the prob­a­bil­i­ty of each out­come of a coin toss, then we can use the law of large num­bers to de­ter­mine the num­ber of win­ning games and los­ing games for a large num­ber of plays. Let’s use the fol­low­ing no­ta­tion:

Figure 10

In­stead of tak­ing the lim­it as the num­ber of plays ap­proach­es in­fin­i­ty, we can com­pute the arith­metic mean us­ing the num­ber of win­ning and los­ing games based on the ex­pect­ed be­hav­ior of a coin toss. As demon­strat­ed be­low, the arith­metic mean is equal to the gam­bler’s ini­tial bankrol­l; a re­sult that cor­re­sponds to the em­pir­i­cal ob­ser­va­tions de­rived from the sim­u­la­tion­s:

Figure 11

While this is cer­tain­ly a fair game, look close­ly at the re­sult of the re­peat­ed coin toss sim­u­la­tion. The gam­bler’s hold­ings dip be­low ze­ro for a few rounds be­fore mov­ing back up. This might not be pos­si­ble if the gam­bler is un­able to bor­row a few bucks to tem­porar­i­ly cov­er his debt. Al­so, note that the con­stant bet size is a small­er per­cent­age of the gam­bler’s stake as his win­nings in­crease, but it’s a larg­er per­cent­age of his stake as his hold­ings de­crease. What hap­pens if he bets a fixed per­cent­age every time?

Fixed Frac­tion Bet Size

Us­ing the fixed frac­tion bet size strat­e­gy, the gam­bler choos­es a fixed per­cent­age of his bankroll to wa­ger on each play. Sup­pose the gam­bler wants to bet 20% on each round:

Figure 12

Like the pre­vi­ous ex­am­ple, we can de­fine a re­ward func­tion to de­ter­mine the pay­off for each round based on the out­come of the coin toss:

Figure 13

In this case, the re­ward func­tion re­turns a mul­ti­pli­er that gets ap­plied to the gam­bler’s bankroll af­ter each round. The fol­low­ing shows how to ap­ply the re­ward func­tion for a se­ries of coin toss games:

Figure 14

Us­ing the same se­quence of coin toss­es from the pre­vi­ous ex­am­ple, we can sim­u­late the coin toss game again us­ing the fixed frac­tion bet size strat­e­gy. Here is a plot of the gam­bler’s hold­ings over the same 200 coin toss­es us­ing fixed frac­tion bet­s:

Figure 15

It looks like it bounces up and down with small­er and small­er spikes un­til it ul­ti­mate­ly fiz­zles out to ze­ro. Here is the same plot on a log­a­rith­mic scale:

Figure 16

On the log­a­rith­mic chart, the plot looks sim­i­lar to that of the game played with a fixed con­stant bet size, on­ly with a slight tilt down­ward­s. Does this in­di­cate a down­ward bias when play­ing with the fixed frac­tion bet size strat­e­gy? Let’s see what hap­pens if we take the av­er­age val­ue of 10,000 sim­u­la­tion­s:

Figure 17

As with the pre­vi­ous ex­am­ple, the val­ue ap­pears to have a mean of $100. No­tice, how­ev­er, that the val­ue seems to be­come in­creas­ing­ly un­sta­ble as more rounds are played. Tak­ing the me­di­an val­ue for each round pro­duces a very dif­fer­ent re­sult:

Figure 18

Un­like the pre­vi­ous ex­am­ple, the me­di­an val­ue de­cays steadi­ly down­ward, grad­u­al­ly ap­proach­ing the ze­ro as­ymp­tote. Here it is again on a log­a­rith­mic chart:

Figure 19

So is this a fair game or not? The mean val­ue sug­gests that it might be, but the me­di­an val­ue sug­gests oth­er­wise. What if we take an an­a­lyt­i­cal ap­proach? Since the fixed frac­tion bet­ting strat­e­gy is mul­ti­plica­tive in­stead of ad­di­tive, let’s con­sid­er the geo­met­ric mean in­stead of the arith­metic mean:

Figure 20

Us­ing the law of large num­ber­s, we can ap­ply the ex­pect­ed num­ber of win­ning and los­ing games as we did be­fore in the pre­vi­ous ex­am­ple. The fol­low­ing cal­cu­la­tion pro­vides an ex­pla­na­tion for the me­di­an val­ues ob­served in the sim­u­la­tion re­sult­s:

Figure 21

The geo­met­ric mean com­put­ed above in­di­cates that the gam­bler’s bankroll is ex­pect­ed to be a frac­tion of its pre­vi­ous val­ue af­ter each play, lead­ing to a con­clu­sion that the gam­bler is at a dis­ad­van­tage when play­ing with a fixed frac­tion bet­ting strat­e­gy. But how can we ac­count for the breakeven av­er­age val­ues we ob­served in the em­pir­i­cal re­sult­s? Per­haps we can get a bet­ter un­der­stand­ing if we ex­am­ine the pos­si­ble out­comes more close­ly.

Un­der­stand­ing the Re­sults

What ex­act­ly does it mean for a gam­bling game to be a fair game with a breakeven ex­pec­ta­tion? As we saw with the fixed frac­tion bet­ting game, the an­swer can be some­what am­bigu­ous. There are two as­pects of the coin toss game that are worth look­ing at:

Let’s sup­pose the gam­bler plays two rounds of the coin toss game and al­ways bets on head­s. There are four pos­si­ble out­comes, each with an equal prob­a­bil­i­ty of oc­cur­ring. If the gam­bler choos­es the fixed con­stant bet­ting strat­e­gy, the val­ue of the gam­bler’s stake af­ter each pos­si­ble out­come is shown be­low:

Figure 22

In this case, the av­er­age val­ue of all pos­si­ble out­comes is $100, which is the breakeven amoun­t. Al­so no­tice that there are an equal num­ber of win­ning games as there are los­ing games. Both as­pects are in­dica­tive of a fair game. If the gam­bler choos­es the fixed frac­tion bet­ting strat­e­gy, the re­sults are a bit dif­fer­en­t:

Figure 23

As with the fixed con­stant bet­ting strat­e­gy, the av­er­age val­ue of all pos­si­ble out­comes is $100. The fixed frac­tion game is a fair game in this re­spec­t. Now look at the num­ber of win­ning out­comes ver­sus the num­ber of los­ing out­comes. On­ly 25% of the out­comes are win­ner­s, while 75% of the out­comes re­sult in a loss. The play­er is three times more like­ly to have a los­ing out­come than have a win­ning out­come, which is not a fair ex­pec­ta­tion at al­l. But while a los­ing out­come is more like­ly, the pay­off of a win­ning out­come is large enough to off­set the oth­er three los­ing out­comes com­bined.

Ac­com­pa­ny­ing source code is avail­able on GitHub.

Com­ments

Show comments