Finally, some questions about a probabilistic problem. Given…
Finally, some questions about a probabilistic problem. Given a sequence of coin flips, we define a doubleton as two consecutive Hs with no H immediately before or after, or two consecutive Ts with no T immediately before or after. For example, the sequence TTHTTTHHHHTTHTHHThas 3 doubletons (boldfaced). Assume that we toss a fair coin n times (n >= 3). With X a random variable denoting the number of doubletons in the resulting sequence, we want to calculate E. For that purpose, for each i in 1..n we define an indicator random variable X_i for the event that toss i starts a doubleton; thus E = 0 andX = \sum_{i=1}^n X_i.(Observe that when n = 3 we have E = 4/8 = 1/2 since each of the sequences HHT and TTH and HTT and THH has 1 doubleton, while each of the sequences HHH and TTT and HTH and THT has 0 doubletons.)