Interactive essays / 02
What changes
when you intervene?
Move from association to intervention. Untangle a misleading average, change a causal diagram, and inspect the counterfactual outcomes we normally cannot see.
Method A wins within every difficulty group.
Method B wins overall. Both statements can be true.
01 / A misleading average
Better in each group.
Worse overall.
Two repair methods handle easy and hard jobs. Method A succeeds on 90% of easy jobs and 30% of hard ones. Method B succeeds on 80% and 20%. A is better in both groups.
But A mostly receives hard jobs, while B mostly receives easy ones. Their overall success rates are 36% and 74%. Which method should the workshop choose?
The observed comparison answers which group did better under the existing assignment process. To choose a method, we want a different comparison: what would happen if the same population received A versus B?
Change who receives each method.
Rates within each difficulty group stay fixed. Only the group composition changes.
Observed success rates
A − B: −38.0 percentage points
Same target population
A − B: +10.0 percentage points
| Difficulty | Method A | Method B | A − B |
|---|---|---|---|
| Easy | 90% | 80% | +10 points |
| Hard | 30% | 20% | +10 points |
These are synthetic expected rates, not sampled outcomes. Standardizing the mix identifies a causal effect only under the assumptions below. The sliders retain both difficulty groups so the comparison has overlap.
This reversal is a form of Simpson’s paradox. Aggregation can change the apparent ranking when the groups have different compositions. The arithmetic alone does not tell you which variables to adjust for; the causal question and your knowledge of the process must guide that choice.
02 / Change the process
Seeing is not setting.
A causal diagram records assumptions about how variables influence one another. An arrow is a proposed causal direction, not merely a correlation. Here, difficulty influences both the chosen method and the chance of success: it is a confounder.
Observing method A leaves the assignment process intact. Intervening to set A replaces that process. In the diagram, the arrow into the method disappears; the other mechanisms stay the same.
Observe a choice, or set it.
This diagram uses the same success rates and target population as the experiment above.
The A group has its own difficulty mix. Difficulty still affects assignment.
“Set A” uses the target mix and assumes that difficulty is enough to remove confounding. A diagram states that assumption; drawing it does not prove it.
A randomized trial makes assignment independent of baseline causes of the outcome in expectation. Individual finite samples can still be imbalanced. The balance button above sets the expected mix exactly; it is not a simulated random trial.
Why not adjust for every variable you measured?
A pre-treatment common cause can create confounding. A mediator lies on the causal path: adjusting for it changes a total-effect question. A collider is a shared effect of two variables: conditioning on it can open a noncausal association.
For example, among machines selected for inspection because either age or noise triggers inspection, young machines may be unusually noisy. Selection itself can create that pattern. More adjustment is not automatically better.
03 / The missing comparison
The outcome you didn’t observe.
A causal effect compares potential outcomes: the outcome a unit would have under one action with the outcome that same unit would have under another.
For a particular job, let T(A) and T(B) be completion time under each method. Its effect is T(A) − T(B). We ordinarily observe only the outcome under the chosen method. The other is a counterfactual.
One job. Two possible outcomes. One observation.
A new four-job toy world measures completion time in hours. These values are separate from the success-rate example.
| Job | Time under A | Time under B | Observed method |
|---|---|---|---|
| Job 1 | 4 | ? | A |
| Job 2 | ? | 5 | B |
| Job 3 | 3 | ? | A |
| Job 4 | ? | 9 | B |
Question marks are unobserved outcomes. Swapping assignments changes what you observe, not the underlying potential outcomes.
Only the simulator knows both outcomes for every job. “Reveal” is a teaching privilege, not something an observational dataset lets you do.
The underlying average effect is −1 hour: the four individual differences are −2, +3, −1 and −4 hours. Under the first assignment, the observed group comparison is −3.5 hours. Swap who receives which method and it becomes +1.5 hours, even though the individual effects have not changed.
This is why causal identification needs more than computing a difference between group averages. Randomization, valid adjustment, or a defensible alternative research design connects the observable comparison to the counterfactual one.
04 / Identify the effect
The assumptions carry the claim.
In the workshop example, interpreting standardization causally requires three central conditions:
| Condition | What it means here |
|---|---|
| Exchangeability within groups | After accounting for difficulty, there is no remaining common cause of method assignment and success. |
| Positivity / overlap | Each target difficulty group can receive either method. We have comparable data for both choices. |
| Consistency | Receiving method A means the same well-defined intervention as “set A” in our question. |
We also assume one job’s method does not alter another job’s outcome, and that the group-specific rates apply to the target population. Shared equipment, hidden operator skill, or changing versions of a repair method could break these assumptions.
When randomization is impractical, designs such as regression discontinuity, difference-in-differences, and instrumental variables can help. Each replaces randomization with specific assumptions; none is a general correction button.
Use causal reasoning to evaluate product changes, education programs, or scientific explanations. Define the intervention, outcome, target population, and time horizon before choosing a statistical method.
Bayesian inference can quantify uncertainty within a causal model. It cannot establish the model’s causal assumptions from association alone. Mutual information can detect dependence without identifying its direction or cause.
05 / Retrieve & transfer
Which question did you answer?
Keep one idea
“Who did better?” and “What would change if we acted?” are different questions.
Explain the difference in your own words before checking below.
1. Why does A look worse overall?
A receives more hard jobs. The overall rates mix performance with population composition. Comparing both methods in the same target mix removes that particular composition difference.
2. Does a standardized +10-point difference prove A is better?
Only under the causal and transport assumptions. If operator skill affects both method choice and success and is not controlled by difficulty, the standardized contrast may still be confounded.
3. Transfer: after a randomized feature launch, should you compare only users who clicked it?
Usually that does not preserve the original randomized comparison. Clicking is a post-assignment behavior; selecting clickers can create selection bias. Start with the effect of assignment, then define and justify any different estimand.
4. Why can’t the counterfactual table be completed from one observed outcome per job?
The missing outcome was not observed. A model or design can support an average-effect estimate under assumptions, but it does not reveal both actual potential outcomes for each job.
Sources & scope
Follow the ideas back.
An introduction to average effects with two treatments, one measured confounder, and a binary success outcome. The separate potential-outcomes example uses hours. Neither example estimates sampling uncertainty or a dynamic treatment policy.
- Miguel Hernán & James Robins · Causal Inference: What If
Chapters 1–3 introduce counterfactuals and identification; chapters 6–8 develop diagrams, confounding and selection bias. The authors provide the current book freely. - Judea Pearl · Causality
The structural-model approach, causal diagrams, and intervention notation.
These are original teaching examples, not empirical datasets. This page makes no network requests and stores no answers. Its experiments work offline once downloaded; navigation and source links need the corresponding files or a connection.