Finding correlation coefficient from covariance matrix

1.7k Views Asked by At

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

For example, given a problem like:

Suppose that $x = \begin{bmatrix} x_1 \\ x_2 \end{bmatrix}$ is a vector with a mean of $0$ and covariance $P = \begin{bmatrix}4.5 & -1 \\ -1 & 2 \end{bmatrix}$. What is the correlation coefficient of $x_1$ and $x_2$?

I know that to find the correlation coefficient of $x_1$ and $x_2$, it is: $$P_{x_1 x_2} = \frac{cov(x_1, x_2)}{\sigma_1 \sigma_2}$$

Furthermore, I believe the $\sigma$ can be derived from the diagonals of the covariance matrix, but I'm not sure how to find $cov(x_1, x_2)$. How can one derive a single covariance from the matrix?

Thanks for your help in advanced!

1

There are 1 best solutions below

2
On BEST ANSWER

There's no derivation needed. All you have is to read the covariances appropriately from their corresponding position in the covariance matrix. The covariance matrix is read as follows \begin{equation} P = \begin{bmatrix} var(X_1) & cov(X_1,X_2) \\\\ cov(X_1,X_2) & var(X_2) \\ \end{bmatrix} \end{equation} where $\sigma_1^2 = var(X_1)$ and $\sigma_2^2 = var(X_2)$. So, yes, as you say, the $\sigma^2_k$'s are at the diagonals and the covariances are at the off-diagonals. Therefore \begin{equation} P_{x_1x_2} = \frac{cov(x_1, x_2)}{\sigma_1 \sigma_2}= \frac{-1}{\sqrt{4.5}\sqrt{2}} \end{equation}