# Covariance Matrix of a Vector Random Variable w/ Components Related

1. Jul 2, 2013

### CAVision

1. The problem statement, all variables and given/known data
Given X=ZU+Y
where
(i) U,X,Y, and Z are random variables
(ii) U~N(0,1)
(iii) U is independent of Z and Y
(iv) f(z) = $\frac{3}{4}$ z2 if 1 $\leq z$ $\leq 2$, f(z)=0 otherwise
(v) fY|Z=z(y) = ze-zy (i.e. Y depends conditionally on Z)
(vi) define vector W=[X Y Z]T

Q: What is the covariance matrix KWW?

2. Relevant equations
KWW = E[(W-E[W])(W-E[W])T]
KWW = $\begin{pmatrix}K_{XX} & K_{XY} & K_{XZ} \\ K_{YX} & K_{YY} & K_{YZ} \\ K_{ZX} & K_{ZY} & K_{ZZ} \end{pmatrix}$

$V[X] = E[(X-E[X])^2] = E[X^2] - E^2[X]$
$V[X] = E_Z[V[X|Z=z]] + V_Z[E[X|Z=z]]$ (Total Variance Theorem)

3. The attempt at a solution
I can calculate using $K_{ZZ} = E[Z^2] - E^2[Z]$, and the definition of expectation.
However, I'm having difficulty calculating the other terms.

For example, if I use the Total Variance Theorem for KXX I get the following:
(using Total Variance Theorem)
$V[X] = E_Z[V[X|Z=z]] + V_Z[E[X|Z=z]]$
(using X=ZU+Y)
$V[X] = E_Z[V[ZU+Y|Z=z]] + V_Z[E[ZU+Y|Z=z]]$
(using Z=z)
$V[X] = E_Z[V[zU+Y|Z=z]] + V_Z[E[zU+Y|Z=z]]$
(using V[aX+bY|Z=z]=a2V[X|Z=z]+b2V[Y|Z=z]+2abCov[X,Y|Z=z])
$V[X] = E_Z[z^2V[U|Z=z] + V[Y|Z=z] + 2zCov[U,Y|Z=z]] +V_Z[E[zU+Y|Z=z]]$
(using E[aX+bY|Z=z]=aE[X|Z=z] +bE[Y|Z=z])
$V[X] = E_Z[z^2V[U|Z=z] + V[Y|Z=z] + 2zCov[U,Y|Z=z]] +V_Z[zE[U|Z=z] + zE[Y|Z=z]]$
(using U,Z are independent, for U|Z=z terms drop the Z=z)
$V[X] = E_Z[z^2V + V[Y|Z=z] + 2zCov[U,Y|Z=z]] +V_Z[zE + zE[Y|Z=z]]$
(using E= 0 and V=1 which is given by U~N(0,1) )
$V[X] = E_Z[z^2 + V[Y|Z=z] + 2zCov[U,Y|Z=z]] +V_Z[0 + zE[Y|Z=z]]$

Now, I can find $V[Y|Z=z]$ and $E[Y|Z=z]]$, but I'm not sure how to find Cov[U,Y|Z=z]].

From my understanding U independent of Y means Cov[U,Y]=0, but not necessarily that Cov[U,Y|Z=z] = 0. Let me know if this last statement is incorrect.

I'm I approaching this correctly?
Is there an easier way?