Pearson correlation coefficient¶
The Pearson correlation coefficient measures
the strength of a linear relationship between two random variables
and
with finite variance. It is defined as follows:
where
.
Let be a sample generated
by the bivariate random vector
. The Pearson correlation coefficient is estimated:
(1)¶
where and
are the empirical
mean of each sample.
The estimate of the Pearson correlation
coefficient is sometimes denoted by
.
We sum up some interesting features of the coefficient:
The Pearson’s correlation coefficient takes values between -1 and 1.
If
then there exists a linear relationship between
and
.
The closer
is to 1, the stronger the indication is that a linear relationship exists between
and
. The sign of the Pearson’s coefficient indicates if the two variables increase or decrease in the same direction (positive coefficient) or in opposite directions (negative coefficient).
If
and
are independent, then
.
If
, it does not imply the independence of the variables
and
. It may only means that the relation between both variables is not linear.
(Source code, svg)
(Source code, svg)
(Source code, svg)
(Source code, svg)
OpenTURNS