In: Statistics and Probability
Take a coin that lands “heads” with probability 1/2 and flip it repeatedly while keeping trackof the pattern of “heads” and “tails” that you see. Use 1 to denote a “head” and 0 to denotea “tail”. We are interested in computing the frequency of the pattern{1, 1, 0}, i.e., of seeingtwo consecutive “heads” followed by a “tail”. To do this we construct a Markov chain whosestate space consists of all the possible 3-flip patterns:1){1, 1, 1}2){1, 1, 0}3){1, 0, 1}4){0, 1, 1}5){1, 0, 0}6){0, 1, 0}7){0, 0, 1}8){0, 0, 0}LetXndenote the pattern formed by the last three coin flips, withX0denoting the result ofthe first three. Denote the eight patterns using the enumeration above, so that{Xn:n≥0}takes values onS={1,2,3,4,5,6,7,8}.(a) Compute the stationary distribution of{Xn:n≥0}. (Hint:look at the columns of theone-step transition matrix)(b) Compute the long run proportion of times that you break a sequence of consecutive“heads” (two or more).