Correlation vs Causation: Why Correlation Does Not Imply Causation
Correlation vs causation is the difference between two variables that move together and one variable that changes the other when you change it. A correlation can come from a lurking third variable, from causation running the other way, from chance or from the way the sample was selected. A randomized experiment rules out confounding and reverse causation by design and lets a p-value measure chance; an observational study has to argue against each explanation.
Last updated · by the simstat.com editorial team · How we write
Two different claims
A correlation says that two variables vary together: when x is high, y tends to be high (a positive correlation) or low (a negative one). Pearson’s r measures how closely the points follow a straight line, from −1 to 1. Causation is a stronger claim: if you changed x and left everything else alone, y would change too.
The two are easy to confuse because causation usually produces an association. The NIST/SEMATECH e-Handbook puts the asymmetry plainly: “even though causality implies association association does NOT imply causality”. A correlation describes the data you have; it says nothing about what would happen if you intervened. OpenStax makes the same point about r: “Strong correlation does not suggest that x causes y or y causes x” (Illowsky and Dean, 2023, Section 12.3). In OpenStax’s terms, a variable that causes change in another is the explanatory variable, and the affected one is the response variable (Section 1.4).
Why correlation does not imply causation
When x and y are correlated, there are four common explanations besides “x causes y”. Each one can produce a strong, statistically significant r.
Confounding: the third variable problem
A third variable may drive both x and y. OpenStax’s example is a survey that finds people who regularly take vitamin E are healthier on average. That does not show vitamin E prevents disease, because “People who take vitamin E regularly often take other steps to improve their health: exercise, diet, other vitamin supplements, choosing not to smoke.” Such a variable is a lurking variable: “Additional variables that can cloud a study are called lurking variables” (Illowsky and Dean, 2023, Section 1.4). Epidemiologists call it a confounder.
Reverse causation
A correlation is symmetric: the r between x and y is the r between y and x, so the number cannot tell you which way an effect runs. Perhaps y causes x. The defence is timing. Of the nine viewpoints Hill published in 1965 for judging whether an association is causal, Fedak et al. (2015) describe temporality as perhaps the only one that epidemiologists “universally agree is essential”: for an exposure to cause a disease, the exposure must come before the disease. Data collected at a single point in time cannot show which came first.
Coincidence
Two unrelated variables can be correlated in a sample by chance alone, especially when the sample is small or when you search many pairs and report the strongest. A p-value below 0.05 does not protect you here: when there is no relationship at all, about 5% of tests still give p below 0.05.
Selection effects
How units get into a sample can create a correlation that does not exist in the population. Griffith et al. (2020) describe this as collider bias, also called selection bias or Berkson’s paradox: a collider is a variable influenced by two others, for example when “a risk factor and an outcome both affect the likelihood of being sampled”. Restricting the analysis to the sampled units “can distort the association between the two variables influencing the collider”.
A small labelled simulation shows the mechanism. We drew 1,000 imaginary applicants with two independent scores, a test score and an interview score, and admitted the 20% with the highest total. Across all applicants the scores are uncorrelated: r = −0.01, 95% CI [−0.07, 0.06]. Among the 200 admitted, r = −0.65, 95% CI [−0.73, −0.57]. Nothing links the two scores; admission does. An admitted applicant with a weak test score must have had a strong interview to get in, so within the admitted group the two scores trade off. Griffith et al. (2020) conclude that “the optimal way to mitigate the problem is to use appropriate sampling strategies at the study design stage”.
Two formulas behind the examples
The test of a correlation compares the statistic t with a t distribution on n − 2 degrees of freedom (Illowsky and Dean, 2023, Section 12.4):
For n = 10 pairs the critical value is 0.632, as in OpenStax’s example for 8 degrees of freedom: any |r| above it gives a two-sided p below 0.05. With so few pairs, a correlation that looks strong is easy to get by chance.
The second formula shows how a lurking variable can reverse a comparison. A group’s overall rate is a weighted average of its rates within strata (departments, age bands, hospitals):
Here pₖ is the group’s rate in stratum k and wₖ is the share of the group in stratum k. Two groups with the same pₖ can have very different overall rates if their weights differ.
A worked example: correlation from pure chance
This is a simulation, not real data. We generated 1,000 pairs of unrelated series, each with 10 whole-number scores drawn independently from a normal distribution with mean 50 and standard deviation 10, using the site’s seeded random number generator with seed 2026. Then we computed Pearson’s r and its p-value for every pair.
How many look significant? With no relationship in any pair, about 50 of 1,000 tests should give p below 0.05 by chance. The simulation gave 44 (4.4%).
How strong can they look? 21 pairs had |r| of at least 0.7, above the critical value of 0.632.
The strongest pair (pair 376), as x, y pairs, was 32, 54 / 74, 38 / 51, 48 / 50, 47 / 60, 42 / 45, 52 / 50, 51 / 61, 38 / 70, 41 / 53, 50. For these ten pairs the calculator gives r = −0.898, 95% CI [−0.976, −0.619], r² = 0.807, t = −5.789 (df 8), p < 0.001.
Taken alone, pair 376 looks like convincing evidence of a relationship. It is the best of 1,000 tries. Paste the ten pairs into the calculator (one “x, y” pair per line, default 95% level) to see the same r, interval and p-value, and read how it explains the scatter plot.
Correlation vs causation examples from real studies
Two well-documented examples show why correlation does not imply causation: admissions data in which a lurking variable hides behind the totals, and an observational finding that a randomized trial later contradicted.
Berkeley graduate admissions, 1973
R’s documentation of its UCBAdmissions data set describes applications to the six largest graduate departments at UC Berkeley in 1973 (R Core Team, 2024). Overall, 44.5% of the 2,691 men and 30.4% of the 1,835 women were admitted: sex and admission are correlated. Split by department, with the number of applicants and the share admitted:
| Department | Men | Admitted | Women | Admitted |
|---|---|---|---|---|
| A | 825 | 62% | 108 | 82% |
| B | 560 | 63% | 25 | 68% |
| C | 325 | 37% | 593 | 34% |
| D | 417 | 33% | 375 | 35% |
| E | 191 | 28% | 393 | 24% |
| F | 373 | 6% | 341 | 7% |
Women were admitted at a higher rate than men in 4 of the six departments (A, B, D and F). The lurking variable is the department. Departments A and B admitted most of their applicants, and 51% of the men applied to them but only 7% of the women. In the weighted-average formula, the wₖ for women sit mostly on departments with low pₖ. In the words of R’s documentation, the apparent association “stems from differences in the tendency of males and females to apply to the individual departments”. Bickel, Hammel and O’Connell (1975), who analysed admissions across Berkeley’s graduate departments, found that the aggregate data show “a clear but misleading pattern of bias against female applicants”, while in the department-by-department data “about as many units appear to favor women as to favor men”.
The effect size guide computes the matching odds ratios: 1.84 for men versus women overall, and a Mantel–Haenszel odds ratio of 0.90 within departments, an example of Simpson’s paradox.
Hormone therapy and heart disease
Observational studies found that women taking postmenopausal hormone therapy had fewer coronary events. In the Nurses’ Health Study, current users of any postmenopausal hormone therapy had a relative risk of major coronary events of 0.61 (95% CI 0.52 to 0.71) compared with never-users, after adjustment for confounders (Grodstein et al., 2000).
The Women’s Health Initiative randomized 16,608 postmenopausal women to one regimen, estrogen plus progestin, or a placebo. The trial was stopped early because invasive breast cancer crossed its stopping boundary and overall risks exceeded benefits. The hazard ratio for coronary heart disease was 1.29 (nominal 95% CI 1.02 to 1.63; 0.85 to 1.97 after adjusting for repeated analyses), and the authors concluded that this regimen “should not be initiated or continued for primary prevention” of coronary heart disease (Rossouw et al., 2002). Prentice et al. (2005) compared the trial with the initiative’s own observational cohort and found that, after control for time since starting therapy and for confounding, the hazard ratios “were rather similar for the two cohorts” (some difference remained for stroke). They note that observational estimates “are heavily weighted by longer-term use while clinical trial hazard ratio estimates reflect shorter-term use”. Both confounding and the different time since starting therapy explain the gap. Comparing women who chose hormone therapy with women who did not was a different comparison from randomly assigning it, and only the second one measures what starting therapy does.
How experiments establish causation
An experiment assigns the explanatory variable instead of observing it. The key step, in OpenStax’s words, is “the random assignment of experimental units to treatment groups. When subjects are assigned treatments randomly, all of the potential lurking variables are spread equally among the groups.” That covers the lurking variables nobody has thought of as well as the measured ones. With random assignment, “the only difference between groups is the one imposed by the researcher”, which is why “an experiment can prove a cause-and-effect connection between the explanatory and response variables” (Illowsky and Dean, 2023, Section 1.4). A placebo group, as in the Women’s Health Initiative trial, is there “to counter the power of suggestion”.
Random assignment deals with confounding and reverse causation at once: the researcher sets x before y is measured. Chance remains, which is what the confidence interval and p-value describe.
What observational studies can do
Many questions cannot be settled by an experiment, so observational studies try to rule out the other explanations one by one:
- Adjust or stratify for lurking variables, as the within-department comparison does for Berkeley. Adjustment can only use the variables that were measured; random assignment also balances the rest on average.
- Check timing, so that the supposed cause comes before the effect.
- Count the comparisons. As the simulation shows, the strongest of many correlations is not evidence on its own; say how many you examined.
- Think about who is in the sample and whether getting into it depends on both variables.
Hill’s nine viewpoints, often called the Bradford Hill criteria, are the most frequently cited framework for causal inference in epidemiology: strength of association, consistency, specificity, temporality, biological gradient, plausibility, coherence, experiment and analogy (as listed by Fedak et al., 2015). Fedak et al. stress that they “were never intended to be viewed as rigid criteria or as a checklist for causation”. The NIST/SEMATECH e-Handbook ends in the same place: it is “only the researcher (relying on the underlying science/engineering) who can conclude that causality actually exists”.
How to report a correlational finding
Report the association with its interval, and describe it with words that do not imply an effect: “was associated with”, “was correlated with”, “was higher among”, rather than “led to”, “increased” or “improved”. Following the reporting format on the calculator page, the simulated pair would be reported as:
Scores on x and y were negatively correlated, r(8) = −0.90, 95% CI [−0.98, −0.62], p < 0.001 (the strongest of 1,000 correlations examined). Because x was observed rather than assigned at random, this association does not show that x affects y.
Include the sample size, how the sample was selected, which variables were adjusted for, and how many associations you examined.
Common mistakes
Writing causal verbs for observational data. People who take vitamin E are healthier on average describes a correlation; “vitamin E prevents disease” is a causal claim that OpenStax’s survey cannot support (Illowsky and Dean, 2023, Section 1.4).
Treating a small p-value as proof of causation. The p-value addresses chance only. The Berkeley association between sex and admission is far too large to be chance, and it is still explained by a lurking variable.
Searching many correlations and reporting the best. In the simulation, 21 of 1,000 unrelated pairs reached |r| ≥ 0.7.
Comparing only the people who made it into the sample. Selection on an outcome, or on something both variables affect, can create a correlation from nothing, as the simulated admitted applicants showed.
Concluding there is no effect because the correlation is weak. A lurking variable can reverse a comparison: in Berkeley’s department A, 82% of women and 62% of men were admitted, the opposite of the overall pattern. What can reverse an association can also hide one. And r measures only straight-line association: “data that exhibit a curved or horizontal pattern may have a correlation of 0” (Illowsky and Dean, 2023, Section 12.3).
Where to go next
To compute r itself, read how to calculate the correlation coefficient; the statistics hub lists more. To measure how large a difference is, see the effect size guide and our effect size calculator. For a test built on the logic of random assignment, read the permutation test guide and try the permutation test tool.
References
- Illowsky, B. & Dean, S. (2023). Introductory Statistics 2e, Section 1.4: Experimental Design and Ethics. OpenStax, Rice University.
- Illowsky, B. & Dean, S. (2023). Introductory Statistics 2e, Section 12.3: The Regression Equation. OpenStax, Rice University.
- Illowsky, B. & Dean, S. (2023). Introductory Statistics 2e, Section 12.4: Testing the Significance of the Correlation Coefficient. OpenStax, Rice University.
- NIST/SEMATECH (2012). e-Handbook of Statistical Methods, Section 1.3.3.26: Scatter Plot. National Institute of Standards and Technology.
- Bickel, P. J., Hammel, E. A. & O'Connell, J. W. (1975). Sex Bias in Graduate Admissions: Data from Berkeley. Science, 187(4175), 398–404.
- R Core Team (2024). UCBAdmissions: Student Admissions at UC Berkeley (datasets package documentation). R Foundation for Statistical Computing.
- Grodstein, F., Manson, J. E., Colditz, G. A., Willett, W. C., Speizer, F. E. & Stampfer, M. J. (2000). A prospective, observational study of postmenopausal hormone therapy and primary prevention of cardiovascular disease. Annals of Internal Medicine, 133(12), 933–941.
- Rossouw, J. E., Anderson, G. L., Prentice, R. L. et al. (Writing Group for the Women's Health Initiative Investigators) (2002). Risks and benefits of estrogen plus progestin in healthy postmenopausal women: principal results from the Women's Health Initiative randomized controlled trial. JAMA, 288(3), 321–333.
- Prentice, R. L., Langer, R., Stefanick, M. L. et al. (2005). Combined postmenopausal hormone therapy and cardiovascular disease: toward resolving the discrepancy between observational studies and the Women's Health Initiative clinical trial. American Journal of Epidemiology, 162(5), 404–414.
- Fedak, K. M., Bernal, A., Capshaw, Z. A. & Gross, S. (2015). Applying the Bradford Hill criteria in the 21st century: how data integration has changed causal inference in molecular epidemiology. Emerging Themes in Epidemiology, 12, 14.
- Griffith, G. J., Morris, T. T., Tudball, M. J. et al. (2020). Collider bias undermines our understanding of COVID-19 disease risk and severity. Nature Communications, 11, 5749.
Try it
- Correlation coefficient calculator: Pearson and Spearman: Pearson's r with a Fisher z interval and t test, Spearman's ρ, r², the least-squares line and a scatter plot that flags outliers.
- Effect size calculator: Cohen's d, Hedges' g: Cohen's d, Hedges' g and Glass's Δ with noncentral t intervals, d to r conversion, and partial η² from F.
Related reading
- How to Calculate the Correlation Coefficient (Pearson's r)
- Effect Size: Definition, Cohen's d and How to Interpret It
- How to Find Class Boundaries, Class Limits and Midpoints
- How to Find Class Width: Formula, Rounding and Decimals
- How to Find IQR (Interquartile Range): Formula and Examples
- More on statistics