[Jump to AI Interview][Learn Bayes’ Theorem]
Problem Statement
A and B take turns tossing a fair coin, with A going first. The player who gets the first tails after a heads wins. What is the probability of A winning?
Solution
This is a classic conditional probability problem that requires careful analysis of the game’s structure.
Step 1: Set Up the Conditional Probability Framework
Since A goes first, let P(A) be the probability that player A wins. We can use the Law of Total Probability by conditioning on what happens in A’s first toss:
where H means A gets heads and T means A gets tails.
Step 2: Analyze P(A \mid T)
If A gets tails on their first toss, then:
-
The game effectively resets
-
B becomes the new “A” (first player)
-
A becomes the new “B” (second player)
Therefore:
Step 3: Analyze P(A \mid H)
If A gets heads on their first toss, then B can:
-
Throw a tail: B wins immediately, so P(A \mid H, B=T) = 0
-
Throw a head: In this case, B is now in the same position A was in initially (has H, opponent’s turn)
The key insight: When A gets H and B gets H, B is in the position A was in (has H, opponent’s turn). Therefore:
-
B’s probability of winning from this position is P(A \mid H)
-
A’s probability of winning from this position is 1 - P(A \mid H)
Step 4: Derive the Equation for P(A \mid H)
Using conditional probability on B’s first toss:
The first term is 0 because if B throws tails, A loses immediately. The second term represents B throwing heads, which puts B in A’s original position.
Simplifying:
Step 5: Solve for P(A)
Substituting back into our original equation:
Final Answer
Key Insights
-
Conditional Probability Structure: Breaking down the problem by conditioning on the first outcome is crucial.
-
Symmetry and Role Reversal: When a player gets tails first, the game resets with roles reversed, creating a recursive structure.
-
Recursive Equations: The key insight is recognizing that P(A \mid T) = P(B) = 1 - P(A), which creates a self-referential equation.
-
First-Step Analysis: Conditioning on what happens in the first step (or first few steps) is a powerful technique for solving sequential probability problems.
-
Positional Symmetry: When both players have heads, the situation becomes symmetric with respect to who has the advantage, allowing us to relate probabilities through the recursive structure.