Mathwords logoMathwords

Penney's Game — Definition, Formula & Example

Penney's Game is a two-player game where each player picks a pattern of three coin flips, such as HHT, and a fair coin is flipped until one pattern shows up. The surprise is that the second player can always pick a pattern that is more likely to appear first.

Player A chooses a sequence A∈{H,T}3A \in \{H, T\}^3. Player B then chooses a different sequence B∈{H,T}3B \in \{H, T\}^3. A fair coin is tossed repeatedly, and the player whose sequence first appears as three consecutive tosses wins. For every choice A=x1x2x3A = x_1x_2x_3, the reply B=xˉ2 x1x2B = \bar{x}_2\,x_1x_2 wins with probability at least 23\tfrac{2}{3}. Here xˉ2\bar{x}_2 is the opposite of x2x_2.

Key Formula

P(B beats A)=A:A−A:B(A:A−A:B)+(B:B−B:A)P(B \text{ beats } A) = \frac{A{:}A - A{:}B}{(A{:}A - A{:}B) + (B{:}B - B{:}A)}
Where:
  • A,BA, B = The two chosen patterns, each of length 3
  • X:YX{:}Y = Conway's correlation number. For each shift k=0,1,2k = 0, 1, 2, write a 1 if the last 3−k3 - k flips of XX equal the first 3−k3 - k flips of YY, and a 0 otherwise. Read the three digits as a binary number.

Worked Example

Problem: Player A picks HHT. Player B replies with THH. Find the probability that THH appears before HHT.
Step 1: HHT can appear only after HH appears. Suppose the first two flips are HH. Then the first T after that run completes HHT. A T would have to come first for THH to appear, so THH cannot win. This case has probability:
P(first two flips are HH)=(12)2=14P(\text{first two flips are } HH) = \left(\tfrac{1}{2}\right)^2 = \tfrac{1}{4}
Step 2: Otherwise, the first HH appears later. The flip just before it must be T, or HH would have appeared earlier. So THH is completed the moment HH first appears, before HHT is possible. Use the complement of the Step 1 case:
P(THH wins)=1−14=34P(\text{THH wins}) = 1 - \tfrac{1}{4} = \tfrac{3}{4}
Step 3: Check with Conway's formula. A:A=1002=4A{:}A = 100_2 = 4, A:B=0012=1A{:}B = 001_2 = 1, B:B=1002=4B{:}B = 100_2 = 4, and B:A=0112=3B{:}A = 011_2 = 3.
P(B beats A)=4−1(4−1)+(4−3)=34P(B \text{ beats } A) = \frac{4 - 1}{(4 - 1) + (4 - 3)} = \frac{3}{4}
Answer: THH beats HHT with probability 34\tfrac{3}{4}. The odds are 3 to 1 in Player B's favor.

Why It Matters

Penney's Game is a standard example of nontransitivity in probability courses. THH beats HHT (probability 3/4), HHT beats HTT (2/3), HTT beats TTH (3/4), and TTH beats THH (2/3), so the patterns form a cycle with no best choice. The overlap ideas behind Conway's formula also appear in string-matching algorithms and in DNA sequence analysis.

Common Mistakes

Mistake: Reasoning that every three-flip pattern has probability 18\tfrac{1}{8}, so any two patterns are equally likely to appear first.
Correction: Each pattern has probability 18\tfrac{1}{8} in a fixed block of three flips. But the race depends on how the patterns overlap. THH reuses the start of HHT, so it wins 3 times out of 4.

Related Terms

  • Bimatrix Game — Payoff tables can model choosing patterns against each other
  • Game Theory — The study of strategy behind choosing winning patterns
  • Bernoulli Trials — Models each independent fair coin flip in the game
  • Complement of an Event — Gives the winning chance as one minus the losing case
  • Conditional Probability — Used to analyze the race after the first few flips
  • Event — Each pattern appearing first is an event to measure
  • Experiment — Describes the repeated coin tossing that ends each game
  • Fair Coin — The coin flipped repeatedly to play the game