A biased coin has the probability p of coming up heads and the probability q of coming up tails. If it is tossed indefinitely, what is the probability that at some time or other you will get more tails than heads? What is the probability of ever getting an equal number of tails and heads?The following solution approaches the situation as a random walk, stepping to the right or stepping to the left corresponding to throwing heads or tails.
Let L be the probability of ever ending up one step to the left of where you are.
The event of L can be accomplished in two ways:
- Making the first step to the left, probability = q
- Making the first step to the right and then eventually ending up two steps to the left, probability = p L2, therefore,
L = q + p L2
setting q = 1 - p and solving the above as a quadratic in L,
L = 1, (1 - p)/p = q/p
This is the probability of ever getting more tails than heads: 1 if p < q and q/p if p > q. Now for the probability of ever getting an equal number of tails and heads.
Case 1, p > q
1a. The first step is to the right (probability = p)The probability of returning to the left is q/p, so the net probability of this case is q.
1b. The first step is to the left (probability = q) The probability of return is 1. Since the first step can be either to the right or to the left, the total probability for case 1 is 2q.
Case 2, p < q
1a. The first step is to the right (probability = p) The probability of returning to the left is 11b. The first step is to the left (probability = q) We solve the above equation for L with p and q reversed to get the probability of ever ending one step to the right and get R = 1, p/q, so the probability for this case is p.Since the first step can be either to the right or to the left, the net probability for case 2 is 2p.
Case 3, p = q
the net probability is 1.
Michael Shackleford's Solution, Problem 11
Solution by "se16" on alt.sci.math.probability
There is a well known result easily proved by induction that if in an election Candidate 1 gets A votes and Candidate 2 gets B votes [with A>B] then the probability that Candidate 1 is strictly ahead all the way from the [random permutation] counting of the first vote to the counting of the last is (A-B)/(A+B).Let n=A+B and q=A/(A+B) [with q>1/2], and this probability becomes 2q-1, not depending on n.
The probability it does not happen is then 2-2q, i.e. that at some stage in the count both candidates have an equal number of votes. But moving to the coin flipping, thanks to the law of large numbers the proportion of heads
H/(H+T) converges to p as the number of flips increases so the probability of ever getting an equal number of heads and tails is 2-2p if p>=1/2, [or 2p if p<=1/2].