Finding the expected value of a random function X that counts the number of pairs of consecutive zeroes for a random bit string of length n

170 Views Asked by At

For example X(00100) = 2, X(00000) = 4, X(10101) = 0, X(00010) = 2. My understanding of expected value is that it is the product of the number of trials and the probability success will occur. I am guessing the number of trails will be 2^n, however I am not quite sure how to find the probability of the occurrence of two consecutive zeros.