In the last posts we chose metrics and defined them carefully. Even with a clean metric, a comparison can still point to the wrong conclusion. On a report with thousands of customers, two numbers that rise together tempt us to say that one causes the other. Below we look at two cases. In the first, two numbers move together for a hidden reason. In the second, the better campaign looks worse once the groups are combined.
Correlation: two numbers that move together
Take six weeks of data. Weekly orders were 100, 120, 150, 180, 210 and 240, and weekly support tickets were 20, 25, 31, 36, 44 and 49. To measure how closely they move together, we use the correlation coefficient, which runs from -1 to 1.
import statistics
orders = [100, 120, 150, 180, 210, 240]
tickets = [20, 25, 31, 36, 44, 49]
print(round(statistics.correlation(orders, tickets), 3))
# 0.998A value of 0.998 is very close to 1, so the two series rise almost in step. That does not mean tickets bring orders. A promotion week brings more visitors, and more visitors create both more orders and more tickets. The promotion is the third factor, and the correlation alone cannot show it.
Causation needs a fair comparison
To claim that A causes B, we need two groups that are alike in everything except A. The cleanest way is an experiment where a coin flip decides who gets A. When an experiment is not possible, we compare groups that are as similar as we can make them, and we say plainly that the result is weaker evidence.
Simpson's paradox: the better campaign looks worse
Two email campaigns went to 500 customers each. Some customers were new and some were returning. The table sends holds how many emails went out and how many customers bought, per campaign and per segment. First, we compare the campaigns inside each segment.
SELECT campaign
, segment
, sent
, bought
, ROUND(bought * 100.0 / sent, 1) AS rate_pct
FROM sends
ORDER BY segment, campaign;| Segment | Campaign A | Campaign B |
|---|---|---|
| New customers | 48 of 400 = 12.0% | 10 of 100 = 10.0% |
| Returning customers | 45 of 100 = 45.0% | 160 of 400 = 40.0% |
Campaign A wins in both segments, 12% against 10% and 45% against 40%. Now we combine the segments.
-- WRONG: compares campaigns with different audiences
SELECT campaign
, SUM(sent) AS sent
, SUM(bought) AS bought
, ROUND(SUM(bought) * 100.0 / SUM(sent), 1) AS rate_pct
FROM sends
GROUP BY campaign;| Campaign | Sent | Bought | Rate |
|---|---|---|---|
| A | 500 | 93 | 18.6% |
| B | 500 | 170 | 34.0% |
Now B looks almost twice as good, 34.0% against 18.6%. The reason is the audience. Campaign A went 80% to new customers, who buy less often. Campaign B went 80% to returning customers, who buy more often. The combined rate compares the audiences, not the campaigns.
In most cases, the segment-level comparison is the fair one, because the segment sets how likely a customer is to buy. The table cannot tell us this. We have to know the business and decide which split matters before we read the result.
Three checks before you claim that something works
- Ask what else could move both numbers, and write it down.
- Split the comparison by the groups that change the outcome, such as new and returning customers.
- Compare the group sizes. If they differ a lot between the two sides, the combined rate is not a fair comparison.


