We all know Christmas is an expensive time of the year, perhaps it is due to this that I have spent a little time looking into a gambling strategy, with the hope I can recoup all my expenditure from this period. I clearly must be desperate as this has lead me to look at a betting system popular in 18th century France.
What is the Martingale System
Imagine you have something to bet on with 50/50 odds – The classic example of this is a coin toss. 50% of the time the coin will land on heads, 50% of the time the coin will land on tails. The martingale System is to double our bet each time we lose – eventually we will win and we will have profited. Lets look at an example of this;
Imagine we toss a coin 7 times, I bet on heads every time and if I win I double my stake. So we have a situation like this.
Here you can see I lose 6 times in a row – but on the 7th bet I win. As i’ve doubled my bet each time I profited out of this to the sum of £1.
Ok, well £1 isn’t going to pay for Christmas so lets increase our stakes to a starting position of £1000;
you can see this scales as expected – 1000 times the steak leads to 1000 times the profit.
Currently I am putting on my coat ready to go to the casino, this is free money isn’t it? just before I leave the house the words of my legendary high school statistics teacher ring out loud in my head (“Gambling is a tax on people who aren’t good at probability” – Mr Bland circa 2001).
Lets do a little bit of maths on this before I take out a Mafia loan and go for it.
The Maths Behind Martingale
Lets try to find a formula to work out what we would bet at step K (a variable denoting any given position).
We are increasing our bets to the power of 2, this means that at step K the formula would be 2K-1
So for example at bet number 3
2K-1 = 23-1 = 22 = £4
So we know what our bet would have to be at any point in this system. Now we want to know what our total loss would be at step K. This is all the losses that have taken place up to step K so if we win at bet number 7 (as in our example) that would be;
1+2+4+8+16+32 = 63 (as shown before). This can be written as 1+2+4+8+2K-1. this is a geometric series so we can sum this as follows;
The first term in the sequence, multiplied by 1 minus the next term in the sequence, divided by the 1 minus the common ratio (the increase in bet size) this gives us
1(1-2k)/1-2 which can be simplified to 2k-1
So at this point we have 2 formulas one to calculate any winning position and one to calculate losses for a given winning position;
Win: 2k
Loss: 2k-1
With me so far? No? – Doesn’t matter lets check this. lets say we lose at step 7 as in our initial example.
Winnings at Step 7 = 2k = 27 = 128
Loses up to step 7 = 2k – 1 = 128 -1 = 127
Profit = 1
This reconciles with our initial example a £1 profit. So this is free money then?!
Yes… sort of – if you follow this method at some point – you will win £1 – this also scales in a linear fashion by increasing the stake as demonstrated earlier.
Why sort of? why cant we just go and do this? well… while theoretically true there are some real world issues with this.
Real World Issues
There are a number of issues regarding actually implementing this strategy in the real world, sadly casinos hire people who are a lot better at maths than me! The main issues behind this strategy being applicable in a real world situation are as follows;
- What bet can you make that is actually 50/50 – the closest I can think of is roulette (red or black) – but the roulette table has 0 (neither red nor black) – this tilts the probability in favour of the casino
- Maximum bet limits – Most casinos have a maximum bet limit, this is horrifically problematic in the nightingale system as once you reach this point – if you lose you can no longer double the size of your bet and you have lost everything.
- Finite resources – No one has infinite money, its not possible to go on doubling forever – eventually your resources will run out and you will no longer be able to continue to double your bet, meaning you have lost everything up and to that point (which due to this exponential growth can be a huge sum of money).
Lets focus on the finite resource issue – lets say we found a casino stupid enough to have a genuine 50/50 bet with no maximum betting limits. What I want to know is how far I can bet on this process without going bust.
Lets say N represents my total funds I can bet with. If £2k is ever > N I am bankrupt and I lose everything. k here represents the number of loses we are allowed before I go bust. If I look at the boundary case (where I would go bust) that is 2k = N the point where all my funds are in use.
This can be simplified to K=log2N. Still with me? No – well lets look at some examples again, and this will make sense. Lets apply this function to different bank balances.
So if I have £100 I can afford to occur 7 loses before I lose everything. but what is more interesting here is if I massively increase the amount of money I have to bet – the rate in which I can take losses slows down. for example from a starting balance of 100 to a starting balance of 100,000,000 (100 million) – I only gain the ability to lose 20 more times while I need 1 million times the money.
We can look at the probabilities of losing K times in a row – this is actually quite simple. Given we are operating in a coin toss we know the probability of winning each event is 1/2 So using our £100 starting bet what is the probability of losing 10 times in a row?
P( lose 7 times in a row) = (1/2)7 = 0.008 Therefore
P(win £1 where N=100) = 1-0.008 = 0.992
So basically – we have a 99% of winning £1 starting with £100.
That sounds amazing lets do it!!
Wait…
we have a 1% change of losing, but we don’t lose £1 – we lose everything – £100 in this case.
Is that worth it? – Lets look at one final scenario. What do we have to do to double our money, to make it worth our while.
Doubling our Money
starting with £100 – we need to win 100 times to double our money as each time with this system we have a 99% chance of winning £1.
So the probability of this is 0.99*0.99*0.99 100 times.. Or 0.99100
P(doubling money with N=100) = 0.366 or 37% chance of doubling…. oh, that’s not that great, but we know throwing more money at the situation might help – lets look at that again;
what… that hasn’t changed it at all. Well there is a limit here – as our N value gets bigger the probability of winning increases slightly – but it always less than 1 – however the power we apply to this also increases. instead of 0.992100 we now have 0.9931000. When we have numbers less than 1 raised to any power is going to get smaller and smaller.
We reach an actual limit – 0.3678779. This is due to Eulers number the point in which the opposing forces of a small increase in probability is nullified by the increase in the power. This is a special constant (e) which appears in all kinds of gambling / growth statistics. Perhaps I should do a post on this in the future.
Conclusion
So no matter what amount of money I have using this gambling method I have a maximum 0.36% chance of doubling my money. Is this good? well.. no. I’d be better off taking my total balance £100 (or whatever balance I have) and just putting it on heads on the first round. Then I’d have a 50% chance of doubling my money.
Sadly my conclusion is that despite what it initially looked like – the Martingale system will not pay for Christmas. Theoretically I can win every time with infinite money, but as time goes on long enough – my expected value shrinks to zero due to Euler’s number.