Chapter 8
Blackjack

Blackjack (BJ) is a popular card game that has been depicted in movies such as the 2008 film 21. Blackjack has become popular in good measure because it is one of the few casino games that can potentially be broken (i.e., a strategy can be devised to minimize or even eliminate the house advantage).

8.1 Rules and Bets

Blackjack (also called 21) is played using a standard (French-style) 52-card deck (see Figure 8.1). The objective of the game is very simple: players try to get a combination of cards that adds up to a number that is larger than the dealer's number but does not exceed 21. The value of the cards is as follows: numbered cards are worth their value in points, Jacks, Queens, and Kings are worth 10 points each, and Aces are worth either 1 or 11 points (whichever is more advantageous to the player). The suits of the cards play absolutely no role in the outcome of the game.

Illustration of 52-card French-style deck.

Figure 8.1 A 52-card French-style deck.

At the start of the round each player is dealt two cards face up, and the dealer (let's call her Alice) also gets two cards. Cards are usually dealt from a stack which is called the shoe. The shoe can contain between one and eight decks.

Unlike the players, the dealer receives one card face up for everyone to see, and one card face down (which is said to be in the hole). After receiving the hidden card, Alice, the dealer, checks to see if she has a blackjack (an Ace plus a 10-point card such as a Jack, Queen, King, or 10). If Alice has a blackjack, she reveals the second card and the game ends, with all players who do not have a blackjack losing and any player with a blackjack tying with the house.

If Alice does not have a blackjack, then each player takes a turn playing. If the current player (let's call her Julissa) gets a natural 21, then she has a blackjack and automatically wins (unless, as we discussed before, the dealer also had a blackjack, in which case they draw). While the regular payoff odds in blackjack are 1 to 1, the payoff odds for a natural are 3 to 2 (i.e., you get a profit of $3 for each $2 you bet). If Julissa does not get a blackjack, she has the opportunity to draw as many additional cards (one by one) as she wants. More specifically, Julissa has the following options available to them:

Once all players have resolved their hands (either by going bust or staying), it is the turn of the dealer, who plays a fixed strategy. If Alice the dealer has not done so already (because of a blackjack), she shows the hole card. If the total is less than 17, she will hit until the number is higher than 17 or goes bust. If the dealer goes bust all players who stayed their game win. If the dealer did not go bust, then each player compares her number against the dealer's. If the player has a higher number, she wins; if the player has a smaller number, she loses. Finally, if the numbers are identical, the game is a draw and the player gets her bet back. In all these cases, the payoff odds are 1 to 1.

A popular variation of blackjack has the dealer hitting on a soft 17. A soft number is one made up of a combination of cards that includes an Ace that is counted for 11 points. For example, a combination of an Ace and a 6 is a soft 17, while a combination of a King, a 6, and an Ace counts as a hard 17. Other variations of the rules include early surrender, re-splitting, and no doubling after splitting. These variations are typically casino-specific and will not be discussed in this book.

8.2 Basic Strategy in Blackjack

Blackjack is popular in good part because it is possible for players to adopt a strategy that will minimize, or even eliminate, the house advantage. This is because (1) since the dealer plays a fixed strategy and she shows a face-up card, the player can adapt her strategy accordingly and (2) cards used in different rounds are typically dealt without replacement from a common (and finite!) deck, so the outcomes of different rounds are dependent. This is in clear contrast to the other games we have discussed so far (roulette, lotteries, craps) where outcomes from different rounds are independent from each other.

In order to devise a strategy for playing blackjack, let's consider first the probability associated with all possible dealer's hands. Since Alice must hit when her hand is under 17, there are 7 possible outcomes: 17, 18, 19, 20, 21, BJ, and bust (note that 21 means any combination of cards that adds up to 21 but are not blackjacks).

The probability of a blackjack is easy to compute,

equation

In the case of a single-deck game this is

equation

Single deck games, however, are relatively rare nowadays. In multiple deck games, the probability of different cards does not change much after a single card is removed. Hence, in that case, we can approximate

equation

Note that the only difference between the two calculations is that the denominator for the probability that the second card is 52 when multiple decks are used (i.e., we assume sampling with replacement), instead of 51 when a single deck is used (in which case we are assuming sampling without replacement).

The probabilities for other outcomes can be quite complicated to obtain. Consider, for example, the probability of a 21 that is not a blackjack. This can only happen if three or more cards are drawn; there are many possible combinations that would lead to that outcome. For example,

  • A 10-valued card, followed by a 6 and a 5.
  • A 10-valued card, followed by a 5 and a 6.
  • A 10-valued card, followed by a 4 and a 7.
  • A 10-valued card, followed by a 4, a 2, and a 5.
  • 9 followed by a 7 and then a 5.
  • And so on…

A complete enumeration needs to be done carefully; for example, a 10-valued card followed by a 7 and then a 4 is not a combination that we should consider because it would never happen (once the 7 is drawn, the value of the hand is 17 and the dealer would stay). Since the number of combinations that we need to consider is rather large, we just present the results (for the multiple deck case) in Table 8.1. The following code can be used to corroborate the results using simulations:

c08uf001

Table 8.1 Probability of different hands assuming that the house stays on all 17s and that the game is being played with a large number of decks

Result 17 18 19 20 21 BJ Bust
Probability 0.145 0.140 0.134 0.180 0.073 0.047 0.282

Table 8.1 provides some interesting insights into blackjack strategy. For example, it shows that the dealer goes bust about once every four rounds. Since the player wins when the house goes bust as long they have not gone bust themselves, this suggests that it might be a good idea for the player to play defensively. However, the table does not make use of the knowledge provided by the face-up card. Indeed, note that about 30% of the cards in the deck are 10-valued cards. Therefore, the probability that the house goes bust is larger if the face-up card is a 6 than if it is a 10:

The previous discussion is formalized and generalized in Table 8.2, which shows the probability of different possible dealer hands conditional on the face-up card. As suggested earlier, the probability that the player goes bust is quite high if the face-up card is either 2, 3, 4, 5, or 6, but falls dramatically once the face-up card becomes a 7 or higher. Indeed, when the face-up card is a 7, the highest probability outcome is a 17, and for a 8 face-up card, the highest probability outcome is an 18, and so on. And, if the face-up card is an A, the probability that the dealer will go bust is very small. These probabilities suggest that it is a bad idea for the player to copy the house strategy. Instead, the following adaptive strategy is optimal:

Table 8.2 Probability of different hands assuming that the house stays on all 17s, conditional on the face-up card

Face-up card End hand
17 18 19 20 21 BJ Bust
A 0.131 0.131 0.131 0.131 0.054 0.308 0.115
2 0.140 0.135 0.130 0.124 0.118 0.000 0.354
3 0.135 0.131 0.126 0.120 0.115 0.000 0.374
4 0.131 0.126 0.121 0.117 0.111 0.000 0.395
5 0.122 0.122 0.118 0.113 0.108 0.000 0.416
6 0.165 0.106 0.106 0.102 0.097 0.000 0.423
7 0.369 0.138 0.079 0.079 0.074 0.000 0.262
8 0.129 0.360 0.129 0.070 0.069 0.000 0.245
9 0.120 0.120 0.351 0.120 0.061 0.000 0228
10/J/Q/K 0.111 0.111 0.111 0.342 0.035 0.077 0.212

This table assumes that the game is being played with a large number of decks.

The rationale for this strategy is directly linked to our earlier discussion. Since the bank has a very good chance of going bust if the card being shown is a 4, 5, or 6, the player should play very defensively, to the point of avoiding going bust at all cost (hence the strategy of staying with 12 or more). On the other hand, if the house shows a 7 or higher in the face-up, the probability of a good hand for the house is very high and the player should play more aggressively to try to get at least a 17 before staying.

A similar intuition works for the optimal splitting strategy (see Table 8.3). Note that splitting on a double 10 is never advantageous; this is so because the probability that the dealer will beat a 20 is very small no matter what the face-up card is. Similarly, splitting with a double 7 is advantageous only if the dealer shows a 7 or smaller number (for larger face-up cards, the probability that the player goes bust or gets a number that is 17 or less is very high, while the probability that the dealer will get a number that is 18 or more is also relatively high).

Table 8.3 Optimal splitting strategy

Dealer's face-up card
Player's card 2 3 4 5 6 7 8 9 10 A
A–A S S S S S S S S S
10–10
9–9 S S S S S S S
8–8 S S S S S S S S
7–7 S S S S S S
6–6 (S) S S S S
5–5
4–4 (S) (S)
3–3 (S) (S) S S S S
2–2 (S) (S) S S S S

S indicates that splitting is advantageous, while (S) indicates situations in which splitting is advantageous only if doubling down is allowed. This strategy assumes that the game is being played with a large number of decks and that the dealer stays at all 17s.

8.3 A Gambling System that Works: Card Counting

A key feature of blackjack is that the deck (or decks) of cards is not reshuffled after each hand. Instead, multiple rounds are dealt continuously from the same deck. This can induce some wild variations in the probabilities of different hands. This phenomenon is more pronounced when playing with a single deck, but it can still be exploited in multi-deck games to create a gambling system.

To see how much the probabilities of different outcomes can change in a single-deck game, consider a situation where all Aces, 2s, 3s, 4s, 5s, and 6s have been removed from a deck (so, there are 28 cards left in the deck; 16 ten-valued cards, four 7s, four 8s, and four 9s). In this case, the probability of different hands is relatively easy to compute. For example, the probability that the dealer gets a 21 is simply the probability of getting three 7s in a row (there are no other combinations available with the cards left in the deck), that is,

equation

Similarly, the probability that the dealer gets a 17 corresponds to the probability of 4 different sequences: first a 7, then a 10, or first a 10, then a 7, or first an 8, then a 9, or first a 9, then an 8. Therefore,

equation

Table 8.4 summarizes the probabilities for all cases, which are very different from those in Table 8.1 because a number of cards are not in play anymore. The values in Table 8.4 can be corroborated using the following R code (note that this version of the code, unlike the one presented in Section 8.2, uses sampling without replacement):

c08uf002
c08uf002

Table 8.4 Probability of different hands assuming that the house stays on all 17s and that the game is being played with a single deck where all Aces, 2s, 3s, 4s, 5s, and 6s have been removed

Result 17 18 19 20 21 BJ Bust
Probability 0.212 0.186 0.170 0.317 0.001 0.000 0.115

A similar approach can be used to compute the probability of each outcome conditional on the face-up card (this is analogous to the calculation behind Table 8.2). For example, if the face-up card is a 7, the only second cards not leading to an automatic bust are a 10 (which leads to 17) and a 7 (which leads to drawing a third card since the running total is 14). If the second card is a 7, then the only way the dealer will not go bust is with a third 7 (which leads to a total of 21). Thus,

equation

while

equation

and

equation

Table 8.5 Probability of different hands assuming that the house stays on all 17s, conditional on the face-up card

Face-up card Dealer's final hand
17 18 19 20 21 BJ Bust
7 0.593 0.000 0.000 0.000 0.009 0.000 0.399
8 0.148 0.593 0.000 0.000 0.000 0.000 0.259
9 0.148 0.111 0.593 0.000 0.000 0.000 0.148
10/J/Q/K 0.148 0.148 0.148 0.556 0.000 0.000 0.000

This table assumes that the game is being played with a single deck and all the Aces, 2s, 3s, 4s, 5s, and 6s have been removed from a deck.

After rounding to four decimal places, these results correspond to the values in Table 8.5. The rest of the table can be obtained in a similar way.

Because the probability of winning a hand depends greatly on which cards are left in the deck, we can reduce (and even eliminate) the house advantage by increasing the amount of our bet when the content of the decks drives the odds of winning in our favor and decreasing it when the odds are against us.

Card counting is a simple mechanism that can be used to keep track of the cards that have appeared in previous rounds dealt since reshuffling, and then adapting the size of the bets in order to exploit situations that are favorable to the player. Counting systems are based on the fact that high cards (especially Aces and 10s) benefit the player more than the dealer, while the low cards (especially 4s, 5s, and 6s) help the dealer while hurting the player. Indeed, a high concentration of Aces and 10s in the deck increase the player's chances of hitting a natural blackjack, which pays out 3:2 (unless the dealer also has blackjack). Also, when the deck has a high concentration of 10s, players have a better chance of winning when doubling. On the other hand, low cards benefit the dealer, since according to blackjack rules the dealer must hit stiff hands (i.e., hands totaling 12–16) while the player has the option to hit or stand. Consequently, a dealer holding a stiff hand will bust every time if the next card drawn is a 10.

A number of counting systems have been devised. All of them start the count at zero when a deck is freshly shuffled and increase/decrease the count according to the cards that are played. The simplest point assignment for the cards that is used in practice is the low-high count system:

When the count is high, it signals a lot of high cards left in the deck which means that it is easier for the dealer to go bust; in this situation, you should increase your bets because it is more likely for you to win. Different experts suggest different thresholds for increasing the bet, one possible option (for single-deck games) is the following:

8.4 Exercises

  1. 1. Explain why, in single-deck blackjack, there is an advantage to the player when a large number of high cards are in the deck and the mid-valued cards are out.

  2. 2. Why is it usually a bad idea to surrender in blackjack?

  3. 3. What actions can casinos take to reduce the advantage of card counters in blackjack? Explain the logic behind these actions.

  4. 4. You are playing blackjack from a single deck, and you are the only player on the table. Your hand is K–8 and the dealer shows a 9. If you know that all Aces, 2s, 3s, 4s, 5s, and 6s are out of the deck (but all other cards are still in), what is the probability that you will win the hand if you stay?

  5. 5. What's the probability of winning an insurance bet? What is your expected profit in a game where you take an insurance bet?

  6. 6. Consider the same situation as the previous question; what is the probability that you will win when the dealer's hand is showing a 7.

  7. 7. Consider the same situation as the previous question; what is the probability that you will win when the dealer's hand is showing a 8.

  8. 8. When playing with a deck where all Aces, 2s, 3s, 4s, 5s, and 6s are out of the deck (but all other cards are still in) what is the probability of the dealer getting a 17 when her hand is showing a 10. Explain your reasoning carefully.

  9. 9. In the same situation as the previous question, what is the probability of the dealer getting an 18 when her hand is showing a 9. Justify your answer.

  10. 10. Still in the same situation as two previous questions, what is the probability of the dealer going bust when her hand is showing a 9. Justify your answer.

  11. 11. When using a continuous shuffling machine (CSM), cards just used are placed back into the deck of cards at the end of each hand. The machine works in such a way that any of the cards just played has a chance of coming up in the next hand (unlike in regular games, where cards that are discarded are not reintroduced for a while). How does a CSM affect the effectiveness of the basic strategy in blackjack? How does it affect the effectiveness of card counting?

  12. 12. Carry out the computations required to complete Table 8.5.

  13. 13. [R] Modify the simulation presented in this chapter to re-compute the probabilities in Table 8.1 for a single-deck game in which cards are sampled without replacement.

  14. 14. [R] Write code to evaluate the house advantage under the basic blackjack strategy discussed in Section 8.2 assuming no insurance, surrender, splitting, or doubling down is allowed.

  15. 15. [R] Modify the code from the previous exercise to compute the house advantage if the player copies the house strategy. Compare your results against those from the previous exercise.