WordGPT

Waiting for HH takes longer than waiting for HT

Exercise Β· Level 4 (Hard)

You flip a fair coin until you see the pattern. On average how many flips does HT take, and how many does HH take?

E[HT]=4,E[HH]=6\begin{aligned}E[\text{HT}]&=4,\qquad E[\text{HH}]\\&=6\end{aligned}

wordgptpro.com

Solution 1/2

  1. For HH let E0E_0 be the expected flips from scratch and EHE_H after a head. From scratch: E0=1+12EH+12E0E_0=1+\tfrac12E_H+\tfrac12E_0. After a head: a head ends it, a tail restarts: EH=1+12β‹…0+12E0E_H=1+\tfrac12\cdot0+\tfrac12E_0.

    E0=1+12(1+12E0)+12E0β‡’Β E0=6\begin{aligned}&E_0\\&=1+\tfrac12\left(1+\tfrac12E_0\right)+\tfrac12E_0\\&\Rightarrow\ E_0=6\end{aligned}
    (1)

wordgptpro.com

Solution 2/2

  1. For HT: from scratch the same, E0=1+12EH+12E0E_0=1+\tfrac12E_H+\tfrac12E_0. After a head: a tail ends it, a head leaves you still 'just saw H': EH=1+12β‹…0+12EHE_H=1+\tfrac12\cdot0+\tfrac12E_H, so EH=2E_H=2:

    E0=1+12β‹…2+12E0β‡’Β E0=4\begin{aligned}&E_0\\&=1+\tfrac12\cdot2+\tfrac12E_0\\&\Rightarrow\ E_0=4\end{aligned}
    (2)
  2. The difference: after a failed HH you start from scratch, but after a failed HT you keep your H.

AnswerHT:Β 4Β flips,HH:Β 6Β flipsHT:\ 4\ \text{flips},\quad HH:\ 6\ \text{flips}

wordgptpro.com

Need a hint?

Set up equations for the expected number of further flips from each state: nothing yet, or just saw H.

On average HT appears after 4 flips but HH only after 6, because a failed HH attempt sends you back to the start, while a failed HT attempt keeps the head.

How to work it out

  1. For HH let E0E_0 be the expected flips from scratch and EHE_H after a head. From scratch: E0=1+12EH+12E0E_0=1+\tfrac12E_H+\tfrac12E_0. After a head: a head ends it, a tail restarts: EH=1+12β‹…0+12E0E_H=1+\tfrac12\cdot0+\tfrac12E_0.

    E0=1+12(1+12E0)+12E0β‡’Β E0=6\begin{aligned}&E_0\\&=1+\tfrac12\left(1+\tfrac12E_0\right)+\tfrac12E_0\\&\Rightarrow\ E_0=6\end{aligned}
    (1)
  2. For HT: from scratch the same, E0=1+12EH+12E0E_0=1+\tfrac12E_H+\tfrac12E_0. After a head: a tail ends it, a head leaves you still 'just saw H': EH=1+12β‹…0+12EHE_H=1+\tfrac12\cdot0+\tfrac12E_H, so EH=2E_H=2:

    E0=1+12β‹…2+12E0β‡’Β E0=4\begin{aligned}&E_0\\&=1+\tfrac12\cdot2+\tfrac12E_0\\&\Rightarrow\ E_0=4\end{aligned}
    (2)
  3. The difference: after a failed HH you start from scratch, but after a failed HT you keep your H.

LaTeX source of the formulas on this page
\[ HT:\ 4\ \text{flips},\quad HH:\ 6\ \text{flips} \]
\[ E_0=1+\tfrac12\left(1+\tfrac12E_0\right)+\tfrac12E_0\ \Rightarrow\ E_0=6 \]
\[ E_0=1+\tfrac12\cdot2+\tfrac12E_0\ \Rightarrow\ E_0=4 \]

Questions

What is the answer to: Waiting for HH takes longer than waiting for HT?

On average HT appears after 4 flips but HH only after 6, because a failed HH attempt sends you back to the start, while a failed HT attempt keeps the head.

What is the key idea?

A failed attempt can leave you in a better state or a worse one; expected values from states give the answer.

Is there a hint?

Set up equations for the expected number of further flips from each state: nothing yet, or just saw H.

Related problems

More probability and puzzles

    Waiting for HH takes longer than waiting for HT: answer and solution | WordGPT