If I have x1 and x2 whose covariance matrix =
[0.1 0.2
0.2 0.4]
and Z1 = x1+x2, Z2 = x1-x2 when calculating cov(Z1,Z2)=E[(x1+x2)(x1-x2)] =E[(x1)^2-(x2)^2]
Does this means I have to calculate (0.1)^2 - (0.4)^2 ?
If I have x1 and x2 whose covariance matrix =
[0.1 0.2
0.2 0.4]
and Z1 = x1+x2, Z2 = x1-x2 when calculating cov(Z1,Z2)=E[(x1+x2)(x1-x2)] =E[(x1)^2-(x2)^2]
Does this means I have to calculate (0.1)^2 - (0.4)^2 ?
Copyright © 2021 JogjaFile Inc.
The expectation is linear, that means you can write \begin{equation}E[X_1^2-X_2^2]=E[X_1^2]-E[X_2^2]\end{equation}
Additionally, it holds for any random variable $X$:
$$E[X^2]=\text{Var}[X]+E[X]^2$$
You already used $E[X_i]=0$, $i=1,2$ so I guess we can assume that (and since the covariance is always invariant of the expectation we can wlog assume that).
Using this, \begin{equation}E[X_1^2-X_2^2]=E[X_1^2]-E[X_2^2]=\text{Var}[X_1]-\text{Var}[X_2]=0.1-0.4\end{equation}
since on the diagonal of the covariance matrix are the variances. So besides the squaring your answer was correct.