The idea
Three questions come up whenever two columns are in the same table. Do they move together? Correlation answers that with one number between -1 and +1. By how much? A regression line answers that, with a slope: for each one-unit change in x, the average change in y. How tightly? R-squared answers that: the share of the variation in y that the line accounts for.
Harbor & Pine's monthly marketing spend and monthly revenue are the standard example. Over 36 months, spend and revenue have a correlation of 0.92.
Figure 1
Monthly revenue by marketing spend, 13 of the 36 months, sorted by spend
- Each point is a month: marketing spend in $ thousands along the bottom, completed-order revenue in $ thousands up the side. More spend, more revenue.
- Over all 36 months the correlation is r = 0.92 and R-squared is 0.84: the line explains 84% of the variation in monthly revenue. The fitted slope is $5.50 of revenue for each extra $1 of spend.
- The months with the most spend are all November and December: $70.7k, $62.2k, $59.4k. Those are also the months the store sells most. The calendar pushes both columns up.
- Past $42.8k of spend there are only a handful of months, all in the holiday window. A line fitted here says nothing reliable about $100k of spend in a quiet month.
It looks like a clean case for "spend more, earn more". The rest of this lesson is why you should read it more carefully than that.
Why it exists
Business questions are about decisions: should we raise the budget, cut a price, shift ad money? A decision is a claim about what would happen if we changed something. We have only observational data, the record of what did happen, and correlation is the first and cheapest way to look for a pattern in it.
The danger is that a pattern in what happened is easily taken for the effect of what we might do. Correlation tools are short to write and easy to misread, so the skill is knowing exactly what each number does and does not claim.
How it works under the hood
Correlation is a straight-line measure
Pearson's r measures how close the points lie to a straight line, from -1 (perfect downhill line) through 0 (no linear pattern) to +1 (perfect uphill line). It says nothing about how steep that line is, and it can be near 0 for a strong curved pattern: a product whose sales rise with price and then collapse has a clear relationship that a straight-line measure understates. Always plot the two columns before quoting r.
The regression line: slope, intercept, R-squared
A regression line y = intercept + slope * x is the straight line with the smallest total squared
distance to the points. For spend and revenue the slope is $5.50 and the intercept is -$40,288. R-squared is r
squared: 0.92 squared is 0.84. So 84% of the month-to-month variation in revenue lines up with
spend, and 16% does not.
Read the slope as an average difference between months, not as a lever: months with $10,000 more spend had, on average, $55,000 more revenue. That statement is about the data. "If we add $10,000, we will get $55,000" is a claim about the future, which the line cannot back.
Confounders: when a third variable moves both
A confounder is a variable that influences both of the columns you are comparing. Here it is the calendar. Marketing spends more in November and December to catch holiday shoppers, and customers buy more in November and December anyway. The five biggest-spend months are all November or December. Some of the 0.92 is the holiday season showing up twice.
The cure is to compare like with like: the same season, the same segment, or a model that includes the confounder. Correlation alone cannot tell you how much of the slope is spend and how much is the calendar.
Scanning many pairs at once
A correlation matrix shows every pair of columns in one grid, which is a good way to find pairs worth a closer look. It is not a way to prove anything: with 20 columns there are 190 pairs, and some will look related by chance alone. Treat a bright cell as a question to chase with a plot and a confounder check, not as a finding.
Never follow a line past its data
A fitted line is a summary of the range it was fitted on. The intercept shows how silly it gets outside: at zero spend the line predicts revenue of -$40,288, which is impossible. Predicting at a budget far beyond anything in the data takes the same risk with the opposite sign: you are assuming the relationship stays straight where you never observed it. That is extrapolation.
Simpson's paradox: a comparison that reverses
Sometimes the confounder reverses the answer itself. Customers who came from Pinterest spend $632.14 per order against $535.22 from Google Ads. Inside business customers Google Ads leads, $1,172.29 against $1,027.16, and inside consumers too, $374.40 against $350.71. Both segments favour Google Ads, yet the total favours Pinterest.
Figure 2
Average completed-order value, Google Ads vs Pinterest customers
- Overall, Pinterest customers spend more per order: $632.14 against $535.22, a $96.92 gap in Pinterest's favour.
- Split by segment and the gap flips. Business customers from Google Ads spend $1,172.29 against $1,027.16 from Pinterest.
- Consumers too: $374.40 from Google Ads against $350.71 from Pinterest. Google Ads wins inside both segments.
- The reason is mix. 42% of Pinterest's customers' orders come from business accounts, which spend three times as much, against 20% for Google Ads. The overall gap measures who they bring, not how well each source does.
No arithmetic is wrong. Pinterest simply has a larger share of high-spending business customers, and the overall average blends them in. The fair comparison holds the segment mix fixed.
Common misconceptions
"A correlation of 0.92 means spend causes revenue"
It means they move together. Causation needs a reason to rule out other explanations: an experiment (change spend at random in some regions), a comparison that holds the confounder fixed, or at least a believable mechanism with the timing right. The holiday season alone can give you a 0.92.
"R-squared is the percent chance the line is right"
R-squared is the share of variation in y that the fitted line accounts for. It is not a probability, and not a grade for the model. It can be high for a causally meaningless line, and low for a line that describes a small but real effect.
"If the overall number says A beats B, A beats B everywhere"
Simpson's paradox is the counterexample. An overall comparison blends segments of different sizes, so it can point the opposite way from every segment inside it. Before moving budget, split by the variable that could be different between the groups and compare within each part.
Check yourself
One question. Answering it ticks this lesson off on the map; it never locks a level.
Not quite. A strong correlation shows association. It does not rule out a third variable, here the holiday season, that moves both.Try another answer.
Right. The line is a fair description of past months, and holiday months dominate it. Whether an extra dollar in a quiet month brings $5.50 is a causal question the line cannot answer.
Not quite. R-squared measures how tightly points hug the line. A tighter fit still says nothing about cause, and a confounder can produce an R-squared near 1.Try another answer.
Not quite. The association is real, not a fluke: spend and revenue do move together. The mistake is the causal reading, not the number.Try another answer.
Lesson done: it is ticked on the map.