A fair coin is tossed 1000 times and the result is stored as a string. Let x be the expected number of times the pattern TT occurs in the string. Find x.
i thought to first find total possible cases which equals 2^1000 . after that i thought to merge two TT together and place it at any of 999 places and remaining 998 can be placed in 2^998 ways. but it does not work. kindly looking for help to tackle such problem.
You can try with a smaller sample of coin tosses: i.e. $n=4$ and realize that you have 12 possible TT patterns on 16 total elementary 4-tuples.
Using @dhrab hint you have that your expectation is
$$\frac{1}{4}\times 3=\frac{12}{16}$$
Thus in your example you fine
$$\frac{1}{4}\times 999=\frac{999}{4}$$