The statistical correlation of two real random variables
and
with finite positive variances is defined by
|
(1)
|
where
denotes standard deviation and
is the covariance of
these two variables. For the general case of variables
and
with finite positive variances,
where
, 2, ...,
,
|
(2)
|
where
are elements of the covariance matrix. In general,
a correlation gives the strength of the linear relationship between variables. For
,
|
(3)
|
The variance of any quantity is always nonnegative by definition, so
|
(4)
|
From a property of variances, the sum can be expanded
|
(5)
|
|
(6)
|
|
(7)
|
Therefore,
|
(8)
|
Similarly,
|
(9)
|
|
(10)
|
|
(11)
|
|
(12)
|
Therefore,
|
(13)
|
so .
For a real number , the variance of a linear combination of the variables satisfies
|
(14)
| |||
|
(15)
| |||
|
(16)
| |||
|
(17)
|
Examine the cases where ,
|
(18)
|
|
(19)
|
The variance is zero for , so
is constant almost surely.
Thus
almost surely for some constant
. The variables are perfectly correlated when
and perfectly anticorrelated when
.