# 13.2: Poker

- Page ID
- 10256

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

\( \newcommand{\Span}{\mathrm{span}}\)

\( \newcommand{\id}{\mathrm{id}}\)

\( \newcommand{\Span}{\mathrm{span}}\)

\( \newcommand{\kernel}{\mathrm{null}\,}\)

\( \newcommand{\range}{\mathrm{range}\,}\)

\( \newcommand{\RealPart}{\mathrm{Re}}\)

\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

\( \newcommand{\Argument}{\mathrm{Arg}}\)

\( \newcommand{\norm}[1]{\| #1 \|}\)

\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)

\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)

\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vectorC}[1]{\textbf{#1}} \)

\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)## Basic Theory

### The Poker Hand

A deck of cards naturally has the structure of a product set and thus can be modeled mathematically by \[ D = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, \jack, \queen, \king\} \times \{\clubsuit, \diamondsuit, \heartsuit, \spadesuit\} \] where the first coordinate represents the denomination or kind (ace, two through 10, jack, queen, king) and where the second coordinate represents the suit (clubs, diamond, hearts, spades). Sometimes we represent a card as a *string* rather than an ordered pair (for example \(\queen \, \heartsuit\)).

There are many different poker games, but we will be interested in standard draw poker, which consists of dealing 5 cards at random from the deck \(D\). The *order* of the cards does not matter in draw poker, so we will record the outcome of our random experiment as the random set (hand) \(\bs{X} = \{X_1, X_2, X_3, X_4, X_5\}\) where \(X_i = (Y_i, Z_i) \in D\) for each \(i\) and \(X_i \ne X_j\) for \(i \ne j\). Thus, the sample space consists of all possible poker hands: \[ S = \left\{\{x_1, x_2, x_3, x_4, x_5\}: x_i \in D \text{ for each } i \text{ and } x_i \ne x_j \text{ for all } i \ne j \right\} \] Our basic modeling assumption (and the meaning of the term *at random*) is that all poker hands are equally likely. Thus, the random variable \(\bs{X}\) is uniformly distributed over the set of possible poker hands \(S\). \[ \P(\bs{X} \in A) = \frac{\#(A)}{\#(S)} \] In statistical terms, a poker hand is a random sample of size 5 drawn without replacement and without regard to order from the population \(D\). For more on this topic, see the chapter on Finite Sampling Models.

### The Value of the Hand

There are nine different types of poker hands in terms of value. We will use the numbers 0 to 8 to denote the value of the hand, where 0 is the type of least value (actually no value) and 8 the type of most value.

The hand value \(V\) of a poker hand is a random variable taking values 0 through 8, and is defined as follows:

- No Value. The hand is of none of the other types.
- One Pair. The hand has 2 cards of one kind, and one card each of three other kinds.
- Two Pair. The hand has 2 cards of one kind, 2 cards of another kind, and one card of a third kind.
- Three of a Kind. The hand has 3 cards of one kind and one card of each of two other kinds.
- Straight. The kinds of cards in the hand form a consecutive sequence but the cards are not all in the same suit. An ace can be considered the smallest denomination or the largest denomination.
- Flush. The cards are all in the same suit, but the kinds of the cards do not form a consecutive sequence.
- Full House. The hand has 3 cards of one kind and 2 cards of another kind.
- Four of a Kind. The hand has 4 cards of one kind, and 1 card of another kind.
- Straight Flush. The cards are all in the same suit and the kinds form a consecutive sequence.

Run the poker experiment 10 times in single-step mode. For each outcome, note that the value of the random variable corresponds to the type of hand, as given above.

For some comic relief before we get to the analysis, look at two of the paintings of *Dogs Playing Poker* by CM Coolidge.

- His Station and Four Aces
- Waterloo

### The Probability Density Function

Computing the probability density function of \(V\) is a good exercise in combinatorial probability. In the following exercises, we need the two fundamental rules of combinatorics to count the number of poker hands of a given type: the multiplication rule and the addition rule. We also need some basic combinatorial structures, particularly combinations.

The number of different poker hands is \[ \#(S) = \binom{52}{5} = 2\,598\,960 \]

\(\P(V = 1) = 1\,098\,240 / 2\,598\,960 \approx 0.422569\).

## Proof

The following steps form an algorithm for generating poker hands with one pair. The number of ways of performing each step is also given.

- Select a kind of card: \(13\)
- Select 2 cards of the kind in part (a): \(\binom{4}{2}\)
- Select 3 kinds of cards, different than the kind in (a): \(\binom{12}{3}\)
- Select a card of each of the kinds in part (c): \(4^3\)

\(\P(V = 2) = 123\,552 / 2\,598\,960 \approx 0.047539\).

## Proof

The following steps form an algorithm for generating poker hands with two pair. The number of ways of performing each step is also given.

- Select two kinds of cards: \(\binom{13}{2}\)
- Select two cards of each of the kinds in (a): \(\binom{4}{2} \binom{4}{2}\)
- Select a kind of card different from the kinds in (a): \(11\)
- Select a card of the kind in (c): \(4\)

\(\P(V = 3) = 54\,912 / 2\,598\,860 \approx 0.021129\).

## Proof

The following steps form an algorithm for generating poker hands with three of a kind. The number of ways of performing each step is also given.

- Select a kind of card: \(13\)
- Select 3 cards of the kind in (a): \(\binom{4}{3}\)
- Select 2 kinds of cards, different than the kind in (a): \(\binom{12}{2}\)
- Select one card of each of the kinds in (c): \(4^2\)

\(\P(V = 8) = 40 / 2\,598\,960 \approx 0.000015\).

## Proof

The following steps form an algorithm for generating poker hands with a straight flush. The number of ways of performing each step is also given.

- Select the kind of the lowest card in the sequence: \(10\)
- Select a suit: \(4\)

\(\P(V = 4) = 10\,200 / 2\,598\,960 \approx 0.003925\).

## Proof

The following steps form an algorithm for generating poker hands with a straight or a straight flush. The number of ways of performing each step is also given.

- Select the kind of the lowest card in the sequence: \(10\)
- Select a card of each kind in the sequence: \(4^5\)

Finally, we need to subtract the number of staight flushes above to get the number of hands with a straight.

\(\P(V = 5) = 5108 / 2\,598\,960 \approx 0.001965\).

## Proof

The following steps form an algorithm for generating poker hands with a flush or a straight flush. The number of ways of performing each step is also given.

- Select a suit: \(4\)
- Select 5 cards of the suit in (a): \(\binom{13}{5}\)

Finally, we need to subtract the number of straight flushes above to get the number of hands with a flush.

\(\P(V = 6) = 3744 / 2\,598\,960 \approx 0.001441\).

## Proof

The following steps form an algorithm for generating poker hands with a full house. The number of ways of performing each step is also given.

- Select a kind of card: \(13\)
- Select 3 cards of the kind in (a): \(\binom{4}{3}\)
- Select another kind of card: \(12\)
- Select 2 cards of the kind in (c): \(\binom{4}{2}\)

\(\P(V = 7) = 624 / 2\,598\,960 \approx 0.000240\).

## Proof

The following steps form an algorithm for generating poker hands with four of a kind. The number of ways of performing each step is also given.

- Select a kind of card: \(13\)
- Select 4 cards of the kind in (a): \(1\)
- Select another kind of card: \(12\)
- Select a card of the kind in (c): \(4\)

\(\P(V = 0) = 1\,302\,540 / 2\,598\,960 \approx 0.501177\).

## Proof

By the complement rule, \(\P(V = 0) = 1 - \sum_{k=1}^8 \P(V = k)\)

Note that the probability density function of \(V\) is decreasing; the more valuable the type of hand, the less likely the type of hand is to occur. Note also that *no value* and *one pair* account for more than 92% of all poker hands.

In the poker experiment, note the shape of the density graph. Note that some of the probabilities are so small that they are essentially invisible in the graph. Now run the poker hand 1000 times and compare the relative frequency function to the density function.

In the poker experiment, set the stop criterion to the value of \(V\) given below. Note the number of poker hands required.

- \(V = 3\)
- \(V = 4\)
- \(V = 5\)
- \(V = 6\)
- \(V = 7\)
- \(V = 8\)

Find the probability of getting a hand that is three of a kind or better.

## Answer

0.0287

In the movie The Parent Trap (1998), both twins get straight flushes on the same poker deal. Find the probability of this event.

## Answer

\(3.913 \times 10^{-10}\)

Classify \(V\) in terms of level of measurement: *nominal*, *ordinal*, *interval*, or *ratio*. Is the expected value of \(V\) meaningful?

## Answer

Ordinal. No.

A hand with a pair of aces and a pair of eights (and a fifth card of a different type) is called a dead man's hand. The name is in honor of Wild Bill Hickok, who held such a hand at the time of his murder in 1876. Find the probability of getting a dead man's hand.

## Answer

\(1584 / 2\,598\,960\)

### Drawing Cards

In draw poker, each player is dealt a poker hand and there is an initial round of betting. Typically, each player then gets to discard up to 3 cards and is dealt that number of cards from the remaining deck. This leads to myriad problems in conditional probability, as partial information becomes available. A complete analysis is far beyond the scope of this section, but we will consider a comple of simple examples.

Suppose that Fred's hand is \(\{4\,\heartsuit, 5\,\heartsuit, 7\,\spadesuit, \queen\,\clubsuit, 1\,\diamondsuit\}\). Fred discards the \(\queen\,\clubsuit\) and \(1\,\diamondsuit\) and draws two new cards, hoping to complete the straight. Note that Fred must get a 6 and either a 3 or an 8. Since he is missing a middle denomination (6), Fred is drawing to an inside straight. Find the probability that Fred is successful.

## Answer

\(32 / 1081\)

Suppose that Wilma's hand is \(\{4\,\heartsuit, 5\,\heartsuit, 6\,\spadesuit, \queen\,\clubsuit, 1\,\diamondsuit\}\). Wilma discards \(\queen\,\clubsuit\) and \(1\,\diamondsuit\) and draws two new cards, hoping to complete the straight. Note that Wilma must get a 2 and a 3, or a 7 and an 8, or a 3 and a 7. Find the probability that Wilma is successful. Clearly, Wilma has a better chance than Fred.

## Answer

\(48 / 1081\)