All courses › Statistics and Risk Analysis › Correlation coefficient

Correlation coefficient

The correlation coefficient r measures how closely the points follow a straight line. It lies between −1 and 1. Values near 1 or −1 mean a strong linear relationship, and values near 0 mean a weak or no linear relationship.

r=∑(xi−xˉ)(yi−yˉ)∑(xi−xˉ)2∑(yi−yˉ)2r = \frac{\sum (x_i - \bar x)(y_i - \bar y)}{\sqrt{\sum (x_i - \bar x)^2\sum (y_i - \bar y)^2}}Pearson's r

Symbols

rrcorrelation coefficient
xˉ, yˉ\bar x,\ \bar ymeans

Example

r=0.95r = 0.95 between temperature and power used for cooling: a strong positive relationship.

r=−0.9r = -0.9 would be just as strong, but in the opposite direction.

Correlation is not causation. Both quantities may be driven by something else.
Practise regression and correlation for free →

← Least squares · Coefficient of determination →

Part of Statistics and Risk Analysis: Regression and correlation.