Two things moving together does not mean one causes the other. Everyone has heard that, and yet decisions built on exactly this mistake are everywhere: a dashboard shows two lines rising together, and a team concludes that pushing one will lift the other.
What correlation measures
A correlation coefficient summarizes how closely two variables move together. The Pearson coefficient ranges from -1 to 1. A value near 1 means they rise together in a roughly straight-line pattern, near -1 means one rises as the other falls, and near 0 means no linear pattern. It describes association only. It says nothing about why the variables are related, and it can miss relationships that are strong but curved.
import pandas as pd
df[["ad_spend", "sales"]].corr() # Pearson
df[["ad_spend", "sales"]].corr(method="spearman") # rank-based
Spearman correlation works on ranks, so it picks up consistent upward or downward trends that are not straight lines, and it is less thrown off by extreme values, which are covered in outlier detection methods.
Why correlation shows up without causation
- A hidden third factor. Ice cream sales and sunburn cases rise together because hot weather drives both. The hidden factor is called a confounder.
- Reverse causation. Stores that run more promotions may have higher sales, but strong sales may also be what let them afford more promotions.
- Coincidence. With enough variables, some pairs will correlate by chance, especially in short time series that both trend upward.
- Selection effects. If you only look at a filtered group, such as customers who stayed, relationships inside it may not hold for everyone.
Simpson’s paradox
Sometimes a trend that appears in every subgroup reverses when the groups are combined, or the other way round. This happens when the groups differ in size or mix, so the overall figure hides a confounder. It is a good reason to look at data broken down by the obvious segments before trusting an overall average.
How to get closer to causation
The most reliable method is a randomized experiment. Randomly assigning who gets a change breaks the link with hidden factors, so differences in outcome can be credited to the change. That is the logic behind A/B testing. When you cannot randomize, you can compare similar groups, use natural experiments such as a policy that applied to some regions and not others, or adjust for known confounders in a model. These approaches rest on assumptions you cannot fully check, so treat their results as weaker evidence and say so.
Machine learning models are not causal
A model that predicts well has learned patterns that hold in its data, not necessarily the levers that change outcomes. A feature with high importance may simply track the real cause. The same caution applies to explanations, as discussed in what SHAP values tell you: they describe how the model uses a feature, not what would happen if you changed it in the real world. Strongly correlated inputs also make coefficients unstable, a problem covered in multicollinearity in regression.
Business reporting examples
Marketing data is full of this trap. Channels that appear to produce the most conversions may simply be the ones people use after they have already decided to buy. Credit models such as last-click and multi-touch attribution make different causal assumptions, as discussed in marketing data pipelines, so the data cannot settle the question on its own.
How to write about it responsibly
- Say “is associated with” or “is linked to” unless you have causal evidence.
- Name the confounders you considered and the ones you could not rule out.
- Report how strong the relationship is, not only whether it exists.
- Recommend an experiment when a decision depends on a causal claim.
A quick checklist
- Did you plot the two variables instead of relying on the coefficient alone?
- Could a third factor drive both?
- Could the effect run in the opposite direction?
- Does the pattern hold within the main subgroups?
- Is a randomized test possible before you act on the finding?
FAQ
What is the difference between correlation and causation?
Correlation means two variables move together. Causation means a change in one produces a change in the other. Correlation can occur without causation, for example when a third factor drives both.
What is a confounding variable?
It is a factor that influences both the thing you think is the cause and the outcome, creating a relationship that is not causal.
How do you prove causation?
The strongest evidence comes from randomized experiments. Without one, you rely on careful design and assumptions, which give weaker evidence.

