This is the central puzzle: counterfactuals are untestable, yet we reason about them constantly. How?
Blaise Pascal wrote in 1669: "Had Cleopatra's nose been shorter, the whole face of the world would have changed." He was claiming that a hypothetical alteration—a shorter nose—would have cascaded into historical consequences. Julius Caesar and Mark Antony both found Cleopatra attractive, and their judgments shaped Rome's political destiny. Had Cleopatra's appearance been different, their decisions might have differed, and the empire might have developed along entirely different lines. The claim is untestable. We have one Cleopatra and one history. We cannot rerun the first century BCE with a differently proportioned queen to see what happens. The counterfactual world Pascal invokes is, by definition, unavailable for empirical inspection. Yet this kind of reasoning is inescapable. Legal systems ask if an injury would have occurred but-for a defendant's negligence. Doctors ask what would happen if we chose a different treatment. Historians constantly ask what-if. Parents wonder if they should have said something different. Counterfactual reasoning is as natural as breathing. And it is also the hardest kind of causal reasoning to do rigorously. This chapter teaches how.
In all cases, we ask: what would have happened in a world that did not occur? This is the third rung of the causal ladder.
Counterfactual questions appear everywhere in practice. In law, the concept of "but-for causation" is foundational: was the injury caused by the defendant's action, or would it have occurred anyway? The answer hinges on a counterfactual. In medicine, the choice of treatment for an individual patient rests on counterfactual reasoning: if we give aspirin versus ibuprofen, what would each outcome look like? In policy, we ask whether a specific outcome—economic growth, crime reduction, poverty alleviation—would have been different under an alternative policy. What makes counterfactuals hard is that we observe only one branch of reality. We see what actually happened, never what would have happened. Yet we must make decisions. Legal judgments, medical choices, policy reforms, and personal regrets all turn on our ability to reason rigorously about counterfactuals. The third rung of the causal ladder—what would have happened—is where the most consequential questions live.
This notation Y_x denotes "the value of Y if X had been set to x." It is well-defined even though unobserved.
A counterfactual is formally written as Y_x, pronounced "Y under x." It denotes the value that Y would have taken if X had been set to x. Start with an example. Joe took aspirin and his headache went away. We observe X equals aspirin, Y equals no headache. Now ask the counterfactual: what would Joe's headache status be if he had not taken aspirin? Call this Y_no aspirin. It is unobserved—we cannot see into that branch of reality. Yet it is well-defined. Either Joe's headache would have persisted, in which case Y_no aspirin equals headache, or it would have cleared on its own, in which case Y_no aspirin equals no headache. The causal effect of aspirin on Joe is the contrast between these two potential outcomes: Y_aspirin minus Y_no aspirin. If the contrast is zero, aspirin had no effect on Joe. If it is positive, aspirin cured his headache. This is the fundamental unit of causal reasoning at the third rung—the comparison of what happened to what would have happened.
This is the fundamental problem of causal inference: we cannot observe both slices of reality for the same person, at the same time. Yet we reason from one to estimate the other.
This is Judea Pearl's fundamental problem of causal inference, and it cuts to the heart of why counterfactuals are hard. For any individual, we observe either the factual outcome—what actually happened—or a counterfactual outcome—what would have happened under a different condition. We never see both. We observe Joe's headache with aspirin, but not without it. We observe Jane's outcome under treatment, but not her outcome had she been a control. We observe one slice of reality, never the alternative. This asymmetry seems like a fatal barrier. How can we make causal claims if we can never observe the counterfactual comparison? Yet we can. The key is that while we cannot observe both factual and counterfactual outcomes within a single individual, we can use the factual outcomes of many individuals to infer something about the counterfactual outcomes of specific individuals. This is the bridge that potential outcomes and causal models provide.
Jerzy Neyman introduced this framework in 1923 for agricultural experiments. Donald Rubin extended it in the 1970s to create the Neyman-Rubin or Rubin causal model.
The potential outcomes framework, formalized by Jerzy Neyman in 1923 and later extended by Donald Rubin from the 1970s onward, solves this by changing how we think about outcomes. Instead of a single outcome Y, associate each individual with a vector of potential outcomes, one for each possible treatment assignment. If there are two treatments—treated and control—then each person carries Y of one and Y of zero. Joe has both Y_aspirin and Y_no aspirin. He actually took aspirin, so we observe Y_aspirin. But Y_no aspirin exists as a quantity, even though unobserved. Same for Jane under control: we see her Y_zero but not her Y_one. This reframing is powerful. It formalizes the counterfactual as a defined random variable. We can now ask: what can we learn about the unobserved potential outcomes from the observed ones? The answer depends on causal assumptions, which we encode in our causal model.
Intervention questions (rung 2) can be answered by experiment. Counterfactual questions (rung 3) are about the specific individual and cannot be resolved by experiment alone.
There is a critical distinction between the individual causal effect and the population average causal effect. The individual effect on Joe is the contrast Y_aspirin minus Y_no aspirin. This is what Joe cares about: would this specific treatment have helped me? But we cannot directly observe this contrast. We see only one branch. The population average causal effect is the expected value across all people: E of Y one minus E of Y zero. This is what a randomized experiment measures. Run the experiment, give half the people aspirin and half placebo, compare the average outcomes. You now have an unbiased estimate of the population ATE. But that average tells us nothing about Joe individually. Joe's individual effect could be zero, positive, or negative, even if the population average is large. Counterfactual reasoning asks about the individual effect—the most practically relevant question. And it cannot be answered by experiment alone, only through causal modeling.
Counterfactuals are the hardest kind of causal reasoning, but also the most natural. They live on the top rung.
Causal reasoning lives on three rungs of a ladder. The first rung is association: what is the relationship between X and Y in the data? This is purely observational. Does coffee correlate with alertness? Easy to answer: look at people who drink coffee and compare their alertness to those who do not. But association is not causation. The second rung is intervention: if I do X, what happens to Y? This requires thinking about manipulation. If I force someone to drink coffee, what follows? This can be answered experimentally: randomize coffee consumption, measure alertness. The causal effect under intervention. The third rung is counterfactual: what if I had done X in the past? Given that someone drank coffee, would they have been tired without it? This is retrospective and personal. Experiments cannot answer this because they are forward-looking and cannot replay the past for the same individual. Counterfactuals are the hardest rung, but also the most natural to human reasoning.
Given a causal model and factual observations, we can estimate what would have happened under counterfactual conditions. The model acts as the bridge from the observable to the unobservable. This is the computational core of the chapter.
The remarkable fact is that counterfactuals, though unobservable, are tractable. Given a causal model and observed data, we can compute estimates of counterfactual outcomes. The causal model acts as a bridge from the observable world to the unobservable one. Here is the flow: we begin with observed data, specify a causal model that encodes our assumptions about how variables relate, apply that model to the data, and extract counterfactual predictions. The model might be a set of structural equations, a causal graph, or a simulation. The details vary. But the principle is constant: the model encodes knowledge about causal mechanisms. Given Joe's observed treatment and outcome, and given our model, we can estimate what Joe's outcome would have been under the alternative treatment. The model fills in the missing counterfactual. This is why mastering causal modeling is essential to counterfactual reasoning.
Mediation analysis is disguised counterfactual reasoning. It asks: had M not changed, what would Y be? This is a counterfactual question answered using the potential outcomes framework.
Mediation analysis is the problem of decomposing a causal effect into direct and indirect pathways. Suppose X affects Y, and we suspect it does so partly directly and partly by changing an intermediate variable M. For instance, education might increase earnings both directly—educated workers are more productive—and indirectly, by increasing self-confidence, which then increases earnings further. Mediation asks: how much of the total effect of education on earnings flows through self-confidence? This is actually a counterfactual question in disguise. It asks: had self-confidence not changed, what would earnings be? This is Y under a counterfactual intervention. The potential outcomes framework addresses it by comparing Y_x,m with Y_x,m prime—the outcome under treatment X, but with the mediator fixed to different levels. Mediation analysis reveals the hidden mechanisms through which causes operate.
Counterfactual methods ask questions no other framework can answer. They are hard to execute rigorously, but essential to human reasoning about causation.
The ideas in this chapter connect to form a coherent approach to the hardest causal questions. The fundamental problem tells us why counterfactuals are needed: we must make decisions based on unobserved alternatives. The potential outcomes framework formalizes these alternatives as well-defined random variables, one per treatment per person. The ladder of causation situates counterfactuals at the third rung, the highest and most difficult to reach. Causal models provide the machinery to compute counterfactuals from data. They encode causal assumptions—often written as structural equations or DAGs—and allow us to bridge from observed to unobserved. Mediation analysis applies this machinery to the decomposition problem: what fraction of an effect is direct versus indirect? These concepts are not separate; they form a unified framework for counterfactual reasoning. The payoff is the ability to answer questions that no other method can.
Potential outcomes framework formalizes this: each person carries a vector of possible outcomes, one for each treatment. Causal models allow us to estimate those we never observe. Mediation analysis is the art of decomposing effects into pathways through hidden mechanisms.
The central insight of this chapter is that counterfactual reasoning, though it requires comparing two branches of reality we can never both observe, is essential and tractable. Counterfactuals live on the third rung of the causal ladder because they ask what would have happened under a hypothetical intervention in a specific individual. This is different from both association and average causal effects. The potential outcomes framework gives us the vocabulary: Y_x as the outcome under the counterfactual treatment x. The fundamental problem of causal inference—observing only factual or counterfactual, never both—is the constraint we must work within. Yet given a causal model, we can estimate the unobserved outcomes from the observed data, under certain assumptions. Mediation analysis shows how to apply these tools to the practical question of decomposing effects. Counterfactual reasoning is hard, abstract, and essential.
Causal Inference · Chapter 8 · Counterfactuals and Mediation
This chapter has introduced you to the formal framework for counterfactual reasoning, the hardest and most powerful kind of causal inference. You have learned what counterfactuals are, how they live at the third rung of the causal ladder, why they are essential to medicine, law, and policy, and how causal models make them tractable. Potential outcomes and mediation analysis are the practical tools you will use to reason about unobserved worlds. The reward is the ability to answer the questions that matter most: what would have happened if things had been different?