Data Science Interview Prep: Q70
First-Move Advantage in a Biased Coin Toss Game. (Category: Probability)
Players A and B take turns flipping a biased coin with the probability of heads being p. The first player to flip a heads wins. If Player A starts, what is Player A’s chance of winning?
Solution:
To begin, let’s map out the possible outcomes when Player A flips first, using a tree diagram.
Here, p represents the probability of flipping a head, and (1 - p) represents the probability of flipping a tail.
Let X be the probability that Player A wins.
Two cases arise:
Player A flips a head on the first try:
Player A wins immediately with probability p.
Player A flips a tail on the first try:
Player B then flips. If Player B also flips a tail, the game resets to the original situation, with Player A’s chance of winning again equal to X.
This occurs with probability (1−p)·(1−p)·X = (1-p)2 · X.
As the two outcomes are mutually exclusive, the probability of Player A winning is given by the sum of their probabilities, from which we solve for X:
Therefore, the probability of Player A winning is 1/(2 - p), where 0 < p < 1.
Accounting for the bias in the coin:
If the coin is heavily biased toward heads, i.e., p → 1, then given that Player A flips first, X → 1. Player A almost always wins.
If the coin is heavily biased toward tails, i.e., p → 0, then given that Player A flips first, X → 1/2. In this case, the game may continue for many flips, but Player A’s first-mover advantage disappears, leaving both players equally likely to win.
We hope you found the article both enlightening and valuable! For more insightful content delivered straight to your inbox, simply enter your email address below and hit the subscribe button. Stay tuned for future updates!
Reference:
Biased coin problem: https://math.stackexchange.com/questions/4236624/general-solution-to-two-players-alternately-flip-a-coin-which-may-be-biased-wh