Mathletes: Two card-odds questions (blackjack and side bet)

A recent trip to Vegas got me hooked on blackjack. It’s not the game itself, but the math behind it that really draws me in. For example, there’s the section on the basic strategy chart that says I should hit on a 12 vs. a dealer 2 or 3. That’s an anomaly for that section of the chart. And the fact that I should double down on an A/5 against 4s which seems counterintuitive.

The most interesting thing, though, is the fact that it’s played without replacement. The deck isn’t reshuffled every hand, and therein lies the player’s chance to make some money. If you buy into the theory that tens are good for the player and low cards are good for the dealer, then it makes sense that the deck should even out if it’s played long enough.

Doesn’t that imply, then, that the Martingale should be more effective than it is in, say, roulette? The events of a blackjack table aren’t independent like they are with the little wheel. If I lose early hands, then it’s not an instance of the gambler’s fallacy to say that I’m starting to be “due” a good hand.

Furthermore, I realize that doubling down and blackjack bonuses are accounted for in the game’s odds, but are they accounted for if I’m playing the Martingale system? If I start at $5 and I lose 3 hands in a row, my next bet will be $40. If I hit a blackjack, then I’m up ($60-$40) $20, not my original $5 like in any other casino game you apply the Martingale to.

  1. Is blackjack especially prone to the Martingale system, since events aren’t independent of each other?

Second question that’s completely unrelated except it’s in my head and I might as well ask now…

In high school, I won a lot of money betting on the following game. My mark selects two ranks of cards, like 6s and 8s. I’d shuffle the deck and let him cut as many times as desired. We’d then go through the deck. If any of those 8 cards were paired (i.e. directly adjacent), I win. Otherwise, he wins. There’s no card trick here. It’s just much more likely to happen than one would think. Problem is, I was never able to identify exactly how likely it was. I could never figure out what my cut was, so I couldn’t ever figure out how to tweak the game so I was shaving the cats instead of skinning them. It’s especially hard to calculate with the fact that there’s a 28% chance that the top or bottom card is one of the selected 8 cards, and those only have one neighbor.

  1. What is the probability that any 2 of a designated 8 cards would end up next to each other in a randomly shuffled deck?

First off, you should read “Bringing Down The House” if you haven’t already, the book about MIT students who exploited exactly the issue you’re talking about, combining card counting and bet sizing to give themselves an edge. It’s a lot harder than it looks, and the casinos will toss you if they think you’re doing it.

Second off, the uneven blackjack payoff doesn’t itself make Martingale any more favorable. The odds are the odds, namely if you play perfect blackjack you have a tad less than 50% expectation value. Yes a blackjack can boost what you win in a case like you describe, where you lose a few times then hit it, but the opposite can happen as well: you lose a few times, doubling your bet each time, and then hit a situation where you have to double down and lose that as well. Now after x hands you’ve lost 2[sup]x+1[/sup] times your initial bet instead of 2[sup]x[/sup].

Lastly, regular people don’t have the resources to make Martingale work. You will lose eight in a row eventually. Also, casinos don’t have any interest in helping you bust them, hence the max and min bets at most tables.

No time to calculate 2), but I’ll give 1) a shot.

First, the fundamental problem with a Martingale-type system isn’t that you’re making bad bets, it’s that eventually there will be a run of bad-luck losses that will make the bets bigger than the bankroll of either the bettor or the casino. Either one is bad for the bettor, of course, but the first is what is overwhelmingly likely to happen. Even if some of the later bets are ever -so-slightly positive value, the bad run will eventually happen if you keep doubling bets with every loss.
Now, you can design a betting system that doesn’t have the Martingale-style increasing of bets, but just bets more when the odds are good (according to what cards are left in the deck) and lowers bets when the odds are bad. And many people have – this is known as ‘counting cards’ at blackjack (there’ve been some books and movies about people doing this professionally). Of course, most casinos make it difficult to do in practice these days, so don’t plan on retiring from blackjack proceeds any time soon.

This game is hugely in your favor. Let’s start with the most favorable case, where none of the eight magic cards are either the top or bottom card.

The odds here are equivalent to having a row of 52 boxes in which you randomly place eight pebbles. Throw the first pebble in one, it doesn’t matter which. For the second pebble, the odds of going into a box which is non-adjacent is 49/51, since there are 51 empty boxes only two of which are next to the first pebble. For the third pebble, the odds are 46/50 (four neighbors, two filled boxes). And so on: for the nth pebble, the odds are (52-2*(n-1))/(52-(n-1)). Multiply all these together for eight pebbles and you get only a 25.9% chance of not having any pebble be adjacent to any other, i.e. you are a 3 to 1 favorite in this game.

You can correct for the top and/or bottom card situation by starting one or both pebbles at an edge, and then reducing the number of potential neighbors (in the numerator) by one or two for all subsequent calculations, so the formula becomes (52-2*(n-1)+1)/(52-(n-1)) for one pebble at an edge. It doesn’t make the odds that much worse for you, though – one card at the top or bottom still gives you only a 30.9% chance of not having any adjacency, making you a 2.2 to 1 favorite.

I read that book (and saw the movie). Excellent. A lot more entertaining than I thought it would be. I can count cards and I can play strategy. But I can’t do it at the same time, so I don’t bother. I’m working on making the strategy rote, and that’s enough to feed my intellectual addiction for now.

At the table in Vegas that I was playing at, the min was $5 and the max was $1000. So the 8th bet would be $640.

Let’s assume the house has a .35 edge. That means it’s .5175 in their favor. To win independently 8 times in a row, it’s .5175^8 = .514%, or 1/194. So 1 set of 8 will go to the house out of every 194 trials, and they’ll take $1275 with them.

Now here’s where I get confused. How do I count the other 193 trials? I know I win at least one out of eight, but should I just give myself $5 for each, or should I calculate times where I win more than once in an 8-hand series? On the one hand, that seems fair to give me eight trials if I’m giving the house eight. On the other hand, if I lose the last 4 of one set and the first 4 of another, then I’m still broke. So I’m truly confused at this point.

Furthermore, how much more do I need to improve the odds to make the Martingale viable?

You slipped up in the middle, though. Just because the second pebble “misses” the first, it doesn’t mean there are now 46 losing boxes and 4 winning. It can be 47 and 3, which happens if I get box C and box E. Box D would be counted twice in your 46/50 fraction. So for some number of cases, it’s actually 47/50. In practice, I’ve found that this scenario is the one most likely to cost me the game- not the card-on-top problem. And this screws up the subsequent calculations, too. That’s why I need some help. There’s got to be an easier way to do this.

Assuming your calculations are correct you’ll need to figure out the average length of a series you win, divide 193*8 by that average and multiply that by $5. I think … It’s not a straight forward probability to figure out.

Ah, yes, you’re right. :smack:

At this point, while one could probably work out all the terms for all the different cases, it gets complicated enough that I’d probably just calculate the odds numerically – one could write a twenty line code that could play this game a million times and give you the exact odds. Maybe I’ll do that tonight if I have some free time…

I should also point out that if you’re assuming that box 1 and 52 are not pebble-holding, then you also have to assume that if box 2 or 51 hold a pebble, that the chances of them being a “successful” pair are cut in half. That is, if 1 is empty, then 2 can only pair with 3. This works no matter how many boxes you exclude. If you say “OK, then box 2 doesn’t have a pebble” then the same thing occurs to box 3. You’ll always have an “edge” somewhere in the deck.

For Blackjack there is only one strategy and that is to play perfect “Basic”. Get a basic chart and memorize it, then train yourself to play it no matter what your emotions are saying or what your hunch is.

In principle, you could use your win-loss record as a crude card counting system, and betting based on that system would end up looking like a Martingale. But it’s such a crude way of counting cards that it wouldn’t be enough to make up for the house edge. Using real (i.e., good enough to beat the house) card counting systems, the count still only goes into your favor very rarely; the key is to put down huge bets at those few golden moments, and minimum bets all the rest of the time.

There are 52 choose 8 ways to put 8 pebbles into 52 distinct boxes.

There are 45 choose 8 ways to put 8 pebbles into 52 distinct boxes where no occupied boxes are adjacent. *

As a result, you win the game 71% of the time.
*There are 45 choose 8 ways to arrange 37 1’s and 8 2’s. There is a bijection between these arrangements of 1’s and 2’s and the desired 8 pebbles in 52 non-adjacent boxes. A 1 is an empty bucket and a 2 is a bucket with a pebble followed by an empty bucket. This gives us 53 buckets where no adjacent buckets have pebbles. However, the last bucket is always empty so we can throw it away and we have exactly what we need.

Good book.

The pit crew and house security probably won’t kick you out if they think you’re trying to count, especially at the lower limits. Most people are so bad at it that the attempts usually backfire. It really does take a lot of practice and skill to successfully count, particularly without getting noticed.

Most people just aren’t good counters. They think they’re good at counting, though, and the house gets their edge from them, too. With the 6 or 8 deck shoes, you’d need a fairly good count and betting strategy to manage even the slightest of edges.

The “basic” strategy won’t cut it here. You’d have to adjust your bets and the strategy chart based on the count (“Bringing Down the House” touches on this, too).

Beyond that, watch out for the auto-shuffling machines. With those, you are facing a freshly shuffled deck every hand, and there’s no point in counting.

You got here before me, but this is what I did, too. The actual numbers work out to be that you lose 268,467/1,286,390 of the time, which is about 29%. I wonder if it emans anything that I went “negative” and you didn’t, but that’s not relevant to the OP.

Friends and I played a day-and-long-night’s-worth of the Martingale system at a casino, and, wow, we won some money! Hey, great… except, once we got home and down from the Winners’ High, I figured out that we were making about $8/hr. Not hard to beat by gainful employment. Heck, we could’ve made more if we’d stood outside with an accordion and passed the hat (I’ve got a pal who makes $25-30/hr busking) … and gotten some fresh air.

Yeah, digs, that’s one problem with the Martingale. Not only do you take a small risk of a huge loss, you make very little while you’re doing it.

Back to the OP, what I think he was asking, and no one has addressed yet, is that if you have a scenario where the low cards in the shoe were mostly at the front, and the high cards were mostly at the back, then you may have more situations where you lose several in the first part of that shoe, then when you get to the more advantageous area, you’re betting more money.

In other words, betting less during the worst part of the shoe, and betting more during the better part.

The problem is, that’s still not an advantage, because anytime you win you’re just getting back to the point where you are $5 ahead of your previous position.

Actually, these are getting more and more common. In many countries, you’ll hardly any more find the traditional wooden shoes from which the deck is played until a marker card shows up, with a manual re-shuffle. In fact, it is my impression that these shoes have become an American peculiarity - most casinos in Europe where I’ve played blackjack are using the shuffling machines that continuously reshuffle used cards into the deck. Probably the safest and simplest insurance against card counting there is, and I don’t actually understand why American casinos bother to ban players for card counting (if well done) with all the hassle this involves, rather than use these machines. I know, they’re expensive (€20,000 each, according to a dealer in a German casino who I talked to about the topic), but given the overall turnover of the gambling industry and the lifespan of these machines that shouldn’t really be much of an issue.

Playing a Martingale system guarantees two things: all of your wins will be minimal and all of your losses will be huge. The system, by design, always seeks to win your minimum bet and does this by risking your entire bankroll. Eventually, you will lose 9 or 12 or 17 or more bets in a row and will hit the casino’s limit, at which point you can no longer bet enough to gain back your losses even if you are able and willing.

The Kelly criterion is what you want to use to manage bet sizing. It determines the proper amount of your bankroll to risk at a given advantage so that you have a minimal chance of going broke.

If you are really fascinated with understanding the game of blackjack, The Theory of Blackjack is the book for you. It’s not the book for playing strategy, but it is the book for those who really want to understand the game.

Doesn’t the Kelly criterion actually just tell you to be the house? It tells you how much money to risk on any given positive advantage, but at a casino, your advantage is negative, and you should therefore not risk anything.

Since the composition of the remaining deck changes during play, sometimes the player has the advantage in blackjack.

Let’s look at an extreme example; say you have been counting cards and you know there are only face cards and one ace left in the deck.

If you and the dealer each get two face cards, it a push. Ties have no effect on our bankroll, so we can ignore them.

If you get two face cards and the dealer gets a blackjack, you lose your bet, so are minus one unit.

If the dealer gets two face cards and you get a blackjack, you win 1.5 times your bet, so you are plus 1.5 units.

Clearly, you have an advantage. You can win more than you can lose, and you should be happy to play this situation out over and over again many times, even though it is possible you will lose a bet half of the times you do not tie.

So, how much should you bet? If you bet it all and lose, you are out of business and can’t take advantage of future opportunities. If you make a very small bet, you are not maximizing your expectation from the advantageous situation. The Kelly criterion tells you how much to bet to reach the desired balance between risking going broke (and being out of business) and maximizing your positive expectation.

But yes, it is only useful when you have a positive expectation. If you bet with a negative expectation, in the long run, you will lose … and if you play long enough with a negative expectation, you will lose all your money. There is no money management system that can overcome a negative expectation.