Flip a fair coin 5 times. the probability that heads never occurs twice in a row

combinatoricsprobability

This question has been asked and answered before here. However, my solution does not match the answer, and I want to know how my logic is wrong.

I flip a fair coin 5 times in a row. What is the probability that heads never occurs twice in a row?

The answer, according to the other SO answer, is $13/32$.

My approach: No two heads in a row means we also cannot have three heads in a row or four or five. Notice that these two events are equivalent:

$$
\{\text{no HH}\}
\\
=
\\
\{\text{not (exactly HH or not exactly HHH or exactly HHHH)}\}
\\
=
\\
\{\text{not exactly HH and not exactly HHH and not exactly HHHH}\}.
$$

We can then express these as complementary probabilities:

$$
\begin{aligned}
\mathbb{P}(\text{no HH})
&= \mathbb{P}(\text{not exactly HH})
\\
&\quad\times \mathbb{P}(\text{not exactly HHH})
\\
&\quad\times \mathbb{P}(\text{not exactly HHHH})
\\
&\quad\times \mathbb{P}(\text{not exactly HHHHH})
\\\\
&= 1 – \mathbb{P}(\text{exactly HH})
\\
&\quad\times 1 – \mathbb{P}(\text{exactly HHH})
\\
&\quad\times 1 – \mathbb{P}(\text{exactly HHHH})
\\
&\quad\times 1 – \mathbb{P}(\text{exactly HHHHH})
\end{aligned}
$$

We can easily compute these probabilities:

$$
\begin{aligned}
\mathbb{P}(\text{exactly HH}) &= \frac{4}{2^5}
\\
\mathbb{P}(\text{exactly HHH}) &= \frac{3}{2^5}
\\
\mathbb{P}(\text{exactly HHHH}) &= \frac{2}{2^5}
\\
\mathbb{P}(\text{exactly HHHHH}) &= \frac{1}{2^5}
\end{aligned}
$$

So the probability of no double any heads anywhere in the sequence is:

$$
\prod_{i=1}^{4} \Big(1 – \frac{i}{2^5}\Big) \approx 0.720
$$


What am I doing wrong?

Best Answer

The probability for heads occurring twice in the row equals the probability for tails occurring twice in a row. Let $A$ represent the first event, and $B$ the later. $$\mathsf P(A)=\mathsf P(B)$$

The only outcomes where both occur are: $\small\sf HHHTT, HHTTT,HHTTH, THHTT, TTHHT, TTTHH$ $$\mathsf P(A\cap B)=3/2^4$$

The only outcomes where neither occurs are: $\small\sf HTHTH, THTHT$.$$1-\mathsf P(A\cup B)=1/2^4\\\mathsf P(A\cup B)=(2^4-1)/2^4$$

So, since $\mathsf P(A)+\mathsf P(B)=\mathsf P(A\cup B)+\mathsf P(A\cap B)$, therefore, we can readily find $\mathsf P(A^{\small\complement})$.

Related Question