# Flip a fair coin repeatedly. What is the probability that the first sequence of heads is exactly two heads long?

Flip a fair coin repeatedly. What is the probability that the first sequence of heads is exactly two heads long?

P(1st sequence = HH) = ? I am assuming that this is a conditional probability question. Where we know that P(A|B)=[P(B|A)P(A)]\P(B). How can I use this tool to solve this question... that is if I even need to!

-
Any infinite sequence has a zero probability. Does your question include a stopping criterion? –  Sudarsan Oct 6 '13 at 3:12

We assume this means that for example the first few tosses are something like $TTTHHT\dots$.

Let $p$ be the required probability.

Given that the first toss is $H$, the required probability is $\frac{1}{4}$. For the $H$ has to be followed by $HT$.

Given that the first toss is $T$, the required probability is $p$. Thus $$p=\frac{1}{2}\cdot\frac{1}{4}+\frac{1}{2}p.$$ Solve this linear equation for $p$.

-

You flip a coin until you get heads. $P=1$. The question then becomes: "What are the odds of now flipping heads then tails?"

The answer, with a fair coin, is: $.5 \cdot .5 = .25$

-