Correlation

Correlation is a statistical measure of how closely two variables move together, usually meaning how near their relationship is to a straight line; on its own it does not show that one causes the other.

Correlation describes how two quantities vary together. The most common measure, the Pearson correlation coefficient, runs from -1 to +1. A value of +1 means a perfect straight-line relationship in which both rise together, -1 means one falls exactly as the other rises, and a value near 0 means little linear relationship. Karl Pearson developed the coefficient from an earlier idea of Francis Galton's.

Pearson's measure only sees straight lines. Two variables can be tightly related in a curve and still score close to zero. Spearman's rank correlation asks a looser question, whether one tends to rise when the other does, and can pick up relationships that are consistent but not linear.

A single number can hide a lot. In 1973 the statistician Francis Anscombe published four small datasets, now called Anscombe's quartet, that share the same means, variances, correlation of 0.816 and line of best fit, yet look completely different when plotted: one is a curve, and others are driven by a single outlier. The lesson is to look at the data, not just the coefficient.

The most important rule is that correlation does not imply causation. Ice cream sales and drownings rise together, not because one causes the other but because hot weather drives both; the weather is a confounding variable. Some correlations are pure coincidence. Correlation can suggest that a causal link is worth investigating, but it cannot say what that link is.

This matters for AI in two ways. Most machine learning models are built to find statistical associations in data, so they can latch on to a feature that merely travels with the outcome rather than causing it. And much reporting about AI rests on observational studies whose correlations need careful checking for other explanations before they say anything about cause.

Common questions

What does a correlation of 0.8 mean?

A Pearson correlation of 0.8 means two variables have a strong positive linear relationship: when one is above its average, the other usually is too. It does not mean one causes the other, and it does not say how much one changes when the other does.

What is the difference between correlation and causation?

Correlation means two things vary together. Causation means one actually brings about the other. Two variables can be correlated because a third factor drives both, because of chance, or because the causal arrow points the other way, so showing causation needs experiments or careful causal analysis.

What is the difference between Pearson and Spearman correlation?

Pearson's coefficient measures how close a relationship is to a straight line. Spearman's works on the ranks of the values and measures whether one variable tends to increase as the other does, whether or not the relationship is linear. Spearman's is also less affected by extreme values.

What is a spurious correlation?

A spurious correlation is one that does not reflect a direct link between the two variables. It may be caused by a hidden third factor, such as hot weather raising both ice cream sales and drownings, or it may be coincidence that disappears with more data.

Finding more

Search for "Pearson vs Spearman correlation", "Anscombe's quartet" or "correlation vs causation confounding" to build intuition. Reliable sources include university statistics courses, statistics textbooks and encyclopedia articles that cite the original work. When a news story reports that something is linked to something else, check whether the study was an experiment or an observational correlation, and what other factors it controlled for.

  • CorrelationReferencePearson and Spearman measures, Anscombe's quartet and why correlation does not establish causation.
  • Spurious relationshipReferenceClassic examples of misleading correlations and the role of confounding variables.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.