# Kelly Betting and Magic Squares

Reno continues to be fun. Quick workout this morning followed by a walk around the casino just to get my vitamin D. Today should be a good day for writing, Cathleen is working the tradeshow all day so I should have a nice uninterrupted stretch.

The great thing about Cathleen is she has an audience member's sense of what is entertaining. As Henning Nelms put it in Magic and Showmanship, "

f = (bp - q)/b

Where f = fraction of your bankroll to bet

b = the odds on that bet

p = the probability of winning

q = the probability of losing

Now, that's a lot of shit to keep straight in you head, plus blackjack has a variety of bets to deal with. Most counters will not only use a simple count, but also will simplify Kelly with the following formula:

f = a/v

Where f = once again the fraction of your bankroll to bet

a = the players advantage

v = the games variance, usually the deviation of the game squared

The standard deviation in blackjack is right around 1.15 bets, squared that comes to 1.3225. So if the player's advantage is 2% that comes to .002/1.3225 = 0.15. So you would take your bankroll, say $200, your average bet should be $30.

Now, this is just the tip of the iceberg, everyone and their dog has an opinion on optimal betting, how it should be used, how complicated the formula should be, etc. etc. etc. If you check out any of the counting or advantage play forums you're going to see massive arguments being waged. It's actually a ton of fun to get lifted and read through those posts, but don't ever, ever get involved in them unless you want to see a black hole of time suck appear over your left shoulder and consume everything in its path. If the topic interests you I would highly recommend William Poundstone's fascinating book, Fortune's Formula: The Untold Story of the Scientific Formula that Beat the Casinos and Wall Street. (On a side note, all of Poundstone's books are fascinating, I highly recommend his biography of John Von Neumann, Prisoner's Dilemma.)

Now, my problem is how to represent the complex mathematics that a counter is constantly running through his head while simulating normal behaviour, and it must be entertaining. I was planning on having audience members call out numbers from 25 to 100 and then squaring them in my head or conversely extracting the square roots of a volunteer's number. To make it more impressive I could then do the same with cubing a number or extracting a large numbers cube roots. While this is an impressive feat, it lacks a visual punch.

On the other hand is the ever beautiful magic square. In case you don't know, magic squares are an arrangement of numbers in a square grid where the numbers in the columns, rows, and main diagonals all add up to the same sum.

So, the basis of the routine is to have an audience member shout out a number and then (rapidly and accurately) fill out a five by five square so that each row and column add up to that volunteered number. I love magic squares, they have been around since the beginning of time and are closely associated with hermetic studies. For instance, the square demonstrated above is commonly referred to as a Lo Shu square after the Chinese legend that states in order to control the Lo Shu river from flooding the square was used to control the course of the river's flow. (Western oculists will also refer to a variation of this square as the square of Saturn). In Agrippa's De Occulta Philosophia he expounded upon the magical significance of squares from the order of 3 to 9 each associated with one of the classical planets.

The main reason most magicians don't like using the magic square in performance is they say it's much too obvious that it uses mathematics in its construction and doesn't look 'magical' enough. Given the history of mathematics and the squares themselves this seems short sighted, but when I though about it, their perceived weakness of the feat is the perfect reason for me to include it in this lecture. Add to that the fact that it's visual, the audience can see me constructing the squares right in front of them, and voilà, I have the perfect way to represent the mental mathematics that are constantly going on behind the scenes.

That Cathleen, she's a keeper.

Soundtrack for this post:

I will be performing this new show, "Chicanery, Counting and Cee-lo: Memory and Simulation in Service to Skullguggery" on April 29th at 7:30 pm at Coney Island as part of the week long festivities for the Congress of Curious Peoples. More info here.

The great thing about Cathleen is she has an audience member's sense of what is entertaining. As Henning Nelms put it in Magic and Showmanship, "

*Entertainment is broader than amusement. Shakespeare's*Comedy of Errors*is amusing; his*Hamlet*is not. Nevertheless, the fact that*Hamlet*is far more popular than the*Comedy of Errors*proves that it is also far more entertaining.*" What brought this about is that a main part of the lecture is to show how much is going on behind the scenes while someone is counting cards. Most people just assume that the counter simply keeps track of which cards come out, that's all. In truth, there's a lot more going on, a big part of this being money management. Most, if not all, use some variation of the Kelly Criterion (also commonly referred to as Kelly Betting, Kelly Strategy, Kelly Formula, etc. etc.) While I'll go into more depth on this later, the basics of it is expressed in this formula:f = (bp - q)/b

Where f = fraction of your bankroll to bet

b = the odds on that bet

p = the probability of winning

q = the probability of losing

Now, that's a lot of shit to keep straight in you head, plus blackjack has a variety of bets to deal with. Most counters will not only use a simple count, but also will simplify Kelly with the following formula:

f = a/v

Where f = once again the fraction of your bankroll to bet

a = the players advantage

v = the games variance, usually the deviation of the game squared

The standard deviation in blackjack is right around 1.15 bets, squared that comes to 1.3225. So if the player's advantage is 2% that comes to .002/1.3225 = 0.15. So you would take your bankroll, say $200, your average bet should be $30.

Now, this is just the tip of the iceberg, everyone and their dog has an opinion on optimal betting, how it should be used, how complicated the formula should be, etc. etc. etc. If you check out any of the counting or advantage play forums you're going to see massive arguments being waged. It's actually a ton of fun to get lifted and read through those posts, but don't ever, ever get involved in them unless you want to see a black hole of time suck appear over your left shoulder and consume everything in its path. If the topic interests you I would highly recommend William Poundstone's fascinating book, Fortune's Formula: The Untold Story of the Scientific Formula that Beat the Casinos and Wall Street. (On a side note, all of Poundstone's books are fascinating, I highly recommend his biography of John Von Neumann, Prisoner's Dilemma.)

Now, my problem is how to represent the complex mathematics that a counter is constantly running through his head while simulating normal behaviour, and it must be entertaining. I was planning on having audience members call out numbers from 25 to 100 and then squaring them in my head or conversely extracting the square roots of a volunteer's number. To make it more impressive I could then do the same with cubing a number or extracting a large numbers cube roots. While this is an impressive feat, it lacks a visual punch.

On the other hand is the ever beautiful magic square. In case you don't know, magic squares are an arrangement of numbers in a square grid where the numbers in the columns, rows, and main diagonals all add up to the same sum.

So, the basis of the routine is to have an audience member shout out a number and then (rapidly and accurately) fill out a five by five square so that each row and column add up to that volunteered number. I love magic squares, they have been around since the beginning of time and are closely associated with hermetic studies. For instance, the square demonstrated above is commonly referred to as a Lo Shu square after the Chinese legend that states in order to control the Lo Shu river from flooding the square was used to control the course of the river's flow. (Western oculists will also refer to a variation of this square as the square of Saturn). In Agrippa's De Occulta Philosophia he expounded upon the magical significance of squares from the order of 3 to 9 each associated with one of the classical planets.

The main reason most magicians don't like using the magic square in performance is they say it's much too obvious that it uses mathematics in its construction and doesn't look 'magical' enough. Given the history of mathematics and the squares themselves this seems short sighted, but when I though about it, their perceived weakness of the feat is the perfect reason for me to include it in this lecture. Add to that the fact that it's visual, the audience can see me constructing the squares right in front of them, and voilà, I have the perfect way to represent the mental mathematics that are constantly going on behind the scenes.

That Cathleen, she's a keeper.

Soundtrack for this post:

I will be performing this new show, "Chicanery, Counting and Cee-lo: Memory and Simulation in Service to Skullguggery" on April 29th at 7:30 pm at Coney Island as part of the week long festivities for the Congress of Curious Peoples. More info here.