Linear correlation coefficient

Correlation, also known as the linear correlation coefficient (Pearson’s), is a regression measure that aims to quantify the degree of joint variation between two variables.

Linear correlation coefficient

Therefore, it is a statistical measure that quantifies the linear dependence between two variables, that is, if the values ​​taken by two variables are represented in a scatter diagram, the linear correlation coefficient will indicate how good or bad the set of points represented approaches a line.

In a less colloquial way, we can define it as the number that measures the degree of intensity and the sense of the relationship between two variables.

correlation formula


Cov (x; y): the covariance between the value "x" and "y".

σ (x): standard deviation of «x».

σ (y): standard deviation of «y».

Values ​​that the correlation can take

ρ = -1 Negative perfect correlation

ρ = 0 There is no correlation

ρ = +1 positive perfect correlation

We speak of positive correlation if whenever the value "x" rises, the value "y" rises, and also with the same intensity (+1).

In the opposite case, if whenever the value "x" rises, and the value "y" falls, and also with the same intensity, then we are talking about negative correlation (-1).

It is important to know that this does not mean that they do it in the same proportion (unless they have the same standard deviation).

Graphical representation of the correlation

Positive perfect correlation:

positive perfect correlation

There is no correlation:

there is no correlation

Negative perfect correlation:

negative perfect correlation

Tip: on many occasions, we do not have the means or the data to use this formula. Therefore, if we have two price series, we can calculate the correlation coefficient in excel, using the following function: coef.correl (price series x; price series y).