6.6 Correlation Coefficient Matrix

In the video we will demonstrate the use of the correlation coefficient matrix and the concept of correlation coefficient. A brief overview of the theory is given below.

Play media comment.

Recall that the covariance between two random variables is defined as: 

LaTeX: Cov(X,Y) = E[(X - E(X))(Y - E(Y))]Cov(X,Y)=E[(XE(X))(YE(Y))]

and that the variance of a random variable is defined as: 

LaTeX: Var(X) = E[ (X - E(X))^2]Var(X)=E[(XE(X))2].

Further, the standard deviation is the square root of the variance: LaTeX: D(X) = \sqrt{Var(X)}D(X)=Var(X)

It follows immediately from the definitions that: 

LaTeX: Var(X) = Cov(X,X)Var(X)=Cov(X,X),

meaning that the variance of LaTeX: XX is the covariance of LaTeX: XX with itself. 


The correlation coefficient, LaTeX: \rho_{X,Y}ρX,Y , between two random variables, LaTeX: XX and LaTeX: YY, is defined as: 

LaTeX: \rho_{X,Y} = \frac{Cov(X,Y)}{D(X)D(Y)}ρX,Y=Cov(X,Y)D(X)D(Y).

Obviously LaTeX: \rho_{X,Y} = \rho_{Y,X}ρX,Y=ρY,X , due to symmetry, and from the definitions above it also follows that: 

LaTeX: \rho_{X,X} = \frac{Cov(X,X)}{D(X)D(X)}  = \frac{Var(X)}{Var(X)}  = 1ρX,X=Cov(X,X)D(X)D(X)=Var(X)Var(X)=1,

In other words, the correlation coefficient between a random variable with itself is 1. 


In the video we also use the correlation coefficient matrix. For example, if we have three random variables, LaTeX: X, Y X,Yand LaTeX: ZZ then the correlation coefficient matrix, denoted by LaTeX: Corr.matrix(X,Y,Z) Corr.matrix(X,Y,Z)is defined as: 

LaTeX: Corr.matrix(X,Y,Z) = 
Corr.matrix(X,Y,Z)= LaTeX: \begin{bmatrix}
\rho_{X,X} & \color{blue} \rho_{X,Y} & \color{green} \rho_{X,Z}\\
 \color{blue}  \rho_{Y,X} & \rho_{Y,Y} & \color{red} \rho_{Y,Z} \\ 
\color{green} \rho_{Z,X} & \color{red} \rho_{Z,Y} & \ \rho_{Z,Z}
\end{bmatrix}
= 
\begin{bmatrix}
1 & \color{blue} \rho_{X,Y} & \color{green} \rho_{X,Z}\\
 \color{blue}  \rho_{Y,X} & 1& \color{red} \rho_{Y,Z} \\ 
\color{green} \rho_{Z,X} & \color{red} \rho_{Z,Y} & \ 1
\end{bmatrix}[ρX,XρX,YρX,ZρY,XρY,YρY,ZρZ,XρZ,Y ρZ,Z]=[1ρX,YρX,ZρY,X1ρY,ZρZ,XρZ,Y 1]

Notice that the diagonal elements are all 1, and that the matrix is symmetric since the correlation coefficients are symmetric.