Correlation is not cause: why AI struggles with causal questions

TL;DR

Difficulty: Intermediate

AI answers "what goes together" quickly and well. "What happens if I act" and "why did it happen" need something the data does not hold: an experiment, or assumptions someone owns.

  • Language models know a lot about which causes are plausible in general, but struggle where memorised knowledge cannot help (GPT 4 scored 62% on the CLadder benchmark in late 2023, where guessing gives 50%).
  • Confounding, selection bias, reverse causation and Simpson's paradox all produce confident, precise and wrong answers.
  • Use AI to list confounders, draft causal diagrams and write and test the code. Keep the assumptions with people. Prefer a holdout whenever you can randomise.

Ask an AI assistant whether your newsletter makes customers spend more and you will get a chart, a regression and a confident yes within a minute. The first half of that answer is a fact about your data, the second half a claim about cause that the data cannot support on its own. This chapter explains the gap, tests what the research says about AI and causal reasoning, and shows a way of working that uses AI where it is strong.

Can AI tell you why your sales went up?

Niamh owns Shannonside Home, an invented online homeware shop in Limerick (shannonsidehome.example) that runs through this whole series. She asks her AI chat assistant a simple looking question: "Do customers who subscribe to the newsletter spend more because of the newsletter?" Within a minute she has a chart, a regression table and a confident paragraph. Subscribers spend about €41 more in their first year. The newsletter, the assistant says, "drives significant incremental value".

The first half of that answer is a fact about her data. The second half is a claim about cause and effect, and nothing in the data she uploaded can support it on its own. This chapter is about the gap between those two halves: between what moves together and what makes something happen. It is the oldest trap in statistics, and AI has not removed it. In some ways it has made the trap easier to fall into, because the wrong answer now arrives fluently, with a chart.

Here is what you will get from this chapter:

  • The ladder of causation, Judea Pearl's way of sorting questions into three kinds, with the shop's own questions on each rung.
  • The evidence both ways: the studies that find large language models (LLMs, the systems behind AI chat assistants) surprisingly good at causal questions, and the studies that find they are mostly repeating causal facts they read.
  • Four classic traps, each worked through on the shop: confounding, selection bias, reverse causation and Simpson's paradox.
  • A small Python simulation where a hidden driver fools a regression, and the adjusted model that gets it right.
  • What AI does well here (listing confounders, drafting a causal diagram, writing the code for a holdout or a difference in differences) and the one thing it cannot do: decide which assumptions hold in your business.

If you have not read it, the great AI debate between sceptics, scalers and pragmatists sets out the wider argument this chapter tests on one specific question.

Example: the five "why" questions in the golden set

In this series Callum, Shannonside's developer and data engineer, built a golden set: 50 business questions with answers he computed by hand and reconciled to the books. Five of them were "why" questions, such as "Why did repeat purchases fall in March?" and "Did the free delivery threshold raise the average order value?".

Answered by the AI on the raw tables, 31 of the 50 questions came back correct. Through the semantic layer, the curated set of business definitions Callum built so that "revenue" or "active customer" always means the same thing, 42 of 50 came back correct. The simple lookups rose from 17 of 20 to 20 of 20. The business rule questions rose from 4 of 10 to 7 of 10.

The "why" questions did not move. One of five was correct on the raw tables, and one of five through the semantic layer. Better definitions fixed counting. They did nothing for cause. That is the pattern this chapter explains.

Three kinds of question: the ladder of causation

Judea Pearl, a computer scientist at the University of California, Los Angeles (UCLA) and one of the founders of modern causal inference, sorts every question you can ask of data into three levels. He calls them the ladder of causation, and he and Dana Mackenzie explain it for a general reader in The Book of Why (2018)1. Pearl's technical summary of the same idea appeared in Communications of the ACM in 20192.

The three rungs are:

  1. Association, or seeing. What goes together with what? "Customers who buy a sofa often buy cushions." You answer it by counting and correlating observed data.
  2. Intervention, or doing. What happens if I act? "What happens to sales if I raise prices by 5%?" You cannot answer it from past sales alone, because acting changes the conditions the past data came from.
  3. Counterfactuals, or imagining. What would have happened if things had been different? "Would this customer have bought the sofa without the discount code?" It looks back at a single case that already happened and asks about a world that did not.

Each rung needs more than the one below it. A rung 2 question cannot be answered with rung 1 information alone, however much of it you have. Pearl puts the current state of machine learning on rung 1 in so many words: "Answering these questions is the hallmark of current machine learning methods."2

That does not mean machine learning is weak. Rung 1 is where most useful business reporting lives: totals, trends, segments, forecasts that assume the world carries on as before. The trouble starts when a rung 1 answer is read as a rung 2 or rung 3 answer, which is exactly what happened with Niamh's newsletter question.

Example: Niamh's six questions, sorted onto the ladder

Niamh writes down six things she wants to know this month. Callum sorts them with her:

Niamh's questionRungWhat it needs
How many orders did we take in November?1A query against the order table, checked against the books
Do customers who buy a sofa also buy cushions?1A count of baskets, a market basket analysis
Which customers are likely to order again in the next 90 days?1A prediction from past behaviour, valid while nothing big changes
Would raising the free delivery threshold from €60 to €70 lift the average order value?2An experiment, or a causal model with its assumptions written down
Does the newsletter make customers spend more?2An experiment, or a causal model with its assumptions written down
Would the customers who used the January code have bought anyway?3A causal model of individual behaviour and assumptions someone owns

The first three are good AI tasks, because the answers can be checked against something the shop already trusts. The last three are not answered by any amount of extra data on the same tables. They need either a deliberate change in the shop, such as a test, or a model of how the shop works that a person is willing to stand behind.

Tap or click to open full screen and move around

Why a model trained on observations starts on the first rung

The argument for why AI struggles here is not about how clever the model is. It is about what information the data contains.

Observed data records what happened. It does not record why. Two completely different causal stories can produce exactly the same table of numbers, and no statistical method, however large, can tell them apart by looking at the table. To climb from rung 1 to rung 2 you have to add something the data does not hold: either a change you made on purpose (an experiment) or assumptions about how the world works (a causal model). Pearl's argument is that this is a limit of information, not of computing power2. Miguel Hernán and James Robins make the same point in their textbook on causal inference: the key assumptions that let you read observational data causally, such as "there is no unmeasured common cause", cannot be checked from the data itself3.

A language model adds a twist. It was trained on text, and text is full of causal claims: "smoking causes cancer", "rain makes people stay indoors", "discounts increase sales". So a language model can often name the right cause without ever looking at data, because it has read people who did the causal work before. That is real knowledge, and useful. But it is general knowledge. It does not include the facts that are specific to your shop, because nobody wrote them down on the internet.

Example: two shops, one table

Callum shows Niamh how two different worlds produce the same numbers. Here is the table her AI assistant analysed, with invented figures:

GroupCustomersAverage spend in the 12 months after the first order
Subscribed to the newsletter at first checkout8,000€107.75
Did not subscribe12,000€67.00

World A: the newsletter works. Every email reminds people of the shop, and that reminding is worth €41 a customer a year.

World B: the newsletter does almost nothing. Customers who arrive keen, furnishing a whole new flat, tick the newsletter box more often and also buy more over the year. The keenness drives both.

Both worlds produce exactly this table. The assistant cannot tell which world Shannonside lives in by looking harder at these two rows, and neither can Callum. What separates them is either a piece of knowledge about the customers (did keen customers subscribe more often?) or an experiment (what happens to spend if some subscribers stop receiving the newsletter?). The rest of this chapter is about getting one or both.

The case for: language models do well on causal benchmarks

The strongest evidence that language models can help with causal questions comes from Emre Kıcıman, Robert Ness, Amit Sharma and Chenhao Tan, researchers at Microsoft Research and the University of Chicago4. Their paper, "Causal reasoning and large language models: opening a new frontier for causality", first appeared as a preprint in 2023 and was revised in August 2024. It is worth reading in full, because it is careful.

They tested models from OpenAI's GPT 3.5 and GPT 4 families on several kinds of causal task:

  • Pairwise causal discovery: given two variables, such as "drinking water access" and "infant mortality", which causes which? On the Tübingen cause and effect pairs benchmark, the best prompt with GPT 4 reached 97% weighted accuracy, 13 points above the best existing data based method.
  • Counterfactual reasoning: short scenarios with a "what if" question. GPT 4 reached 92%, 20 points above the previous best.
  • Actual causality: deciding whether an event was a necessary or sufficient cause in a short story. On a commonly used set of 15 such stories, GPT 4 reached over 86%.

The authors took contamination seriously. Contamination means that a benchmark's questions and answers were part of the model's training text, so a high score may measure memory rather than reasoning. They tested for it, and found that GPT 4 could reproduce 61% of the cells of the Tübingen dataset when prompted with the start of each row, so that benchmark had clearly been seen in training4. Their conclusion is still that "the capabilities cannot be explained by dataset memorization alone", partly because the models also did well on new datasets built after the training cutoff.

Their most useful framing for a business is this: the models work on the text describing the variables, the metadata, and ignore the actual data. So they bring something that used to need a human expert, namely background knowledge about which things can cause which, and the authors suggest using them to help domain experts set up a causal analysis, combined with the usual statistical methods4.

Example: where that strength helps Shannonside

Callum asks his AI coding assistant a question that depends on general knowledge: "For an online homeware shop in Ireland, what could cause weekly sales of garden furniture to change?" The list that comes back is sensible: season, weather, bank holidays, the shop's own advertising, competitors' sales, delivery lead times, stock levels, and the timing of payday.

None of that is in Shannonside's order table. All of it is in the general text the model learned from. For Callum, who has never sold garden furniture before, it saves a good few hours of thinking and probably catches a cause he would have missed (delivery lead times, which matter more for bulky items). That is the Kıcıman et al. finding in practice: the model is a fast, well read colleague for the "what could cause this" step.

The case against: parrots, ladders and correlations

Three lines of research push back, and they are just as careful.

Causal parrots. Matej Zečević, Moritz Willig, Devendra Singh Dhami and Kristian Kersting, at TU Darmstadt, argue in "Causal parrots: large language models may talk causality but are not causal" (Transactions on Machine Learning Research, 2023) that when a language model answers a causal question correctly, it is most likely repeating correlations between causal facts that appeared in its training text5. They give this a formal name, a "meta" structural causal model: a model whose variables are causal facts about other systems. In plain words, the model has learned which causal sentences tend to appear together, not how to work out a cause it has never read about. Their own experiments support the view that the models of the time were, in their words, weak causal parrots.

The CLadder benchmark. Zhijing Jin and colleagues built CLadder, published at NeurIPS 2023, around Pearl's ladder6. It has about 10,000 yes or no questions generated from formal causal graphs, at all three rungs. Crucially, it includes questions where the story contradicts common sense, or uses nonsense words, so that memorised world knowledge cannot help. Accuracy on the whole set, with balanced yes and no answers so that guessing gives about 50%:

Model (as tested in the paper)Overall accuracy
Random guessing49.27%
GPT 3.552.18%
GPT 4 (gpt-4-1106-preview)62.03%
GPT 4 with the authors' CausalCoT prompt70.40%

CausalCoT is a step by step prompt that asks the model to extract the causal graph, name the quantity to estimate, translate it into a formula and then calculate. It helped, and it helped most on rung 1 (83.35%) and least on rung 3 (62.05%)6.

Correlation to cause. In a second study, Jin and colleagues built Corr2Cause (ICLR 2024): more than 200,000 questions that give a set of correlations and ask which causal conclusion follows7. Across 17 models, the authors found performance "almost close to random". GPT 4 scored an F1 of 29.08 (F1 is a score from 0 to 100 that balances catching the true cases against raising false alarms), against 20.38 for uniform random guessing. Models fine tuned on the task scored very high, up to 94.74, but fell apart when the questions were paraphrased or the variable names changed, which suggests they had learned the surface of the task, not the reasoning.

A newer benchmark with newer models. Haoang Chi and colleagues (NeurIPS 2024) built CausalProbe 2024 from material published after the models' training data was collected8. Claude 3 Opus, the strongest model they tested, answered 99.1% of the questions in an older benchmark, COPA, correctly, but only 69.2% of the hard version of the fresh benchmark. GPT 3.5 Turbo fell from 94.8% to 67.1%. Their reading: these models mostly do what they call "level 1" causal reasoning, retrieving causal knowledge stored in their parameters, rather than working out new causal relationships. The authors themselves note they cannot fully rule out that some of the underlying knowledge was in the training data anyway.

Bar chart of overall accuracy on the CLadder benchmark of about 10,000 yes or no causal questions, as reported by Jin et al. at NeurIPS 2023 (paper revised January 2024). Random guessing 49.27%, GPT 3.5 52.18%, GPT 4 (gpt 4 1106 preview) 62.03%, GPT 4 with the CausalCoT prompt 70.40%. Results for models of late 2023; newer models will score differently. Tap or click to open full screen and move around

A warning about all of these numbers

Every figure in this section is a snapshot. The models tested are from 2023 and 2024, and newer models, especially those that reason step by step before answering, are likely to score higher on the same benchmarks. I have not found a peer reviewed causal benchmark result for the newest models that I could verify, so I am not quoting one. Two things hold regardless of the date. Benchmarks leak into training data, which is why each new paper has to build a fresh one. And a benchmark of short stories with a known causal graph is not your shop, where nobody knows the graph.

Example: the question where general knowledge points the wrong way

Here is an invented case that shows why the "anti common sense" questions matter. Niamh asks her assistant: "We ran a sitewide 20% code in January. Did it increase sales?" General knowledge says discounts raise sales, and the assistant agrees, pointing at January orders that were 18% above December's daily rate.

What the assistant does not know, because it is nowhere in the data or on the internet, is that Shannonside's January was always strong (the post Christmas sale season, people moving house) and that Callum had already seen, in the shop's own history, that the weeks after a sitewide code are weak, because customers bring purchases forward. In this shop, the general causal fact "discounts raise sales" is only half true: they raise sales this week and lower them next month. A model that repeats causal facts it has read will give the general answer confidently, and here the general answer is wrong.

My view on the debate

Both camps are right about what they measured, and the disagreement shrinks once you separate two jobs.

Job one: knowing which causes are plausible. Language models are good at this, often better than a busy shop owner, because they have read an enormous amount about how the world tends to work. Kıcıman et al. measured this strength, and the causal parrots paper explains where it comes from. For this job it does not matter much whether the model "reasons" or "remembers", so long as a person checks the list.

Job two: deciding which cause is true here, and how big it is. This needs data from your business, a design that separates cause from coincidence, and assumptions about things nobody wrote down. CLadder, Corr2Cause and CausalProbe all show the models struggle exactly where memorised knowledge cannot help, and that is the situation of every specific business question. Your newsletter's effect on your customers is not in any training text.

So my position is: use AI generously for job one and treat its output in job two as a draft that has not been checked. That is not because models are poor at reasoning in general, but because a causal claim about your business cannot be verified by reading the model's answer more carefully. It can only be verified by an experiment or by assumptions someone owns. The last part of this series develops this idea in full as the verification bottleneck. Causal questions are its clearest case.

Confounding: when a third thing drives both

A confounder is a variable that influences both the thing you think is the cause and the thing you think is the effect. It creates a correlation between them even when one does not cause the other at all, or it makes a small effect look large.

In Niamh's question, the candidate cause is "subscribed to the newsletter" and the effect is "spend in the next 12 months". A plausible confounder is the value of the customer's first basket. Customers who spend more on their first order are often in the middle of furnishing a home. They are more likely to tick the newsletter box, and they are more likely to come back and buy more, newsletter or not.

The cure, when the confounder is measured, is to compare like with like: subscribers and non subscribers with similar first baskets. If the difference shrinks once you do that, most of the original gap was the confounder.

Example: the newsletter comparison, worked through

Callum splits Shannonside's 20,000 customers from last year by the value of their first basket. All figures are invented for the example.

First basketSubscribed: customersSubscribed: average 12 month spendDid not subscribe: customersDid not subscribe: average 12 month spend
Under €702,000€478,000€40
€70 or more6,000€1284,000€121
All8,000€107.7512,000€67.00

Look at the rows first. Within small first baskets, subscribers spend €7 more. Within large first baskets, subscribers also spend €7 more. Now look at the totals: subscribers spend €40.75 more. The gap is almost six times bigger in the totals than in either row.

The reason is the mix. Three quarters of subscribers (6,000 of 8,000) had a large first basket. Only a third of non subscribers (4,000 of 12,000) did. The total compares mostly big spenders with mostly small spenders, and calls the difference "the newsletter".

The naive comparison is the difference between the two group averages:

Δnaive=Yˉsub−Yˉnot\Delta_{\text{naive}} = \bar{Y}_{\text{sub}} - \bar{Y}_{\text{not}}

where Δnaive\Delta_{\text{naive}} is the naive estimate of the newsletter's effect, Yˉsub\bar{Y}_{\text{sub}} is the average 12 month spend of subscribers and Yˉnot\bar{Y}_{\text{not}} is the average 12 month spend of customers who did not subscribe. Foundations: the mean explains averages and weighted averages from scratch.

The subscribers' average is a weighted average of the two rows:

Yˉsub=2,000×47+6,000×1288,000=862,0008,000=107.75\bar{Y}_{\text{sub}} = \frac{2{,}000 \times 47 + 6{,}000 \times 128}{8{,}000} = \frac{862{,}000}{8{,}000} = 107.75

where 2,0002{,}000 and 6,0006{,}000 are the subscribers with small and large first baskets, 4747 and 128128 are their average spends in euro, and 8,0008{,}000 is all subscribers.

The same for customers who did not subscribe:

Yˉnot=8,000×40+4,000×12112,000=804,00012,000=67.00\bar{Y}_{\text{not}} = \frac{8{,}000 \times 40 + 4{,}000 \times 121}{12{,}000} = \frac{804{,}000}{12{,}000} = 67.00

where 8,0008{,}000 and 4,0004{,}000 are the non subscribers with small and large first baskets, 4040 and 121121 their average spends in euro, and 12,00012{,}000 all non subscribers. So Δnaive=107.75−67.00=40.75\Delta_{\text{naive}} = 107.75 - 67.00 = 40.75 euro.

The adjusted comparison takes the difference inside each group and then averages those differences, weighting each group by its share of all customers:

Δadj=∑gwg(Yˉsub,g−Yˉnot,g)\Delta_{\text{adj}} = \sum_{g} w_g \left( \bar{Y}_{\text{sub},g} - \bar{Y}_{\text{not},g} \right)

where gg runs over the groups (small and large first basket), wgw_g is the share of all customers in group gg, Yˉsub,g\bar{Y}_{\text{sub},g} is the average spend of subscribers in group gg and Yˉnot,g\bar{Y}_{\text{not},g} is the average spend of non subscribers in group gg. Both groups hold 10,000 of the 20,000 customers, so each weight is 0.5. Foundations: the mean shows why a weighted average of within group differences removes the effect of the mix.

Worked through:

Δadj=0.5×(47−40)+0.5×(128−121)=3.5+3.5=7\Delta_{\text{adj}} = 0.5 \times (47 - 40) + 0.5 \times (128 - 121) = 3.5 + 3.5 = 7

where 0.50.5 is each group's share of customers and the brackets are the within group differences in euro. The adjusted estimate is €7, not €40.75.

That €7 is only the true effect if the first basket is the whole story. If keen customers differ in some other way that also drives both signup and spend, such as living in a new housing estate, or following the shop on social media, then €7 still contains some of that. Whether you have measured enough is the assumption no statistics package can check for you3. This is also why the difference between "€41 more" and "€7 more" never comes from the AI. It comes from someone who knows that first basket value matters, or from asking.

The simulation: watching a confounder fool a regression

Tables with two rows are easy to check by hand. Real customer data has thousands of rows and dozens of columns, and an AI assistant with code execution will usually reach for a regression. A regression estimates how much the outcome changes with each input, holding the other inputs in the model fixed. If the confounder is not in the model, it is not held fixed, and the estimate absorbs its effect.

The cleanest way to see this is to build a small world where you know the truth, then check which analysis finds it. Here is the model behind the simulation:

Yi=β0+β1Ni+β2Bi+εiY_i = \beta_0 + \beta_1 N_i + \beta_2 B_i + \varepsilon_i

where YiY_i is customer ii's spend in the 12 months after the first order, NiN_i is 1 if the customer subscribed to the newsletter and 0 if not, BiB_i is the value of the first basket in euro, β0\beta_0 is a baseline, β1\beta_1 is the effect of the newsletter, the number the analysis is after, β2\beta_2 is how much each extra euro of first basket goes with later spend, and εi\varepsilon_i is everything else. Foundations: regression explains what a regression coefficient means.

Example: the simulated Shannonside customers

Callum writes the simulation below. It creates 20,000 invented customers. Bigger first baskets make a newsletter signup more likely, and bigger first baskets also lead to more spend later. The newsletter itself truly adds €7 to a customer's next 12 months. Then he runs two regressions: the naive one, with only the newsletter, and the adjusted one, which also includes the first basket.

# Simulation: a confounder (first basket value) makes the newsletter look powerful.
# Needs numpy, pandas and statsmodels. All data is invented.
import numpy as np
import pandas as pd
import statsmodels.formula.api as smf

rng = np.random.default_rng(seed=2026)
n = 20_000

# The confounder: value of the first basket in euro (mean about 84)
first_basket = rng.gamma(shape=4.0, scale=21.0, size=n)

# Bigger first baskets make a newsletter signup more likely
p_signup = 1 / (1 + np.exp(-(-0.4 + 0.035 * (first_basket - 84))))
newsletter = rng.binomial(1, p_signup)

# Spend in the next 12 months: the newsletter truly adds 7 euro
true_effect = 7.0
spend_12m = 0.9 * first_basket + true_effect * newsletter + rng.gamma(2.0, 17.5, size=n)

df = pd.DataFrame({"first_basket": first_basket, "newsletter": newsletter, "spend_12m": spend_12m})

naive = smf.ols("spend_12m ~ newsletter", data=df).fit()
adjusted = smf.ols("spend_12m ~ newsletter + first_basket", data=df).fit()

print(f"share subscribed: {df.newsletter.mean():.3f}")
print(df.groupby("newsletter")[["first_basket", "spend_12m"]].mean().round(2))
for name, model in [("naive", naive), ("adjusted", adjusted)]:
    lo, hi = model.conf_int().loc["newsletter"]
    print(f"{name:9s} effect: {model.params['newsletter']:6.2f}  (95% CI {lo:.2f} to {hi:.2f})")

A few notes for anyone new to the tools. np.random.default_rng creates a random number generator with a fixed seed, so the same numbers come out every time9. smf.ols fits an ordinary least squares regression from a formula, where spend_12m ~ newsletter + first_basket means "explain spend with newsletter and first basket"10. conf_int() returns the 95% confidence interval of each coefficient.

The output, run with numpy 2.5, pandas 3.1 and statsmodels 0.15:

AnalysisEstimated newsletter effect95% confidence interval
Naive: spend explained by newsletter alone€46.69€45.56 to €47.83
Adjusted: newsletter and first basket€7.47€6.65 to €8.29
The truth built into the simulation€7.00

In the simulated data, 40.7% of customers subscribed. Their average first basket was €109.74, against €66.01 for those who did not subscribe. That difference in first baskets is the whole story behind the €46.69.

Notice the confidence interval on the naive estimate: €45.56 to €47.83. It is narrow, which looks like precision. It is precisely wrong. A confidence interval measures how much the estimate would wobble from random sampling. It says nothing about whether you asked the right question. Foundations: confidence intervals covers what an interval does and does not promise.

Bar chart from a simulation of 20,000 invented Shannonside Home customers. The naive regression of 12 month spend on newsletter signup estimates an effect of €46.69. The regression adjusted for first basket value estimates €7.47. The true effect built into the simulation is €7.00. The confounder inflates the naive estimate more than six times. Tap or click to open full screen and move around

Example: what the AI assistant did with Niamh's table

When Niamh uploaded her customer table and asked her question, the assistant ran something close to the naive regression and reported the €41 as the newsletter's value. That is not a bug in the code. The code was correct. The question it answered ("how much more do subscribers spend?") was a rung 1 question, and the words it used ("drives incremental value") were rung 2 words.

When Callum repeated the question with "adjust for confounders" added, the assistant did include the first basket, because that column was in the table and looked relevant. It also included the number of emails each customer had opened. That second choice is a mistake of its own: opening emails is something the newsletter causes, so controlling for it removes part of the very effect you want to measure. Statisticians call this a bad control. The assistant picked columns by how related they looked, not by where they sit in the causal story, and it had no way to know the story.

Selection bias: the customers you never see

Selection bias happens when the data you analyse was filtered by something related to the answer. The classic version is survivorship: you study only the cases that survived some process, and the survivors look better than the whole group ever was.

AI assistants are particularly exposed here, because they analyse what they are given. A file is the whole world to them. They rarely ask what was removed before the file existed.

Example: the newsletter export that forgot who left

Niamh exports her current newsletter list from the newsletter tool: 38,000 subscribers, each with a signup date and a lifetime spend from the shop. She asks the assistant whether long standing subscribers are more valuable. The answer is a neat table (invented figures):

Subscribed forSubscribers in the exportAverage lifetime spend
Under 1 year11,000€111
1 to 3 years15,000€210
More than 3 years12,000€362

The assistant concludes that staying subscribed builds value over time and suggests a campaign to keep people subscribed longer.

What the export does not show: over five years, about 21,000 people unsubscribed, and the tool leaves them out of the export of current subscribers. People who stop buying tend to stop reading and then unsubscribe. Of the 9,000 people who joined four years ago, only 3,100 are still on the list, and they are the ones who kept buying. "More than 3 years" is not a group that the newsletter made valuable. It is the group that was left after everyone who drifted away was removed. Some of the pattern is time (a longer life has more time to spend), some of it is survival, and none of it tells you what keeping a customer subscribed would do.

The fix is not a cleverer model. It is going back to the shop database, which still has every customer, and analysing everyone who ever subscribed, whether they are still on the list or not.

Reverse causation: when the effect drives the cause

Sometimes two things move together because the arrow points the other way. Sales do not rise because you spend more. You spend more because you expect sales to rise.

Example: Meta spend in the busy weeks

Callum plots Shannonside's weekly Meta Ads spend against weekly orders for the year. The correlation is strong. Four weeks illustrate it (invented figures):

WeekMeta spendOrders
A quiet week in February€2,800400
An ordinary week in May€3,750455
The week before Christmas€6,100700
Black Friday week€7,000820

Niamh's assistant fits a line through the year and reports that each extra €1 of Meta spend comes with about 0.1 extra orders. At an average order value of €84 that looks like €8.40 of revenue for every €1, a return on ad spend that would justify doubling the budget.

The catch: Niamh sets the budget from the calendar. She raises spend in the weeks she expects to be busy, because that is when people are buying anyway. High expected demand causes high spend. The line through the points mixes the effect of the ads with the effect of the season, and the season is far bigger. When Shannonside later switched Meta off in part of the country for four weeks, the measured incremental return was about €1.90 per €1 (an invented figure for this example). The method for that kind of test is in attribution for online shops, models, windows and incrementality, and how to split a budget on such numbers is in allocating an eCommerce ad budget by marginal returns.

Simpson's paradox: when the total and every part disagree

Simpson's paradox is the most striking version of confounding: a relationship that holds in every subgroup reverses when you combine the subgroups11. It happens when the groups differ in size and in their baseline, and the thing you are comparing is spread unevenly across them.

Example: discount codes and margin

Niamh asks whether orders with a discount code are less profitable. The assistant pulls a month of orders and finds the opposite: orders with a code earned a 42.5% gross margin, orders without a code only 32.0%. Its summary: "Discount codes are associated with higher margins, possibly because they attract higher value customers."

Callum splits the same month by category (invented figures):

CategoryWith a code: revenueWith a code: marginWithout a code: revenueWithout a code: margin
Textiles (cushions, throws, bedding)€52,50050%€17,50056%
Furniture€17,50020%€70,00026%
All orders€70,00042.5%€87,50032.0%

In textiles, a code costs 6 points of margin. In furniture, a code costs 6 points of margin. In total, code orders look 10.5 points better.

The arithmetic: with a code, margin is €26,250 on textiles (50% of €52,500) plus €3,500 on furniture (20% of €17,500), so €29,750 on €70,000, which is 42.5%. Without a code, it is €9,800 on textiles (56% of €17,500) plus €18,200 on furniture (26% of €70,000), so €28,000 on €87,500, which is 32.0%.

The explanation is the mix. Shannonside's newsletter codes mostly go on textiles, which carry high margins anyway. Furniture, with thin margins, is mostly bought without a code. The total compares "mostly textiles" with "mostly furniture" and calls the difference "the code". The right answer to Niamh's question is the within category one: a code costs about 6 points of margin. The maths of what a discount must deliver to pay for itself is in offers and promotions, the maths behind every discount.

Grouped bar chart of invented Shannonside Home orders for one month. In textiles, orders with a code earn 50% margin against 56% without. In furniture, 20% with a code against 26% without. Across all orders, code orders show 42.5% against 32.0% without, because codes are concentrated in high margin textiles. Every category says codes cost 6 points; the total says the opposite. Tap or click to open full screen and move around

Which view is right, the total or the split, is not a statistical question. It depends on the causal story: here, category influences whether a code is used and also influences margin, so you split by category. In other data the same numbers could call for the total11. That decision needs a picture of the causes, which is where AI can help, and where it must not have the last word.

What AI does well in causal work

None of this means AI has no place in causal questions. It has a large place, in the parts of the work that are about generating options and writing code, rather than deciding what is true.

  • Listing candidate confounders. Given a question and a list of columns, a language model will produce a long list of things that might drive both cause and effect. It is fast and often catches the one you forgot. This is the strength Kıcıman et al. measured4.
  • Drafting a causal diagram. A causal diagram, or DAG (directed acyclic graph), is a drawing of variables as boxes and causes as arrows, with no arrow ever leading back to where it started. It makes your assumptions visible so others can argue with them. A model can produce a first draft in seconds. Long, Schuster and Piché found that such drafts depend strongly on the exact wording of the prompt12, so treat the draft as a starting point for discussion, never as the answer. Tools like DAGitty, a free browser tool for drawing and analysing causal diagrams13, and DoWhy, an open source Python library that makes you state the causal graph explicitly before estimating anything14, are where such a draft is then checked.
  • Writing the code for a design. The code for a difference in differences, a holdout analysis, a matched comparison or a regression with the right controls is ordinary code. An AI coding assistant writes it well, and like any code it can be tested.
  • Explaining a method. For a shop owner meeting difference in differences for the first time, an assistant is a patient tutor.

Example: Callum asks for confounders, then reviews them

Callum uses a small vendor neutral function, ask_model(prompt) -> str, that he has wired to his provider. The key is read from an environment variable inside that function, never written in the code.

# Ask an AI model to list candidate confounders. The answer is a draft for review.
QUESTION = "Does receiving the newsletter increase a customer's spend in the next 12 months?"
COLUMNS = [
    "first_basket_value", "first_order_date", "acquisition_channel",
    "used_discount_code_on_first_order", "country", "account_or_guest",
    "emails_opened", "orders_in_next_12_months",
]

prompt = f"""Question: {QUESTION}
Available columns: {", ".join(COLUMNS)}
For each column, say whether it is a plausible confounder (affects both newsletter
signup and later spend), a mediator (caused by the newsletter), an outcome, or
unrelated. Then list likely confounders that are NOT in the columns.
Give one line of reasoning each. Do not estimate any effect."""

draft = ask_model(prompt)
print(draft)

The prompt asks the model to classify, not to calculate, and explicitly forbids it from estimating the effect. Callum and Niamh then go through the draft line by line. Here is the review table they produce (the model's suggestions are illustrative, written for this example):

VariableModel's draftDecision after reviewWhy
First basket valueConfounderKeepBig first baskets come from home movers, who subscribe more and buy more
Acquisition channelConfounderKeepCustomers from email capture pop ups subscribe more and differ in spend
Discount code on first orderConfounderKeepThe welcome code is given in exchange for signing up
Emails openedConfounderReject: it is a mediatorOpening emails is caused by receiving them
Orders in next 12 monthsOutcomeReject as a controlIt is part of the outcome
Moving house (not in data)Missing confounderKeep as a known gapNiamh knows home movers are a big group, but the shop does not record it

Two of the model's draft calls needed correcting, and the most important confounder was one only Niamh could confirm from her knowledge of the customers. The draft saved Callum perhaps an hour. The review took twenty minutes and is the part that made the analysis trustworthy.

Turning causal code into a checkable task

The series hypothesis, set out in the first chapter, says AI is strongest where answers can be checked mechanically. Causal claims are the opposite: you cannot check them by looking at the data again. But part of causal work can be made checkable, and that is where AI becomes safe to use.

The trick is the one in the simulation section. Before you run an analysis on real data, run it on simulated data where you planted the effect yourself. If the code does not recover the planted effect, the code is wrong. This turns "does my difference in differences code work?" into a test with a known answer, which is exactly the kind of task an AI coding assistant handles well and Callum can verify in seconds.

What the test cannot check is whether the real world matches the assumptions built into the simulation. The code can be proven correct. The assumptions cannot.

Example: testing the difference in differences code

In March, Shannonside started showing a delivery date promise ("arrives by Thursday") on furniture product pages only. Niamh wants to know whether it lifted furniture orders. Callum's plan is a difference in differences: compare the change in furniture orders with the change in textiles orders over the same weeks, so that anything that hit both categories (season, a bank holiday, a national sale) cancels out.

Average weekly orders, four weeks before and four weeks after (invented figures):

CategoryBeforeAfterChange
Furniture (got the delivery promise)300345+45
Textiles (did not)500540+40

The classic difference in differences in levels is:

τ^levels=(Y1F−Y0F)−(Y1T−Y0T)\hat{\tau}_{\text{levels}} = \left( Y^{F}_{1} - Y^{F}_{0} \right) - \left( Y^{T}_{1} - Y^{T}_{0} \right)

where τ^levels\hat{\tau}_{\text{levels}} is the estimated effect in orders per week, Y0FY^{F}_{0} and Y1FY^{F}_{1} are furniture's weekly orders before and after, and Y0TY^{T}_{0} and Y1TY^{T}_{1} are textiles' weekly orders before and after. Foundations: regression shows how this is the same as a regression with a group term, a time term and their interaction.

With Shannonside's numbers:

τ^levels=(345−300)−(540−500)=45−40=5\hat{\tau}_{\text{levels}} = (345 - 300) - (540 - 500) = 45 - 40 = 5

where 345345 and 300300 are furniture orders after and before, and 540540 and 500500 textiles orders after and before. That says the delivery promise added 5 orders a week.

But textiles is a bigger category. If both categories tend to grow by the same percentage rather than the same number of orders, the right comparison is in ratios:

τ^ratio=Y1FY0F⋅Y1TY0T−1\hat{\tau}_{\text{ratio}} = \frac{Y^{F}_{1}}{Y^{F}_{0} \cdot \dfrac{Y^{T}_{1}}{Y^{T}_{0}}} - 1

where τ^ratio\hat{\tau}_{\text{ratio}} is the estimated effect as a share of what furniture would have sold without the promise, and the other symbols are as before. Foundations: ratios and rates covers growth rates and ratios if this is new.

With the numbers:

τ^ratio=345300×540500−1=345324−1=0.065\hat{\tau}_{\text{ratio}} = \frac{345}{300 \times \dfrac{540}{500}} - 1 = \frac{345}{324} - 1 = 0.065

where 324324 is what furniture would have sold if it had grown by the textiles rate of 8%. That is a 6.5% lift, or 21 extra orders a week (345 minus 324).

Same data, same method, and two answers that differ by a factor of four: 5 orders a week or 21. Which one is right depends on whether furniture and textiles would have grown in parallel in orders or in percentages, without the promise. Callum can test that both versions of the code are correct by simulating each world and checking that each version recovers the effect he planted. He cannot test which world Shannonside lives in. That is a judgement about the business, informed by how the two categories moved together in previous years. An AI assistant asked to "run a difference in differences" will pick one version without saying that a choice was made. One of the best known uses of this design, Card and Krueger's study of the minimum wage in New Jersey and Pennsylvania, spent much of its length defending exactly this kind of comparability15.

What AI cannot do: decide which assumptions hold in your business

Every causal method rests on assumptions, and the assumptions are the part that carries the weight. The main ones, in plain words:

  • No unmeasured confounders. Everything that drives both cause and effect is in the data and in the model. Untestable from the data itself3.
  • Parallel trends (for difference in differences). Without the change, the two groups would have moved in parallel, in the sense you chose: levels or percentages.
  • No spillover. The change in one group did not affect the other. If the delivery promise made people more willing to buy cushions along with the sofa, textiles were affected too.
  • Overlap. For every kind of customer there are both treated and untreated examples to compare. If every home mover subscribes, there is no one to compare them with.
  • Stable meaning. The thing you measure meant the same before and after. If the 3PL warehouse changed its returns process in the same month, "orders" may not mean the same thing.

Each of these is a statement about the world, not about the data. Some can be made more or less plausible with checks (pre trends, balance tables, placebo tests), and an AI can write those checks well. None can be proven by them. The person who knows whether a competitor closed its furniture range in March is Niamh, not the model.

Example: the assumption register for the delivery promise test

Callum writes the assumptions of the furniture analysis into a short register, with a name against each, the way he keeps a release register for code:

AssumptionHow it was checkedWho signs itStatus
Furniture and textiles grow in proportion, not in absolute ordersThe ratio of the two categories was stable (within 3%) for the 12 weeks before the change and in the same weeks a year earlierCallumAccepted
Nothing else changed for furniture in MarchNiamh checked the marketing calendar, prices and stockNiamhAccepted, with one note: a sofa line came back into stock in week 2
No spillover to textilesShare of furniture baskets that included textiles did not changeCallumAccepted
The 3PL's late returns do not distort "orders"Orders counted at placement, returns handled separatelyCallumAccepted

The sofa coming back into stock is the kind of fact that decides the answer and is visible to nobody but the person who runs the shop. Callum reruns the analysis without the restocked sofa line. The lift drops from 6.5% to 4.8% (invented). That is the number Niamh acts on.

The holdout: asking the shop instead of the data

When the action can be randomised, the cleanest way to climb to rung 2 is not to model the causes at all, but to create the comparison on purpose. A holdout takes a random group of customers and does not give them the treatment. Because the group was chosen at random, keen and casual customers end up in both groups in the same proportions, so the confounder is balanced by design. You do not need to know what the confounders are.

This is the single most useful idea in this chapter for a small business. It replaces an argument about assumptions with a measurement. The machinery of experiments inside a shop is in experiments inside your own shop, with feature flags, A/B tests and holdouts.

Example: the newsletter holdout

Callum randomly picks 20% of Shannonside's 38,000 subscribers, 7,600 people, who receive no campaign emails for 12 weeks. The other 30,400 receive the newsletter as usual. Both groups still get order confirmations and delivery emails. After 12 weeks (invented figures):

GroupSubscribersAverage spend in 12 weeks
Received the newsletter30,400€11.00
Holdout7,600€9.50
Difference€1.50

Is €1.50 real, or noise? Spend per customer is very uneven (most spend nothing in a given 12 weeks, a few spend hundreds), and the standard deviation in both groups is about €47. The standard error of a difference between two averages is:

SE=s2nT+s2nHSE = \sqrt{\frac{s^2}{n_T} + \frac{s^2}{n_H}}

where SESE is the standard error of the difference, ss is the standard deviation of spend per subscriber, nTn_T is the number of subscribers who received the newsletter and nHn_H the number in the holdout. Foundations: confidence intervals explains the standard error and why 1.96 of them make a 95% interval.

With Shannonside's numbers:

SE=47230,400+4727,600=0.0727+0.2907=0.603SE = \sqrt{\frac{47^2}{30{,}400} + \frac{47^2}{7{,}600}} = \sqrt{0.0727 + 0.2907} = 0.603

where 4747 is the standard deviation in euro, 30,40030{,}400 the newsletter group and 7,6007{,}600 the holdout. The 95% interval is 1.50±1.96×0.6031.50 \pm 1.96 \times 0.603, so from €0.32 to €2.68 per subscriber over 12 weeks.

Across 30,400 subscribers that is about €45,600 of extra revenue in 12 weeks, with a plausible range of roughly €9,700 to €81,500. Wide, but clearly above zero. Scaled to a year, €1.50 per 12 weeks is about €6.50 per subscriber, close to the €7 of the adjusted comparison and far below the €40.75 of the naive one. With only a 10% holdout (3,800 people), the same difference would have had an interval from minus €0.08 to €3.08, which includes zero. The holdout size has to be decided before the test, as how much data you actually need for tests and forecasts explains.

The AI's role here is real and safe: it can write the random assignment, the exclusion from the email tool's audience, the analysis and the interval. Each piece can be checked. What it did not do, and could not do, is produce the €1.50 from the existing data.

A way of working: AI drafts, a person decides, the shop answers

Put together, the chapter suggests a simple workflow for any "why" or "what if" question. It gives AI the jobs it does well and keeps the decisions where the knowledge is.

Tap or click to open full screen and move around

Example: Niamh's newsletter question, start to finish

Here is how the original question ran the second time, with the time each step took (invented, but typical for a shop this size):

  1. The decision (10 minutes). Niamh writes: "If the newsletter adds less than €1 per subscriber per quarter, I will cut it to one email a month and move the time to product photography." The question now has a threshold that matters.
  2. Confounders and diagram (15 minutes with the assistant, 20 minutes of review). The draft and the review table from earlier. Home movers are flagged as a confounder the shop cannot measure, so an observational answer would always be doubtful.
  3. Randomise? Yes. Holding back emails from a random group is easy and low risk.
  4. Test design (30 minutes). Callum asks his coding assistant for the assignment script, the audience exclusion and the analysis. He tests the analysis on a simulated dataset with a planted €1.75 effect and checks that it recovers it.
  5. The test (12 weeks). Nobody looks at the result early.
  6. The answer (1 hour). €1.50 per subscriber over 12 weeks, interval €0.32 to €2.68. Above Niamh's threshold, so the newsletter stays, and the honest range goes into the decision note.

Total human time: under three hours, plus twelve weeks of patience. The first answer from the assistant took one minute and overstated the effect about sixfold: €41 a year, against roughly €6.50 a year from the holdout.

How this fits the verification bottleneck

This series works towards a hypothesis I call the verification bottleneck: AI collapses the cost of producing data work, but not the cost of knowing whether it is right. Causal questions test that idea harder than any other topic, and the result is mostly support, with one refinement.

Strong support for checkability (H3). Causal claims are the clearest case of answers that cannot be checked mechanically. A wrong SQL total can be reconciled against the books. A wrong causal claim looks exactly like a right one, and the data you have cannot tell them apart. The golden set showed it: the semantic layer lifted simple questions to 20 of 20, and left "why" questions at 1 of 5.

Strong support for the cost of detection (H1). The cost of a wrong causal answer is paid months later: a budget doubled on a reverse causation line, a newsletter kept or cut on a confounded gap. The error rate of the AI on these questions matters less than the fact that the error is invisible until the money is spent.

Support for the danger of fluency (H4). The assistant's newsletter answer came with a regression table and a narrow confidence interval. Both were technically correct, and both made the wrong conclusion look more solid. Precision is not the same as truth.

A refinement. The hypothesis can read as "AI is weak at causal work". The evidence says something more useful: AI is strong at the parts of causal work that are about options and code, and weak only at the part that is about the world. Simulation with a planted effect turns causal code into a checkable task. So the bottleneck does not sit on the whole causal analysis. It sits on the assumptions and on the design, which are exactly where a person who knows the business adds the most.

For small businesses (H5). The best value move is not a causal model at all. It is a low cost, well designed holdout that asks the shop directly, with AI writing the code. That is a narrow, checkable task, the kind the hypothesis says a small business should favour.

Conclusion

AI can tell you what moves together in your data, quickly and usually correctly. On its own it cannot tell you what causes your sales to go up, because that answer is not in the data. It is in a deliberate change you make, or in assumptions about your business that someone has to own.

The research supports both camps in the debate. Language models know a great deal about which causes are plausible in general, measured at up to 97% on some benchmarks. They struggle when the question cannot be answered from what they have read, at 62% on CLadder for GPT 4 in late 2023, where 50% is a coin toss. Your shop's specific causal questions are all of that second kind.

So use AI for the drafting: candidate confounders, causal diagrams, the code for a holdout or a difference in differences, and tests of that code on simulated data with a known answer. Keep the decisions with people: which arrows are real, which assumptions hold, which comparison is fair. And whenever you can, skip the argument and ask the shop with a holdout. A random group that did not get the newsletter will tell you more in twelve weeks than any model will tell you in a minute.

If you want to know which of your "why" questions AI can answer and which need a holdout or a person who owns the assumptions, book the free workshop. We will sort your questions onto the ladder together, and the first two weeks of work are on me.

Sources

  1. 1.

    Judea Pearl and Dana Mackenzie, The Book of Why: The New Science of Cause and Effect, Basic Books, New York, 2018, author's page with the publisher's description, http://bayes.cs.ucla.edu/WHY/

  2. 2.

    Judea Pearl, The Seven Tools of Causal Inference, with Reflections on Machine Learning, Communications of the ACM, volume 62, number 3, 2019, pages 54 to 60, doi 10.1145/3241036, author's version (UCLA Technical Report R-481), https://ftp.cs.ucla.edu/pub/stat_ser/r481.pdf

  3. 3.

    Miguel A. Hernán and James M. Robins, Causal Inference: What If, Chapman and Hall/CRC, 2020, freely available from the author, https://miguelhernan.org/whatifbook

  4. 4.

    Emre Kıcıman, Robert Ness, Amit Sharma and Chenhao Tan, Causal Reasoning and Large Language Models: Opening a New Frontier for Causality, arXiv preprint 2305.00050, version 3, August 2024, https://arxiv.org/abs/2305.00050

  5. 5.

    Matej Zečević, Moritz Willig, Devendra Singh Dhami and Kristian Kersting, Causal Parrots: Large Language Models May Talk Causality But Are Not Causal, Transactions on Machine Learning Research, 2023, arXiv 2308.13067, https://arxiv.org/abs/2308.13067

  6. 6.

    Zhijing Jin, Yuen Chen, Felix Leeb, Luigi Gresele, Ojasv Kamal, Zhiheng Lyu, Kevin Blin, Fernando Gonzalez Adauto, Max Kleiman-Weiner, Mrinmaya Sachan and Bernhard Schölkopf, CLadder: Assessing Causal Reasoning in Language Models, Advances in Neural Information Processing Systems 36 (NeurIPS 2023), https://proceedings.neurips.cc/paper_files/paper/2023/hash/631bb9434d718ea309af82566347d607-Abstract-Conference.html (results table in arXiv 2312.04350 version 3, January 2024, https://arxiv.org/abs/2312.04350)

  7. 7.

    Zhijing Jin, Jiarui Liu, Zhiheng Lyu, Spencer Poff, Mrinmaya Sachan, Rada Mihalcea, Mona Diab and Bernhard Schölkopf, Can Large Language Models Infer Causation from Correlation?, International Conference on Learning Representations (ICLR 2024), arXiv 2306.05836, https://arxiv.org/abs/2306.05836

  8. 8.

    Haoang Chi and others, Unveiling Causal Reasoning in Large Language Models: Reality or Mirage?, Advances in Neural Information Processing Systems 37 (NeurIPS 2024), https://proceedings.neurips.cc/paper_files/paper/2024/hash/af2bb2b2280d36f8842e440b4e275152-Abstract.html

  9. 9.

    NumPy Developers, NumPy documentation, Random Generator, https://numpy.org/doc/stable/reference/random/generator.html

  10. 10.

    statsmodels Developers, statsmodels documentation, statsmodels.formula.api.ols, https://www.statsmodels.org/stable/generated/statsmodels.formula.api.ols.html

  11. 11.

    Jan Sprenger and Naftali Weinberger, Simpson's Paradox, The Stanford Encyclopedia of Philosophy, https://plato.stanford.edu/entries/paradox-simpson/

  12. 12.

    Stephanie Long, Tibor Schuster and Alexandre Piché, Can Large Language Models Build Causal Graphs?, NeurIPS 2022 workshop on Causal Machine Learning for Real World Impact, arXiv 2303.05279, https://arxiv.org/abs/2303.05279

  13. 13.

    Johannes Textor and others, DAGitty: drawing and analysing causal diagrams, https://www.dagitty.net/

  14. 14.

    PyWhy, DoWhy: a Python library for causal inference that supports explicit modelling and testing of causal assumptions, GitHub, https://github.com/py-why/dowhy

  15. 15.

    David Card and Alan B. Krueger, Minimum Wages and Employment: A Case Study of the Fast Food Industry in New Jersey and Pennsylvania, NBER Working Paper 4509, 1993, published in the American Economic Review, 1994, https://www.nber.org/papers/w4509

Shelter

I’m running the London Marathon for Shelter. Sunday 25 April 2027

My personal fundraiser. Shelter, the National Campaign for Homeless People Limited, registered charity 263710 (England and Wales) and SC002327 (Scotland), registered with the Fundraising Regulator.

Donate to Shelter