fofopausiomiava

2022-09-04

Covariance knowning conditional distribution of the two variables
For an excercise at my university I need to find Var(X) where $X=\left({Y}^{t},{Z}^{t}{\right)}^{t}$ knowing that $Z\sim N\left(0,{I}_{2}\right)$ and $Y|Z\sim N\left(BZ,{I}_{4}\right)$ given that $B\in {M}_{4,2}$ is a matrix and the ${I}_{2}$ and ${I}_{4}$ are the identitis. I've managed to find that $Var\left(Y\right)={I}_{4}+{B}^{t}B$ and I also already know Var(Z), I am stuck at the $Cov\left(Y,Z\right)=E\left[Y{Z}^{t}\right]$. Does someone know how to compute it?

falwsay

Step 1
Sanity check: ${B}^{t}B$ is $2×2$, so ${I}_{4}+{B}^{t}B$ does not make sense.
The law of total variance implies
$\text{Var}\left(Y\right)=E\left[\text{Var}\left(Y\mid Z\right)\right]+\text{Var}\left(E\left[Y\mid X\right]\right)={I}_{4}+\text{Var}\left(BZ\right)={I}_{4}+BE\left[Z{Z}^{t}\right]{B}^{t}={I}_{4}+B{B}^{t}.$
Step 2
Similarly, the law of total covariance implies
$\begin{array}{r}\text{Cov}\left(Y,Z\right)=E\left[\text{Cov}\left(Y,Z\mid Z\right)\right]+\text{Cov}\left(E\left[Y\mid Z\right],E\left[Z\mid Z\right]\right)=0+B=B.\end{array}$
Alternatively, letting $Y=BZ+U$ where $U\sim N\left(0,{I}_{4}\right)$ is independent of Z,
$\begin{array}{rl}\text{Cov}\left(Y,Z\right)& =E\left[\left(Y-E\left[Y\right]\right)\left(Z-E\left[Z\right]{\right)}^{t}\right]\\ & =E\left[Y{Z}^{t}\right]\\ & =E\left[E\left[Y{Z}^{t}\mid Z\right]\right]\\ & =E\left[\left(BZ+U\right){Z}^{t}\right]\\ & =BE\left[Z{Z}^{t}\right]+BE\left[U{Z}^{t}\right]\\ & =B.\end{array}$

Do you have a similar question?