Problem 58
Question
A coin having probability \(p\) of coming up heads is continually flipped until both heads and tails have appeared. Find (a) the expected number of flips; (b) the probability that the last flip lands on heads.
Step-by-Step Solution
Verified Answer
(a) The expected number of flips until both heads and tails appear is:
\[ E = p\left(1+\frac{1}{1-p}\right) \]
(b) The probability that the last flip lands on heads is:
\[ P(A) = \frac{1-p}{1 + p} \]
1Step 1: Calculate the probability of obtaining both heads and tails in a given number of flips
To find the expected number of flips, let's start by computing the probability of obtaining both heads and tails in a given number of flips. If the first flip is a head (which occurs with probability \(p\)), we can think of this as waiting for a tail to appear. The probability of this happening is the geometric distribution with parameter \((1-p)\). The expected number of flips for this to happen is \(\frac{1}{1-p}\), and since the first flip was a head, we need to add one more flip. Combining these, we get that the expected number of flips for both heads and tails to appear is:
\[
E = p\left(1+\frac{1}{1-p}\right)
\]
2Step 2: Calculate the probability of the last flip landing on heads
To find the probability that the last flip is heads, we need to consider the possible scenarios. Let's denote the last flip landing on heads by event A and the last flip landing on tails by event B. Since the coin can flip either heads or tails at any moment, A and B are complementary events, and therefore:
\[ P(A) = 1-P(B) \]
Now we need to compute the probability of event B. Let's count the flips from the first occurrence of tails: suppose the first tails appears in the \(i\)-th flip and the flips end with tails. In this case both since head and tails need to occur, \(i\) can take on a value from 1 to n-1. Since there are total \(n\) flips. Let's compute the probability that A happens given that the first tails appears in the \(i\)-th flip:
\[
P(A \mid i) = p^{i}
\]
This is true because tails needed to occur, and the remaining flips, from \(i\) to \(n\), must all be heads.
Now we need to compute the likelihood of the first tails appearing in the \(i\)-th flip:
\[ P(i) = p^{i-1}(1-p) \]
Using the law of total probability, we can compute the probability of the last flip landing on - event A:
\[ P(A) = \sum_{i=1}^{n-1} P(A \mid i)P(i) = \sum_{i=1}^{n-1} p^{i}p^{i-1}(1-p) = (1-p)\sum_{i=1}^{n-1} p^{2i-1} \]
Finally, as \(n\) goes to infinity, the probability that the last flip is heads becomes:
\[
\lim_{n \to \infty} P(A) = \frac{1-p}{1 + p}
\]
3Step 3: Summarizing the results
(a) The expected number of flips until both heads and tails appear is:
\[
E = p\left(1+\frac{1}{1-p}\right)
\]
(b) The probability that the last flip lands on heads is:
\[
P(A) = \frac{1-p}{1 + p}
\]
Other exercises in this chapter
Problem 55
Ten hunters are waiting for ducks to fly by. When a flock of ducks flies overhead, the hunters fire at the same time, but each chooses his target at random, ind
View solution Problem 57
Suppose that the expected number of accidents per week at an industrial plant is \(5 .\) Suppose also that the numbers of workers injured in each accident are i
View solution Problem 59
There are \(n+1\) participants in a game. Each person independently is a winner with probability \(p .\) The winners share a total prize of 1 unit. (For instanc
View solution Problem 60
Each of \(m+2\) players pays 1 unit to a kitty in order to play the following game: A fair coin is to be flipped successively \(n\) times, where \(n\) is an odd
View solution