# Calculating the covariance matrix

I'm working through exercises in my textbook and I'm stuck on calculating the covariance matrix.

We are given a random vector $$X = \pmatrix{X_1\cr X_2\cr}$$ with expected value $$\mu = \pmatrix{1\cr-1 \cr}$$ and covariance matrix $$\Sigma = \pmatrix{1 & 0 \cr 0 & 4 \cr}$$ We then have to calculate the $\mu$ and $\Sigma$ of $$Z = \pmatrix{Z_1\cr Z_2\cr} = \pmatrix{X_1 + X_2\cr X_1 - X_2\cr}.$$

and determine if $Z_1$ and $Z_2$ are independent.

I think that

$$\mu = E(Z) = \pmatrix{E(Z_1)\cr E(Z_2)\cr} = \pmatrix{E(X_1) + E(X_2)\cr E(X_1) - E(X_2)\cr} = \pmatrix{0\cr 2\cr},$$

but I'm not sure how to calculate $\Sigma$.

Also, the second part of the question is pretty vague to me as well and goes as follows:

Now take the same $X$, but with $$\mu = \pmatrix{0\cr 0\cr}$$ and $$\Sigma = \pmatrix{1 & 0 \cr 0 & c \cr} \textrm{ for } c > 0$$ For which values $c$ are the components $Z_1$ and $Z_2$ uncorrelated?

• Is $X$ a normally-distributed random vector? This is essential for the question. – Clarinetist May 2 '16 at 17:19
• @Clarinetist it just says it is a random vector. – Mosbas May 2 '16 at 17:20
• You already posted this not long ago, with as much personal input as here (meaning, zero), and you are probably reposting it to circumvent the closure of the first version. Another option would be to add your thoughts on the question ("I am stuck" and "the question is pretty vague to me" and "I don't really understand" do not count). Weren't you given indications on the first installment? – Did May 2 '16 at 17:21
• @Clarinetist I think it is potentially misleading to say that normality is required for the question - none of the calculations require it at all. – user93238 May 2 '16 at 17:23
• @Mark I didn't say it was required, what I meant to say is that it is essential information in order to answer the question. If $X$ is multivariate normal, the problem is easier than what it is here. – Clarinetist May 2 '16 at 17:24

Hints (by no means complete solutions): by definition, $$\boldsymbol{\Sigma}_{Z} = \text{Var}(Z) = \mathbb{E}\left[(Z-\mu_{Z})(Z-\mu_{Z})^{T} \right]\text{.}$$

(This is just the covariance matrix of $Z$. Some people use $\text{Cov}(X)$ instead.)

Independence can't be inferred without knowing the joint distribution and the marginal distributions of $Z_1$ and $Z_2$. (Why?)

What do we mean when we say $Z_1$ and $Z_2$ are uncorrelated?

• I still don't understand how I should calculate the covariance matrix by using this. – Mosbas May 2 '16 at 18:14
• I've been reading this and I'm not sure if I should give a matrix with actual numbers or write it like $E[(Z_1-\mu_{Z_1})(Z_1-\mu_{Z_1})]$ etcetera? – Mosbas May 2 '16 at 18:57
• @Mosbas What you have there is the one-dimensional definition. You have a two-dimensional vector in this case. – Clarinetist May 2 '16 at 19:13
• @Mosbas Start off with this: what's $Z - \mu_Z$? Now find $(Z - \mu_Z)(Z-\mu_Z)^{T}$. Take the expected value of this. – Clarinetist May 2 '16 at 19:14
• – Mosbas May 2 '16 at 19:25