Wolfram Researchmathworld.wolfram.comOther Wolfram Sites
Search Site

INDEX
Algebra
Applied Mathematics
Calculus and Analysis
Discrete Mathematics
Foundations of Mathematics
Geometry
History and Terminology
Number Theory
Probability and Statistics
Recreational Mathematics
Topology
Alphabetical Index

DESTINATIONS
About MathWorld
About the Author
New in MathWorld
MathWorld Classroom
Interactive Entries
Random Entry

CONTACT
Contribute an Entry
Send a Message to the Team

MATHWORLD - IN PRINT
Order book from Amazon

Covariance
COMMENT On this Page EXPLORE THIS TOPIC IN the MathWorld Classroom

Given n sets of variates denoted {X_1}, ..., {X_n}, the covariance sigma_(ij)=cov(x_i,x_j) of x_i and x_j is defined by

cov(x_i,x_j)=<(x_i-mu_i)(x_j-mu_j)>(1)
=<x_ix_j>-<x_i><x_j>,(2)

where mu_i==<x_i> and mu_j==<x_j> are the means of x_i and x_j, respectively. The matrix (V_(ij)) of the quantities V_(ij)==cov(x_i,x_j) is called the covariance matrix. In the special case i==j,

cov(x_i,x_i)==<x_i^2>-<x_i>^2==sigma_i^2,(3)

giving the usual variance sigma_(ii)==sigma_i^2==var(x_i).

Note that statistically independent variables are always uncorrelated, but the converse is not necessarily true.

The covariance of two variates X_i and X_j provides a measure of how strongly correlated these variables are, and the derived quantity

cor(x_i,x_j)=(cov(x_i,x_j))/(sigma_isigma_j),(4)

where sigma_i, sigma_j are the standard deviations, is called statistical correlation of x_i and x_j. The covariance is symmetric since

cov(x,y)==cov(y,x).(5)

For two variables, the covariance is related to the variance by

var(x+y)==var(x)+var(y)+2cov(x,y).(6)

For two independent variates X==X_i and Y==X_j,

cov(x,y)==<xy>-mu_xmu_y==<x><y>-mu_xmu_y==0,(7)

so the covariance is zero. However, if the variables are correlated in some way, then their covariance will be nonzero. In fact, if cov(x,y)>0, then y tends to increase as x increases. If cov(x,y)<0, then y tends to decrease as x increases.

The covariance obeys the identity

cov(x+z,y)=<(x+z)y>-<x+z><y>(8)
=<xy>+<zy>-(<x>+<z>)<y>(9)
=<xy>-<x><y>+<zy>-<z><y>(10)
=cov(x,y)+cov(z,y).(11)

By induction, it therefore follows that

cov(sum_(i==1)^(n)x_i,y)=sum_(i==1)^(n)cov(x_i,y)(12)
cov(sum_(i==1)^(n)x_i,sum_(j==1)^(m)y_j)=sum_(i==1)^(n)cov(x_i,sum_(j==1)^(m)y_j)(13)
=sum_(i==1)^(n)cov(sum_(j==1)^(m)y_j,x_i)(14)
=sum_(i==1)^(n)sum_(j==1)^(m)cov(y_j,x_i)(15)
=sum_(i==1)^(n)sum_(j==1)^(m)cov(x_i,y_j).(16)

SEE ALSO: Bivariate Normal Distribution, Covariance Matrix, Statistical Correlation, Variance. [Pages Linking Here]



CITE THIS AS:

Eric W. Weisstein. "Covariance." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Covariance.html



Use Mathematica for your multivariate statistical analysis.