# Pai Gow Telephone Hand: What Are The Odds?

I have written about Pai Gow Poker before and I was surprised that there are still people unaware of the Pai Gow telephone hand. In this article we will take a look at the probability behind drawing the telephone hand when playing Pai Gow. In order to incorporate some programming, we will write a Monte Carlo simulation in Julia and have some fun with this.

### Pai Gow Telephone Hand: The Definition

A Pai Gow telephone hand is seven cards, all with digits and no pairs at all. In other words, it’s a *terrible* hand in Pai Gow and very unlikely to win. Note that some people, myself included, have mistakenly believed that a telephone hand was seven cards, each one different. That’s not quite it – you can’t have any of the “paint” cards like the Joker, Jack, Queen, King or Ace in your hand. The telephone hand must consist of all digits, or the cards 2 through 10; just like you would (almost!) find in a telephone number, hence the term “telephone hand”.

So, the basic question for us remains: how many combinations of 7 cards can you draw out of a deck of 53 cards (standard 52 cards plus a joker) with no card higher than a 10 and no repeating of your cards (i.e. no pairs)? We can program a Julia simulation to do this¹.

A Pai Gow Telephone Hand has no pairs and no card higher than a 10

### Pai Gow Telephone Hand: The Julia Code

Now we get to have some fun by creating some code in Julia. First we can start by creating some of the global variables and the primary Monte Carlo loop that we will need.

1 2 3 4 5 6 7 8 9 | # Add the global variables and constants global telephoneCounter = 0 const iterations = 100000000 # The primary loop for the Monte Carlo for iterationCount = 1:iterations deck = Int[] # The deck of cards hand = Int[] # The hand dealt to the player end |

From there, after adding the Joker card by itself, we can add a nested loop that will fill an array with 52 cards, each numbered from 2 to 14 to represent each one of the cards in a deck.

1 2 3 4 5 6 7 8 9 | push!(deck,99) # Add the Joker to the deck # Iterate through 4 suits for suitCount = 1:4 # Iterate through 14 pips for each suit for pipCount = 2:14 push!(deck,pipCount) end end |

Now it’s time to make select our random seven cards and that’s a fairly straightforward loop like the one shown here

1 2 3 4 5 6 | # Draw a radom seven card hand for handCount = 1:7 randomDraw = rand(1:length(deck)) push!(hand,deck[randomDraw]) splice!(deck,randomDraw) # Make sure we remove the card end |

Finally, we can evaluate our hand making sure that no value is greater than 10 and that no value repeats in our hand (i.e. no pairs)

1 2 3 4 | # Evaluate our hand if !any(x->x>10,hand) && length(unique(hand))==7 telephoneCounter +=1 end |

Displaying our results is a straightforward effort like the one shown here

1 2 | println("Telephone Hands: ", telephoneCounter) println("Telephone P: ", telephoneCounter/iterations) |

The probability of you drawing a telephone hand – by its most strict definition – is 0.0038 or about 0.4% of the hands you can draw

### Pai Gow Telephone Hand: Alternate Evaluation

Remember how I mentioned that sometimes people think the telephone hand is just 7 cards with no pair and no Joker? Well, I was curious and decided to write out code for that too. We can keep the Julia code we have in place now and just include an alternate way of evaluating the hand. This time, we don’t care if we have cards 11-14 (the Jack through Ace) but we do care to eliminate the Joker. From there, we check for a pair in the same way and that code looks like the following.

1 2 3 4 | # Evaluate our hand with the alternate rules if !any(x->x>55,hand) && length(unique(hand))==7 alttelephoneCounter +=1 end |

The probability of you drawing any seven cards with no pair and no Joker is 0.1823 or about 18% of the hands you can draw

This code has been a fun exercise with Julia. The speed at which it runs really shows the power of the language and we are also able to write fairly compact code. My final script for this, including comments and the alternate evaluation method, is less than 50 lines. If you intend to learn more about Pai Gow (or probabilities in general) it pays to run through exercises like this and create your own fun simulations.

¹Yes, I fully realize that this problem can be solved with combinatorial statistics and some math. But that would make for a rather short and boring article!