Pearson correlation standardises covariance to measure the linear association between two variables on a fixed scale.
It divides the covariance of two variables by the product of their individual standard deviations.
This division cancels out the measurement units, producing a dimensionless coefficient denoted by the letter r.
The correlation coefficient is bounded strictly between negative one and positive one.
A correlation of positive one indicates a perfect positive linear relationship, where points form a straight rising line.
A correlation of negative one indicates a perfect negative linear relationship, where points form a straight falling line.
A correlation of zero indicates that no linear relationship exists between the two examined variables.
For example, height and weight in adults typically show a moderate positive correlation around 0.7.
Correlation is invariant to changes in location and scale, meaning unit conversions do not alter the coefficient.
Measuring distance in kilometres or miles yields the exact same correlation with travel duration.
However, Pearson correlation evaluates only linear relationships and fails to detect strong non-linear dependencies.
For instance, data points arranged in a perfect parabola can produce a Pearson correlation of exactly zero.
Pearson correlation is also sensitive to outliers, which can inflate or deflate the coefficient substantially.
A fundamental rule of data science is that correlation does not imply causation between the observed variables.
Two variables may correlate strongly because of a shared confounding factor or pure statistical coincidence.