You flip a fair coin $1000$ times, each flip is independent. Let $X$ be the random variable that counts the number of $7$ series of Heads. $X$ also counts the number of congruent series, meaning:
H H H H H H H H H ($9$ Times) is actually $3$ series of $7$ Heads.
Calculate the expected value and variance of $X$.
Hint: Write $X$ as a sum of indicators random variables.
Okay so what I did is Marking $X_i$ as the random variable that gets $1$ if a series of $7$ heads start at the $i$-th flip, $0$ otherwise.
And then I did $E[X] = E[\sum X_i]$
Eventually I received $E[X] = 7.64$
is it correct? Thanks!
No. It is the correct procedure, but not the correct value.
Note that up to the 994-th index the expected value of the indicator for starting a substring of seven consecutive heads is an identical non-zero constant, but for all indices after that it is zero (because there are not six remaining places in the string).