Causal inference asks a decision-focused question: if you change a treatment, policy, feature, price, or medication, how will an outcome change? Unlike prediction, which estimates what is likely to happen, it seeks the effects of actions and the factors that produce outcomes. section 1.0 section 4.1.1
The central challenge is that correlation is not causation. A third variable may affect both the treatment and the outcome, creating confounding bias. For example, age can influence both which medication a patient receives and how quickly they recover, obscuring the medication’s effect. section 1.4 section 1.4.2
Figure 1.6 Apart from how treatment may affect recovery, there’s a third element affecting both simultaneously. These elements are called confounders. For instance, in this example, age is a confounder.
Use this diagram to distinguish the treatment-to-outcome relationship from a confounder that influences both variables. section 1.4.2
A practical causal analysis typically proceeds by:
- Determining whether data are experimental or observational; randomized experiments provide stronger causal evidence, but may be infeasible, unethical, costly, or too slow. section 1.1.1 section 1.3.5
- Defining the treatment, outcome, objective, and all plausible variables involved in how the data was generated. section 3.6
- Drawing a directed acyclic graph (DAG), consulting domain experts, and making assumptions and limitations explicit. section 1.8 section 3.6
- Identifying confounders and checking positivity: the treatment must have occurred in the situations being compared. section 2.9
- Choosing a suitable method to estimate a causal effect, or collecting new data when essential confounders are unavailable. section 1.1.5
Randomized controlled trials (RCTs) and A/B tests are the preferred way to estimate causal effects because random assignment removes confounding. Their average treatment effect (ATE) compares the average outcome under one treatment with the average outcome under another. Observational studies need additional assumptions and methods because treatment was not assigned at random. section 1.3.4 section 1.8
Website launch: before-and-after is not enough
Suppose traffic rises after a redesigned website launches. The redesign may have helped, but competitor actions and unknown changes may also have influenced visits. A causal analysis asks whether the new site changed traffic after accounting for relevant alternative causes; a simple before-and-after comparison cannot settle that question. section 1.3.1
For observational data, methods such as the adjustment formula aim to remove confounding effects; instrumental-variable methods use a variable that affects treatment but is unrelated to confounders. Method choice depends on the graph, available variables, and assumptions. Model accuracy or cross-validation error alone cannot validate a causal conclusion, since a key confounder may be missing. section 1.1.5 section 4.1.5
Prediction and intervention answer different questions
A hospital can predict which COVID-19 patients may soon need intensive care and use that forecast to prioritize treatment. To prevent intensive-care admissions, it instead needs to determine which factors causally affect severe illness—an intervention question requiring causal reasoning. section 4.1.1
Figure 1.1 Five steps in the typical process of causal inference
Use the five-step process as a checklist for moving from a causal question to an analysis that states its data, assumptions, and method. section 1.1

