Finding correlation given variance-covariance matrix

12.4k Views Asked by At

I've been looking all over the internet and have been having trouble finding good uses of a covariance matrix to find the correlation coefficient.

I know that, from a simple $2 \times2$ variance-covariance matrix, the correlation is given by $\mathrm{COR}\left(X,Y\right)=\frac{\mathrm{COV} \left(X,Y\right)}{\sqrt{Var\left(X\right)\cdot V a r\left(Y\right)}}$.

But, if a variance-covariance matrix is a $3 \times 3$, like in this example:

          m                s               df
m    1.004899e-04   -4.762594e-06     -7.856965e-02
s   -4.762594e-06    7.781352e-05      4.741813e-01
df  -7.856965e-02    4.741813e-01   8278.92601173

Is it possible to compute $\mathrm{COR}\left(X,Y\right)$ ?

1

There are 1 best solutions below

0
On BEST ANSWER

Yes, it is. We have the variances on the diagonal of the variance-covariance matrix and covariances off the diagonal. So if we calculate the correlation between, for example, $m$ and $df$, we get $$ \operatorname{Cor}(m,df)=\frac{\operatorname{Cov(m,df)}}{\sqrt{\operatorname{Var (m)\cdot\operatorname{Var}(df)}}}=\frac{-7.856965\cdot 10^{-2}}{\sqrt{1.004899\cdot 10^{-4}\cdot8278.92601173}}. $$ I hope this helps.