A coin is tossed repeatedly. We are interested in finding the expected number of tosses until a particular pattern, say B= HTH, occurs for the first time. Let TB be the time to obtain pattern B for the first time. Using the associated Markov chain whose states are the possible initial segments of the sequence HTH (states HTH, HT, H, and ∅), with transition matrix
HTHHTH∅HTH1.500HT00.50H00.5.5∅0.50.5,
show that the values E(TB)=10 and E(TB)=14 are correct for the expected time to reach the patterns HTH and HHH, respectively.