I have a little problem about the notation and the equation described below.
Let $X_0,X_1,X_2,\dots$ be $\{0,1\}$-valued random variables defined as follows:
- $X_0=0$
- for $n\geq 1$ do
- if $X_{n-1}=1$ then $X_n=0$ else $X_n=Z_n$ end if
The random variables $Z_n$ are independent from $X_0,X_1,X_2,\dots$ and are defined as $P(Z_n=1)=P(Z_n=0)=\frac{1}{2}$.
I saw a calculation of the covariance $cov(X_1X_3)$:
$ \begin{align} cov(X_1X_3)&=E(X_1X_2)-E(X_1)E(X_3) \\ &=P(X_1=1,X_3=1)-P(X_1=1)P(X_3=1) \end{align} $
And here is my problem. Why is the last equity true?
Since $X_i$ is $\{0,1\}$-valued I know that $E(X_i)=0*P(X_i=0)+1*P(X_i=1)=P(X_i=1)$
But I don't see why
$E(X_1X_3)=P(X_1=1,X_3=1)$
is true! I am sure this is trivial, but I don't get it.
Thanks for any enlightenment!