Causal Inference Basics
From correlation to 'because of'
Causal inference is the discipline of estimating what would have happened differently if an intervention had or had not occurred. It is the difference between 'associated with' and 'drives', and it governs which levers deserve budget.
What you will learn
- Define the counterfactual and the causal question precisely
- Use DAGs to find confounders and selection bias
- Choose between A/B tests, natural experiments, and regression controls
What is this?
Causal inference asks: what would the outcome have been without the treatment? Since only one path is ever observed, causal questions need design and assumptions — a randomized experiment is the gold standard, and natural experiments, difference-in-differences, and controlled regression can approach the answer when randomization is impossible.
Why do you need it?
- Budget follows causality: you only double down on levers that genuinely move outcomes.
- Confounders can fake huge 'effects' in observational data.
- Asking the causal question sharply often saves the cost of a misguided A/B test.
Mental model
Correlation is noticing umbrellas and rain together
Causation is knowing the rain made you carry the umbrella
The rain (a common cause) drives both — the exact structure a confounder has, and exactly what causal analysis must untangle.
How it works
- State the counterfactual: outcome under treatment vs under no treatment for the same users.
- Draw a small causal diagram (DAG) of the variables to spot confounders and colliders.
- Choose the design: randomize if possible; otherwise use a natural experiment, before/after with a control, or regression controls.
- Estimate the effect and check the assumptions that make it credible.
A DAG separates causation from correlation and reveals confounders.
In production
- Growth decides which activation nudges actually raise D7 retention vs correlate with it.
- Pricing estimates elasticity without a matched-price test using regional variation.
- Platform teams estimate feature roll-out impact with difference-in-differences vs non-rolled countries.
Best practices
- Write the causal question before touching data — design should not follow the data's hint.
- Draw the DAG and question every arrow that sneaks in.
- Report effect estimates with their assumptions front and center (unconfoundedness, parallel trends).
Common mistakes
- Adjusting for variables that are actually outcomes of the treatment (overcontrolling), which biases the effect.
- Reading the regression of Y on X with confounders as a causal estimate without defending the DAG.
- Using a natural experiment whose 'intervention' also changed other things at once.
Debugging tips
- If the effect flips sign after adding a variable, return to the DAG — you may have adjusted a collider.
- If the parallel-trends plot shows the two lines diverging before the intervention, the design is broken.
Interview checkpoint
Quick quiz
The counterfactual is
Adjusting for a variable that is an outcome of treatment can