Covariance and correlation

From Wikipedia, the free encyclopedia

Main articles: covariance, correlation.

In probability theory and statistics, the mathematical descriptions of covariance and correlation are very similar. Both describe the degree of similarity between two random variables or sets of random variables.

correlation matrix \phi_{XY}(n,m)  =E[ (X_n-E[X_n])(Y_m-E[Y_m])]/(\sigma_X \sigma_Y) \;
covariance matrix \gamma_{XY}(n,m)     =E[ (X_n-E[X_n])\,(Y_m-E[Y_m])]

where σX and σY are the standard deviations of the {Xi} and {Yi} respectively. The correlation and covariance of a variable with itself (i.e. Y = X) is called the autocorrelation and autocovariance, respectively.

In the case of stationarity, the means are constant and the covariance or correlation are functions only of the difference in the indices:

cross correlation \phi_{XY}(m) =E[ (X_n-E[X_n])\,(Y_{n+m}-E[Y_{n+m}])]/(\sigma_{X_n}\sigma_{Y_{n+m}})
cross covariance \gamma_{XY}(m)=E[ (X_n-E[X])\,(Y_{n+m}-E[Y])]