# Win a SMALL fortune with counting cards-the math of blackjack & Co.

by birtanpublished on August 21, 2020

welcome okay this is a bit of a special mythology today and number of you have requested that I do something on blackjack and card counting so here we go how to gamble yourself to fame and fortune I am being assisted today by

Fellow mathematician longtime colleague and part-time gambler Marty Rossia who was really good at this stuff and who has offered to share some of the mathematical secrets to coming out on top in gambling games like blackjack

Okay so let's begin with a couple of puzzles for the first puzzle suppose you're looking to bet on roulette the roulette wheel is numbered from 0 to 37 with 18 red numbers 18 black numbers and the green 0 so the chances of red coming

Up is just under 50/50 now let's suppose you've been watching the roulette wheel and of the last 100 spins red has come up 60 times what did you bet we'll come up next red black doesn't matter sounds too easy well this probably comes as a

Surprise but most people get this one wrong we'll give the answer in a little while our second puzzle actually arises in practice a standard way that casinos and gambling sites sucker people into betting for this puzzle you're given a

\$10 free bet coupon you can use the coupon to place a bet on any standard casino game roulette blackjack craps and so on if your bet wins then you receive the normal winnings for example let's say you bet red on roulette if red comes

Up you win \$10 of course when I lose the casino takes the coupon now here's the question what is the value of this coupon in other words what should or would you be willing to pay for such a coupon we leave that one for you to

Fight over in the comments but we'll give you a hint whatever you think the obvious answer is you're definitely wrong now on with making our fortune famously the mathematician Blaise Pascal sorted out the basics of probability in

Order to on some tricky gambling questions we're not dropping rocks Galileo also dabble in these ideas so if we roll a standard die then there's a one in six chance that five will come up on a

Roulette wheel there is a 1 in 37 chance that 13 comes up usual stuff and then comes in the money what really matters to a gambler is not only the odds of winning but of course also how much they get paid if they win right and that the

Idea of expectation expected fraction of the gamblers bet he expects to win or lose as an example suppose we bet a dollar on red on roulette we have an 18 and 37 chance of red in which case we win \$1 there's also a 19 and 37 chance

Of losing \$1 and so if we keep betting \$1 on red on average we expect a loss of 1837 – 1937 which is – 137th of \$1 or minus 0.03 dollars what this tells us is that in the long run we expect to have lost about 3% or whatever we've bet 37

Spins and we expect to have lost about the dollar 370 spins and we've lost about \$10 and so on of course dumb luck can mean that the actual amount we might win or lose may vary dramatically again in maths we express all this by saying

That expectation of betting on red is – 137th or minus 3% as another example what if you bet that the number 13 comes up if the team comes up we win \$35 and there's a one and thirty seven chance of that there's also a 36 and 37 chance of

Losing our dollar and so our expectation comes to 35 or 37 – the signal salmon which as in the first roulette game that we considered is equal to minus 137 in fact no matter what you bet in all roulette the expectation will always be

– 137 give or take some consider variation expectation can vary dramatically on gambling games from close to 0% on some casino games down to minus 40% or so on some lotteries but unsurprisingly the

Expectation is pretty much guaranteed to be less than zero and – means losing so far so really really bad hmm what can we do about it well a popular trick is to vary the size of your bet depending on whether you win or lose the

Most famous of such schemes is the so called martingale this betting schemes works like this as before let's bet on red in roulette and let's start by betting \$1 if red comes up you win \$1 and you repeat your \$1 bet if red does

Not come up you'll lose your dollar to make up for your loss you play again but this time was a doubled wager of \$2 if red comes up you win \$2 which together with the \$1 lost in the previous game amounts an overall win of

2 minus 1 is equal to \$1 so if 1 so you go back to betting just \$1 on the other hand if red does not come up you lose your \$2 which then adds up to a total loss of 2 plus 1 is 3 dollars if only lost so far so you play again but this

Time with a double wager of \$4 if red comes up you win \$4 which together with the \$3 loss so far means that overall you've won \$1 you've won and so you revert to betting just \$1 on the other hand if red does not come up you lose

Your \$4 which then adds up to a total loss of 4 plus 3 equals 7 dollars so 5 only lost so you play again but this time with a double wage of \$8 etc so basically you keep doubling your bed until your bad luck runs out at which

Time you start from the beginning by betting \$1 next and keep doubling your bed again until you win and so on as long as you stop playing after some win this betting strategy seems to guarantee you always coming out

On top overall there are many such betting schemes the Dalembert the reverse la vache apparently these schemes work much better if they have fancy french names bill you don't know but do bet Barry Asian schemes work

Probability questions like this one can be tricky depending in a subtle way on our assumptions the martingale for example obviously works if you happen to have infinitely dollars in your pocket but then why bother gambling and of

Course whatever you do you can always get lucky but with a finite amount of money in your pocket what can we expect to happen well suppose we make a sequence of bets with the same expectation for each bet as in the setup

We just looked at then the total amount we expect to win or lose is easy to calculate it's just e times that positive number there and if E is negative then no luck that brings us to the fundamental and very depressing

Theorem of gambling the theorem says that if the expectation is negative for every individual bet then no bet variation can make the expectation positive overall damn okay so we're not going to get rich unless we somehow find

A game with positive expectation for the moment let's just assume that such a game exists how well then can we do suppose we're betting on a casino game for which the chances of winning are 2/3 and therefore a chance of losing are 1/3

Let's also assume that just like in betting on red in roulette you win or lose whatever amount you bet then the expectation for this game is actually positive to be precise it's a whopping 33% now such a huge positive expectation

The casino game is clearly a fantasy but bear with us ok suppose we start with \$100 what are the chances of doubling our money to \$200 well obviously if we just plunk it all down in one big bed of \$100 then the chances of doubling are

Well 2/3 of course this may come as a surprise but we can actually improve our chances if we bet \$50 at a time and we play until we either bankrupt or we have double money let's do the maths if he plays

Fifty dollars after one bed win or lose we either have 150 or fifty dollars and after two bets we have zero dollars \$100 or \$200 now reading of the tree we see that at this point the probability of having doubled our money in the first

Two plays is 2/3 times 2/3 which is equal to 4/9 and similarly the probability to move back to where we have started from with \$100 is well 2/3 times 1/3 plus 1/3 times 2/3 which happens to also be 4/9 but if we're back

At \$100 we can keep on playing until eventually we have doubled our money or bankrupt that can actually take it wide before this is sorted out right now if de are the chances of eventually doubling our money in this way then D is

Equal to what well 4/9 the probability of having doubled our money after two bets plus the second 4/9 the probability of being back where we started from times the probability to be able to double from this point on and what is

That well we're back to one our dollars so the probability is d again it's actually quite a nifty calculation anything about it anyway now we just have to solve for D and this gives that D is equal to 4/5 which is 80% and this

Is definitely a lot better than 66% that going for just one bed of \$100 guaranteed repeating the trick we can consider betting in 25 dollars at a time this results in an about 94% chance of doubling our money in fact by making the

Bet size smaller and smaller we can push the probability of us eventually doubling our money to as close to certainty as we wish and once we've doubled our money why not keep on playing to quadruple octuple etc our

Money and since we couldn't push the probability of doubling our money too close to in certainty as we like the same is then also true for of those more ambitious goals even better the same turns out to be true no

Matter what probabilities were dealing with as long as the expectation of the game we play is positive as in the game that was played the very surprising conclusion to all this is our second very encouraging theorem of gambling so

Here we go if the expectation is positive then we can win as much as we like with as little risk as we like by betting small enough for long enough and so finally a bit of very good news right all right so all that's holding us back

From fame and fortune is finding a game of positive expectation for that of course we again turn to the game of roulette you know just killing and we'll get back to blackjack in a minute but there are

Many approaches to gambling and one factor to keep in mind is that games like roulette are mechanical which means the true odds aren't exactly what the simple mathematics predicts is this sufficient to get an edge on the game

Well I won't go into that today but in the references you can find some fascinating stories of people who have tried to and occasionally succeeded in beating a casino in this way and such attempts continue to this day

And with that in mind we'll now answer our roulette puzzle from the start so if 60 of the last 100 spins have turned a bread then you should most definitely bet on red of course feel free to disagree vehemently in the comments ok

So finally on to making our fortune at blackjack a possibility made famous in the Kevin Spacey movie 21 well Kevin's out of favour now so should watch the last casino instead it's a much better movie anyway

For this video don't really have to worry too much about the rules of blackjack so here's just a rough sketch now blackjack is played with a standard deck of 52 cards or nowadays a number of such decks the goal is to get as close

To 21 without going over all face cards count as ten the aces count as one or eleven the player can actually choose whichever works better for them in blackjack you're playing against the dealer you initially dealt

Two cards and the dealer just won all face-up for everybody to see you go first you can ask for more cards one at a time until you either bust which means you go over 21 in which case you lose

Immediately or you stop before this happens then it's the dealer's turn who will deal herself cards like a robot until she hits 17 or above and then stops the person closest 21 without having gone past wins the casinos edge

Comes from you the player having to go first knowing only the dealer's first card so if you bust by going over 21 then you lose immediately even if the dealer later busts as well there however some

Compensating factors that favor the player including the ability to make decisions such as when to stop receiving cards and whether to split or to double well won't go on to this actually the ability to make decisions only favors

The player if they know what they're doing which is actually hardly ever the case the fundamentals of optimizing blackjack play involve knowing what decisions to make given any total of your cards and whatever the dealer's

Card and this is known as basic strategy and was actually first figured out in the 1950s by some army guys playing with their new electronic calculators the basic strategy can be summarized in a table which all expert players know by

Heart here's a simplified version let's use it at the moment our cards add up to well 10 for a queen plus 5 that's 15 so look about 15 on the left side the dealer has 8 and so the basic strategy tells us that we should hit which means

Ask for another card let's do that now we've got 19 and this means that the basic strategy tells us to stand or stop which of course makes total sense at this point in time figuring out the basic strategy it just

Involves a lot of easy probability tree diagrams and start stuff casino rules can differ which then changes the basic strategy slightly as well as the resulting expectation but in a not too nasty casino the expectation you know

Given optimal play this way might be about minus 0.5 percent close but no banana of course plenty of people do worse than that casinos play their cards close to their

Chests but it seems that on average the casinos make well over 5% on blackjack a clearly better rate of return for the casino than on roulette anyway if we want to make our fortune we have to somehow get around that minus 0.5

Percent and that's where card counting comes in card counting arose in the early sixties courtesy of mathematician Edward Thorp and the fundamental idea is very easy basic strategy assumes that any card has an equal likelihood of

Appearing next well it's a fairly natural assumption to make if there's no other information to be had but of course there is other information to be had as cards get dealt the probabilities change in general high cards are better

For the player and low cards are worse then as the cards are dealt out the expectation changes and expectation will be positive if sufficiently many low cards are dealt that sounds like a lot of information to keep track of but

Counting simplifies it all down to keeping track of just one number called the running count every time the cards are shuffled the running count resets to zero after the shuffle whenever you see a low card you add one to the running

Count whenever you see a high card you subtract one otherwise you don't do anything the running count indicates how many extra high cards there are among the cards left to be dealt keeping track

Of the running count may seem tricky to do in a casino with all the cards zipping around on the table but it's actually pretty easy watching a blackjack table for about an hour most people can keep track

Of the running count pretty accurately there are also plenty of apps around like that one there if you want to practice in the safety of your home or you can just get a plain old deck of cards now where any of you fast enough

To keep track of the running car just now over there well I mean I showed this one – Marty cold and he just had it straight away anyway what we really want to know is not the number of extra high cards left to be dealt but the fraction

Of extra high cards remaining for example five extra high cards matter much less if they're within three decks left to be played then if there's only one deck left to be played to account for this we simply take the running

Count and divide by the number of decks left to be dealt this number is called a true count and here's the surprisingly simple formula that relates the true count to the expectation at the given point of the game and this formula

Contains some really good news a true count of two or greater means that our expectation is positive right two minus one is positive a true count of plus ten which can easily happen just before the shuffle means the expectation is 4.5%

Which is pretty amazing so what does the card counter do well ideally she bets little or nothing when the true count is negative make small bets if the true count is slightly positive and then larger bets when the true count is

Higher the bad news is that betting in such a manner involves a lot of boring waiting around followed by frantic and really really suspicious betting perhaps hundreds of dollars on a few brief hands how well

Does it work well these days a typical betting scheme going up to say a maximum bed of 200 dollars might result in an average of about 15 dollars an hour Wow mmm not what I would call a great hourly pay and it gets worse the result

In any given hour can differ massively you can expect a standard deviation a typical plus or minus two about \$500 of course the way card counters bet makes them very easy to spot and Marty has had his run-ins with

Casinos so unless you're part of a well drug team of counters and players or you're really good at disguises there's a fair chance you get to meet some burly casino employees within a few short hours well we did say blackjack wears a

Way to win a small fortune good luck happy gambling and that's all for today except we've all heard that back in the 70s there were lots of people making millions of dollars playing blackjack in the casinos so what

Has changed why can't we make millions of dollars these days well the casinos have gotten a lot more careful and a lot smarter they they use more decks which means the running count matters less the truth counts slower to get going they

Use automatic shuffling machines they really are on the lookout for suspicious betting so unless you're incredibly good at disguising yourself incredibly good a team playing it's pretty much dead okay said but what about other games there's

Online gambling now so it's other ways to make money with gambling these absolutely yeah the casino is always looking to sucker more people into betting and suffering old people in depending more so there's always

Promotions there's new games new rules some are knowingly have expectation which is positive and they just watch out others the casino makes mistakes or online betting sites make mistakes so you do little expectation calculation

And often not always but often you can find a little edge and enough of these little edges and you can make a nice little profit on the side and definitely there's some people who just computerized everything calculate to the

Enth degree and there's some secret people I'm sure who are doing very very well all right well that's a perfect lead-in to our next video at some point anyway thanks Marty for coming today thank you and we'll have you again sure

Cool you

## Related Videos

all right so the other day I said with my kids watch TV you probably familiar with these reality shows where they put a bunch of clueless people put them in an...
well a mathematician and I like action movies particularly die hard is one of my favorite you know action movie and as a one which has a couple of Matt's p...
so today we've got a very very special guest who is going to perform an incredible feat for you to introduce the special guests abroad my multiplying monke...
one of the first videos we did for for this channel was about the Futurama theorem which is a pretty amazing thing it's about mind switching mathematics an...
well last weekend i actually did a talk on mats in the simpsons here in melbourne and i'm going to split this up into three different videos so today you g...
so recently a few people left comments to the effect that mythology is Illuminati confirmed and they based these you know comments on a couple of things they s...
I'm assuming that you you just watched the Illuminati confirmed video and that you're a hardcore mathematician and that you now want to prove that your...
well i love simpsons giuseppe loves the simpsons everybody loves the simpsons and if you look at the views yeah it's really everybody who loves the simpson...
today I've got something lined up which is going to be really really useful for people who have trouble memorizing that times table well we've come ver...
I'm assuming everybody here also watches numberphile Giuseppe by watching number files numberphile is great so does in case you don't watch numberphile...
okay so to start off I've got four four images for you so look at them one two three four now quick question what do all of them have in common well I woul...
as you can see I'm quite serious about juggling have been serious about juggling for decades used to busk and do all sorts of things now what I want to sho...
so recently we did a video on the most mysterious and beautiful identity in mathematics e to the PI I is equal to minus one comes up three times in the Simpson...
oh you're probably all familiar with this puzzle here so we've got a picture distributed on 15 tiles and we've got an empty square and this is empt...
today M stands for Mandelbrot set before scene at night let's zoom in what you find is all these amazing pictures here like these little baby Mandelbrot&#3...
I don't know about you but I sometimes get really really sick of pie so last week I enlisted the help of some friends at the tech wonder club we're tra...
a lot of you will be familiar with this strange identity here one plus two plus three plus dot dot equal to minus 112 now when you think about it this looks to...
you hello everybody I'd like to talk about a little problem that has intrigued people ever since we discovered mirrors let's have a look at what I see ...
exciting news everybody just a couple of days ago I solved the 40 Rubik's cube for the first time not many people have done this so I thought I'd do a ...
today I want to let you in on a really neat trick that I learned from a very famous mathematician how to subtract infinity from infinity to get exactly pi so f...