A coin with probability p of Heads is flipped repeatedly, where 0 < p < 1. The sequence of outcomes can be divided into runs (blocks of H’s or blocks of T’s), e.g.,
HHHT T T T HT T T HH becomes HHH T T T T H T T T HH , which has 5 runs,
with lengths 3, 4, 1, 3, 2, respectively. Assume that the coin is flipped at least until the
start of the third run.
(a) Find the expected length of the first run.
(b) Find the expected length of the second run.