0

I recently ran across this question:

You flip a fair coin till you get two heads in a row. What is the probability that you stop on the 10th toss?

The way I approached this was to deduce the last 2 flips have to be $H$. In order for there to not have been a pair of $H$ earlier, we know the 3rd to last flip must've been tails. So we know the sequence ends with $THH$.

My next thought was just that we have 7 tosses left, and we want to find the probability that no $H$ landed consecutively.

Let $A_n$ be the event that there are no consecutive $H$ in a sequence of length $n$. Let $F_H$ and $F_T$ be the event that the first toss is a heads and tails, respectively.

Our goal is to find $P(A_7)$ then multiply by $\frac{1}{8}$ for the last three flips.

I considered that we could condition our results on the first toss.

$P(A_7) = P(A_7 | F_H)P(F_H) + P(A_7 | F_T)P(F_T)$

$P(A_7 | F_H)$ must be followed up by a $T$ because otherwise we would have $HH$ at the beginning. So $P(A_7 | F_H) = \frac{1}{2}P(A_5)$. $P(A_7 | F_T)$ can be followed up by anything, and so $P(A_7 | F_T) = P(A_6)$. Then we have:

$P(A_7) = P(A_7 | F_H)P(F_H) + P(A_7 | F_T)P(F_T) = \frac{1}{4}P(A_5) + \frac{1}{2}P(A_6)$. We follow this in a Fibonacci-esque way.

$P(A_2) = \frac{3}{4}$

$P(A_3) = \frac{5}{8}$

$P(A_4) = \frac{1}{2}\frac{5}{8} + \frac{1}{4}\frac{3}{4} = \frac{5}{16} + \frac{3}{16} = \frac{8}{16}$

$P(A_5) = \frac{1}{2}\frac{8}{16} + \frac{1}{4}\frac{5}{8} = \frac{13}{32}$

$P(A_6) = \frac{1}{2}\frac{13}{32} + \frac{1}{4}\frac{8}{16} = \frac{21}{64}$

$P(A_7) = \frac{1}{2}\frac{21}{64} + \frac{1}{4}\frac{13}{32} = \frac{34}{128}$

So, our overall answer is $\frac{34}{128} \cdot \frac{1}{8} = \frac{34}{2^{10}}$

The correct answer is $\frac{17}{2^{10}}$, so I overcomputed by a factor of 2. Could anyone help me identify where I might've gone wrong, or potentially a better strategy.

EDIT: I just realized the answer is actually $\frac{17}{2^{9}}$, which is the same as my answer but I'll leave this up as a fun question

  • Usually, such a question is attacked by either recursion, which your posting demonstrates, or Inclusion-Exclusion. See this article for an introduction to Inclusion-Exclusion. Then, see this answer for an explanation of and justification for the Inclusion-Exclusion formula. ...see next comment – user2661923 Sep 18 '23 at 13:49
  • The Inclusion-Exclusion method would denote the set $~S~$ as the collection of all possible sequences of $~7~$ coin flips, which implies that $~|S| = 2^7.~$ Then, for $~k \in {1,2,\cdots,6},~$ you would define $~S_k~$ to be the subset of $~S~$ where coin flips $~k~$ and $~k+1~$ were both heads. Then, you would compute $$A = |S| - |S_1 \cup \cdots \cup S_6|.$$ So, the final computation would be $~\displaystyle \frac{A}{2^7} \times \frac{1}{8}.$ For what it's worth, my (subjective) view is that recursion is the easier approach for this problem. – user2661923 Sep 18 '23 at 13:51

0 Answers0