For non-constant paired data, the Pearson product-moment correlation coefficient \(r\) measures the direction and strength of linear association.
\[r=\frac{\sum (x_i-\bar x)(y_i-\bar y)}{\sqrt{\sum (x_i-\bar x)^2\sum (y_i-\bar y)^2}}\]
\[r=\frac{\sum x_iy_i-\frac{(\sum x_i)(\sum y_i)}{n}}{\sqrt{\left(\sum x_i^2-\frac{(\sum x_i)^2}{n}\right)\left(\sum y_i^2-\frac{(\sum y_i)^2}{n}\right)}}\]
| Feature | Interpretation |
|---|---|
| Direction | \(r>0\) positive; \(r<0\) negative |
| Strength | \(-1\leq r\leq1\); larger \(|r|\) means stronger linear association |
| Units | \(r\) is dimensionless |
| Limitation | Correlation does not establish causation and does not measure general non-linear association. |
Affine transformations
If \(a\ne0\) and \(c\ne0\), then \(r(aX+b,cY+d)=\operatorname{sgn}(ac)\,r(X,Y)\). Thus translations and positive rescalings preserve \(r\); reflecting exactly one variable reverses its sign; \(|r|\) is preserved.
If either transformed variable is constant, its standard deviation is zero and Pearson’s \(r\) is undefined.
Need help? Join our JC Math tuition classes.
Learn more