The Engineering Desk
Engineering, without the noise.

DesignSimulations and MathematicsLibrary

Correlation coefficient

Pearson's r measures how closely two variables follow a straight line, and nothing more.

Barthermometer Fahrenheit+Celsius
Photo: “Barthermometer Fahrenheit+Celsius” by MetaNest, CC BY-SA 3.0, via Wikimedia Commons

The Pearson correlation coefficient measures how tightly paired data follow a straight line.

Reading r

  • or : points on a perfect line.
  • Near 0: no straight-line relationship. A strong curved relationship can still give near 0.
  • is the share of variation in one variable explained by a straight line on the other. An of 0.7 explains only 49%.

Common mistakes

  • Correlation is not cause. Ice cream sales and drownings correlate because both rise in summer.
  • One point can make or break it. Always look at the Scatter plot.
  • Range restriction. Over a narrow range of the input, a real relationship can look weak.
  • Statistical significance is not strength. With 1,000 points, is significant but explains 1% of variation.

Spearman's rank correlation

Spearman's is Pearson's computed on ranks. It measures any steadily increasing or decreasing relationship and resists outliers.

See also

References

  1. Montgomery, D. C., and Runger, G. C. Applied Statistics and Probability for Engineers. Wiley.

More in Simulations and Mathematics