[Math] Occurrence of 5 consecutive tails before occurrence of 2 consecutive heads

probability

In repeated tossing of a fair coin find the probability that $5$ consecutive tails occur before occurrence of $2$ consecutive heads.

My attempt:
I tried to find the probability of non-occurrence of two consecutive heads in $n$ throws.

Let $a_{n}$ be the number of possibilities in which $2$ consecutive heads do not occur in $n$ throws.

I managed to find the recursion formula.

$a_{1}=2$

$a_{2}=3$

$a_{n}=a_{n-1}+a_{n-2}$

But I am not able to get a closed form of $a_{n}$.

Once $a_{n}$ gets determined it may be possible then to find probability of occurrence of $5$ consecutive heads

Best Answer

A different approach: consider two independent geometric vars $X_1$ ,$X_2$, each of which measures the amount of trials until getting a success, in an experiment with prob. of success $p_1$ (resp $p_2)$

Then $$P(X_1 \le X_2)=p_1 + p_1 q_1 q_2 +p_1 (q_1 q_2)^2+\cdots=\frac{p_1}{1- q_1 q_2} $$

$$P(X_1 < X_2)=p_1 q_2 + p_1 q_2 q_1 q_2 +p_1 q_2 (q_1 q_2)^2+\cdots=\frac{p_1 q_2}{1- q_1 q_2} $$

We can consider each run of tails/heads such experiments, with $p_1=1/2^{5-1}=2^{-4}$, $p_2 =1/2$

Let $E$ be the desired event (run of 5 tails happens before run of 2 heads). Let $T$ be the event that the first coin is a tail. Then

$$P(E)=P(E|T)P(T)+P(E|T^c)P(T^c)=\\ =\frac{p_1}{1- q_1 q_2} \frac{1}{2}+\frac{p_1 q_2}{1- q_1 q_2} \frac{1}{2}=\\=\frac{1}{2} (1+q_2)\frac{p_1}{1- q_1 q_2} =\frac{3}{34} $$

In general

$$P(E)=\frac{2^h-1}{2^t+2^h-2}$$

Seeing that the final formula is so simple, I wonder if there is a simpler derivation.