We're gonna go gambling. We're creating a- let's call it a fictional casino and we're playing a game with a 50/50 chance of winning. Okay, so we're doing roulette -. red or black so there's no zero, so it is actually a 50/50 chance red or black. What we're going to look at is something called the Martingale Strategy. Every time you lose a bet you double down on the next bet; and therefore eventually, you will win - is the idea.. - (Brad: What do you mean by) (double down?) So if you bet one pound and lose then you bet again and you would bet two pounds; and then if you lost again then you go four pounds; if you lose you go eight pounds. So you double the last bet you made. Provided you have pretty much unlimited money you will eventually win. A win is: come out of our fictional casino with more money than I went in. (You want to make a profit.). - Exactly we're making a profit. - (Should we say we're) (always betting on red?) (Or black or-?), - I think- I'm tempted to go black. So I write with a black pen. I think if I was given the choice I would- I would I'd like a- I'm going for black over red I think. (Okay so we're betting on black.), - Betting on black. And we're going to keep going; you think about well when is the first time I lose? So if I lose at step k I've had my bet at step 1, and I bet one pound, and. then I must have lost because we're assuming we're going to keep going until this number k. Then at step 2 I bet two pounds. Then step three - again we're assuming I've lost at step 2 - I double my bet so this is now going to be four pounds. Step 4 is going to be double that, eight pounds, and this carries on., - (If you win your money gets) (doubled?), - If I win my money will be doubled, yes, it's a 50/50 game such that whatever I bet- like in, exactly like roulette. We don't have a zero but the rules otherwise are the same. If I bet on black, which is what we're doing, if it lands on black I double my money. (Because that zero is how. casino is insured.) The zero- exactly. You know this way. The zero is how- casinos know this and this is why they have zero, because it's never a 50/50 chance. But our mathematically fair casino gives us a true 50/50 chance. At step k then we can figure out how. much we would be betting because there's a pattern here. So at step 1 I bet one pounds, step 2 two pounds, step 3 four pounds. So what's happening with our bets is these are increasing powers of 2. So this is times 2, times 2, times 2. So the actual formula is going to be 2 to the power of k minus 1. So we can just check this: so at step 1, so k is 1; 2 to the power of 0 is 1. Step 2 k is 2, 2 to the power 1 is 2; 2 squared is 4, 2 cubed is 8 so at step k we have just bet 2 to the k minus 1 pounds. If I then lose at step k my total loss so far is the sum of all of these bets; so 1 plus 2 plus 4 plus 8 all the way up to 2 to the k minus 1. We can write this as the sum from j equals 0 to k minus 1 of 2 power j. So 2 to the 0 is 1 then plus 2 to the 1 is 2 plus 2 squared is 4. So this is a shorthand way of writing out this sum. And this is what we call a geometric series; we have a formula for the sum of a geometric series so we can plug it in. It's the. first term, which is 1, multiplied by 1 minus the next term in the sequence. So it ends at 2 to the k minus 1 so if we were to go to the next step that would be 2 to the k; and then we divide by 1 minus the common ratio between the terms. So what we're multiplying by at each step, so divided by 1 minus 2. So you tidy this up and this is 2 to the k minus 1. So this is the total amount of money I have lost when I lose my bet at step k. So in the next step I'm going to bet 2 to the k pounds - I'm going to win hopefully and then that covers my losses with one pound to spare. So after all of this effort, after losing at some step if I follow the Martingale strategy I will eventually win - we hope - before I run out of money, that's a whole other question, and I will win one pound. So we're not exactly- like it's good, it's a profit, but it's it's not like- we want more than a pound don't we really? Like you don't really go to a casino to make a pound. (But if you scaled it to 10 pounds or a) (million pounds as) (as your- like your multiple) (you you're guaranteed to win a million pounds!) Yeah, so so to win a million pounds you've got to go through this strategy one million times, winning one pound each time. (Or just make that a million pound bet;) (a two million pound bet; a four million) (pound bet, all the way to a two) (to the minus 1 times a million-)
- We could also do that yeah. So we could also change the amount we bet at the beginning and then that would be- the amount that you your initial stake is the amount that you'll win through this strategy. So this strategy is going to win you, through this process, we're going to win a pound each time. Now, there are problems with this. There is a reason that this is not a foolproof gambling strategy. First of all most games aren't 50/50; if we're doing roulette there's a zero which is green, so it's not red or black, so you've not actually got a 50/50 chance. And that kind of really alters what's what's happening.. - (In some casinos there) (are two zeros) Yes zero and double zero, exactly yeah, so they're even- they're even stingier those odds. The other thing is casinos have maximum bet limits. In most casinos you can't walk in and just drop a million pounds, like they're gonna be like no there's a maximum bet limit here. And even if you start really low and you keep losing this will grow really quickly. This is exponential growth which we know a lot about these days. And this will grow really quickly and it will actually reach a million a lot faster than you realise. - (So if red comes up) (lots of times in a row - ?), - Yeah you're going to reach the maximum betting limit in an actual casino and then you're screwed, you've then lost like a million pounds, you've not got a chance to get your money back. Because that's the key; if this fails you've lost 2 to the power k minus 1 pounds which is a lot of money if k is like 10 or something, like, so it can really really ramp up. (Just for the sake of clarity too Tom, I) (would imagine) (it doesn't really matter what you're) (placing the bets on, red or black?) (Like you don't really have to be betting) (on the colour you lost on?), - No no no exactly. Every time, because it's an equal chance of each one coming up, you you can switch. You could maybe go red, black, red, black, red, it doesn't matter because the probability will always be a half and and it will always be the same. (So you don't have to bet on what you) (lost on, you just have to- you just, have to bet) (again.). - Just have to bet again, yes exactly, you can bet on anything - in the 50/50 situation. Another issue, nobody in the world has unlimited money. It might feel like some people do but there is a number where the maximum amount any individual could bet. That's our bank balance, n pounds. If at any point we need to bet more money than we have we're screwed. Not only can we not win our one pounds we've literally lost. everything that we own. So we really don't want this to happen. (Does your previous winnings) (become part of that. pot you can dig into?) No so so the the 100 pound limit here is the- like that's my pot. So even if I start to win, maybe I've won 50 in a row and now I in theory have 150, but what we're saying here is that 50 I've won that that's in a separate pot. That's in like a- that's in your money box, that goes in the bank you cannot touch that. We've said here that we're losing at step k and in the next step we would have to bet 2 to the power k. So if I have to bet 2 to the k pounds; if this is ever bigger than my n pounds, game over. Sad face, that's it. - (You're bankrupt) We all cry. So we can't have this happen. Now what you can figure out is how does this tell you about k? Because k remember is the number of losses that were allowed. So we can start to plug some numbers in here and think about, well if I go in with 100 pounds how many losses am I allowed before I lost all my hundred quid? You just rearrange this slightly so we can say 2 to the k is equal to n, just to make things a bit easier, so obviously if we go a little bit above this then we fail so let's look at the boundary case of when they're equal. So then you take log to the base 2 of both sides and what that does is tell you this to be our value of k. Now this is quite hard to interpret because we don't really have any numbers, so let's put some numbers in. So if I come in with n being 100 pounds. So if we start with 100 pounds you're allowed seven losses, it's not too bad. But it might seem unlikely, I'm not gonna lose seven times in a row, you would be amazed how common it is to lose seven times in a row. Like there's loads of really nice studies done on this at how bad we are as humans at thinking 'oh I'll never be that unlucky'. It's really easy to lose seven times in a row. (Seven reds in a row and, you're- you're out?) If we're betting black yeah. And then if you went up to say a thousand pounds then you will get about 10 losses. So even though you've ten times your initial stake you only get an extra three losses. And this kind of pattern continues, it starts to come down. So if you had 10,000 pounds then you've got 14 losses and if you even went all the way up to Brady's idea of a million pounds you've got 20 losses. You get twice as many losses from 10 to 20 going from a thousand to a million pounds. No matter how much your money goes up this starts to slow down quite drastically. (And still this is only going to win you) (one pound!). - This is to still win one pound, yeah, this is just to win one pound. We have this relationship then between the number of losses and the money that we've put in. So what we can do then is say, right well, it's a 50/50 game so what is the probability that I lose k times in a row? Well if I lose once that's a half, then if I lose again that's a half; these are independent events it doesn't matter what happened in the previous one. So it's literally just a half to the power k. So if I've lost k times it's a half to the power k. This is actually 1 over 2 to the k. And we have this relationship up here between 2 to the k and the amount of money we start with, n. So the probability that I lose k times in a row and lose all of my money and all of my belongings is 1 divided by the amount of money I have in the first place. So perhaps as expected the richer I am the less likely it is that I lose all of my money. And we have this really nice probability given in terms of the amount of,
money we start with. So if this is the probability that I lose k times in a row, and lose all of my fortune, then the probability that I win - which here is winning one pounds - is 1 minus this because the total probability has to always be 1. So the probability that I win one pound using this strategy is 1 minus 1 over n. And as n increases this number goes really small so the probability is really close to 1. (If you Tom walk into the casino with a) (hundred pounds in your back pocket, which) (I think is conceivable-), - Okay yeah let's go with that. (And you play this strategy; how) (likely is it you're gonna walk out with) (your one pound profit?) So if I put in, for n equals 100, then the probability I win one pounds is going to be 1 minus 1 over 100, so that's going to be 99 out of 100. So there's a 99% chance that I win a pound but, and this is the key thing, there's a 1% chance - really small - that I lose 100 quid. I really don't want to lose 100 quid to have even- because I'm only doing it to win a pound, is it worth? So it's only a 1% chance yes but is it worth that 1% chance that I lose my hundred quid just to win a pound? If we do this properly, I want to double the money I start with. So we need to win one pound 100 times in a row. So we need to go through this whole strategy, with our probability of 1 minus 1 over n, but we need to do it 100 times in a row and so I'm going to need more paper. The probability of winning one pound is 1 minus 1 over n. So the probability of winning 100 times in a row, which means winning 100 pounds, is just- well I need to win the first one, then I need to win the second one, so that's just multiply the probability together, then I win the third - so it's actually just this to the power of a hundred. If I wanted to win 100 times in a row it's this probability to a higher and higher power. We're using the example here of me. and my hundred pounds if I just wanted the probability of doubling my money, for any n, then it's going to just be 1 minus 1 over n. Each time I win one pound I've got to win n times so it's 1 minus 1 over n to the power n. What is going on here? So let's put in some numbers. If n is a hundred we plug this into our formula, so it's gonna be 1 minus 1 over 100 to the power 100, and that comes out to be 0.366, so if we put that as a percent it's going to be 36.6%. So a little bit over a third chance of me going in with my 100 pounds and doubling my money through this Martingale doubling strategy., - (So this is a long night?) This is a very long night, yeah. Because that's- I've literally got to win 100 times in a row. So I have to employ this strategy 100 times- and and hope that none of them- if I ever get a long enough losing streak to run out of money that's it I've lost my 100 pounds. So I really do need to go back and redo the same thing 100 times. But if I do that I then got 36.6% chance of doubling my money through this strategy. Suppose I'm a little bit more of a high roller and I go for a thousand pounds, the value is 0.368. So if I have a little bit more money I get an increase, 0.2%. Still starting with one dollar bet so I can never bet anything more than a thousand, that's like all I'm prepared. to put forward into this situation. And then if I was to really go big and start and say, well, you know what I've got a million pounds of capital - I wish - then the value here is also 0.368. 36.8%. So something's happening. This is this is- as a mathematician this is where you get your joy, you sort of- you start thinking about these fictional casinos, these probability problems, and then you start to spot patterns - what the hell's going on? What we're really doing here, as n is increasing, is you've got like a contest between these two numbers. Because as n gets bigger and bigger this value in the bracket gets closer to 1 because you're taking away a smaller smaller number. But as n gets bigger you're taking a number less than 1 to a larger and larger power. And when you have numbers less than 1 to any power, so say a half squared, it gets smaller. So any number less than one raised to any power, positive whole number power, is going to get smaller and smaller. So this is always less than 1 and we're raising it to a, bigger and bigger power. So it's- there's like a competition because you're taking away smaller pieces but you're multiplying it by itself more and more times. And that's why you get this limit, it's an actual limiting process, the two balance out and eventually reach this constant. And the constant, and this is my favorite bit about this whole problem, if you take n to infinity and do a proper limiting process on 1 minus 1 over n to the n this is 1 over e - euler's number, the. natural rate of growth; the number tattooed on my arm. It's- it appears everywhere right? Anything you're doing with growth; it seems anything with interest, gambling money, it's always e. So here it's 1 over e. So the big conclusion is if I have a fixed amount of money, n pounds, I'm willing to try and double using the Martingale strategy, no matter how much money I have the absolute best chance I have of doubling my money is about 37%, or 1 over e. And there's nothing I can do about that. If I get more and more money I still have the same chance, 36.8% chance, of winning in this method. So some of you may have spotted this earlier or may realised what's going on here. And you have to think, well, we're playing a 50/50 game, like we're literally playing roulette red or black. So we can go, through all of this and have, you know, the world's longest stint in a casino trying to double a million pounds and do a million iterations of the Martingale strategy but I'm never going to get more than a 36.8% chance of doubling my money. So why don't I just put everything on black on the first spin? Because then I've got a 50% chance of actually doubling my money. So the moral of the story I think is gambling strategies are all good and fun but they're always gonna break down for many reasons; one of which is you don't have an infinite amount of money. So even though we can in theory win one pound every time, if you let time be long enough you're never actually going to to double your money or your your expected value really does shrink to zero. So the Martingale strategy in theory looks great, if you do it with sensible numbers saying I want to double my money, literally you're better off just putting it all on black and hoping for the best. If you'd like to see even more Numberphile videos with Tom Crawford, well we've got a playlist. There's a link on the screen and down in the video description. ..Because there's more competition to eat those rabbits., - Also Tom will be appearing very soon on the Numberphile podcast so keep an ear out for that. Thank you also to Numberphile's patreon supporters. We have a list of the whole list of supporters, I'll include a link to that in the video description; but a few of them are also listed here on the screen you can see their names at the moment. Special thanks to them. If you'd like to help us out go to. patreon.com/numberphile. We really appreciate it but we also appreciate everyone who just takes the time to watch and like and share these videos, and that includes you. Yes you, I'm talking to you specifically.