Back

Question: 2015 Fall Final - 21

Author: Michiel Smid
Let $n$ be an integer with $n \geq 3$. Consider a bitstring of length $n$, in which each bit is 0 with probability 1/3 (and, thus, 1 with probability 2/3), independently of the other bits. Let $X$ be the number of occurrences of 010 in this bitstring. For example, if the bitstring is $$ 0010100100, $$ then $X = 3$.
What is the expected value $\mathbb{E}(X)$ of $X$?
Hint: Use indicator random variables.
(a)
$(n-2)/8$
(b)
$2(n-2)/27$
(c)
$n/8$
(d)
$2n/27$