[Math] A coin is tossed 7 times. The probability that at least 4 consecutive heads appear is

probability

A coin is tossed 7 times. The probability that at least 4
consecutive heads appear is?

I have checked and double checked but I can't figure out which cases I am missing.

Here are the cases:

  1. 4 consecutive heads appear:

$n_1 = \dfrac{4!}{3!}= 4$

  1. 5 heads appear

Subcase 1: 4 consecutive heads appear and the other head is separated.

For example: HTTHHHH or THTHHHH

Subcase 1 has $4$ possibilities.

Subcase 2: 5 consecutive heads:

$\dfrac{3!}{2!} = 3$

$n_2 = 4+ 3 = 7$

  1. 6 heads appear

There are 6 gaps (including the ends) where we can place the $T$

Let me show those places by G:

GHGHGHHGHGHG

$n_3 = 6$

  1. All heads appear

$n_4 = 1$

$P(\text{4 consecutive heads}) = \dfrac{n_1+ n_2+ n_3 + n_4}{2^7} = \dfrac{18}{2^7} = \dfrac{9}{64}$

Please let me know my mistake.

Best Answer

The component of $n_2$ counting the ways that five heads appear, one of which is separated from the other four, should be 6 rather than 4: $$\text{HTTHHHH THTHHHH}\\ \text{HTHHHHT THHHHTH}\\ \text{HHHHTTH HHHHTHT}$$ Thus the probability is $\frac{20}{2^7}=\frac5{32}$.

Related Question