Quick answer
Causal inference estimates how an outcome would change if one specific thing were changed, with everything else as it would have been. It needs a research design and stated assumptions, because correlations in observed data cannot by themselves show cause and effect.
Formula: Unit effect = Y(1) − Y(0); ATE = E[Y(1) − Y(0)]; Wald estimate = difference in outcome ÷ difference in uptake between randomized arms
What is causal inference?
Causal inference is the work of estimating what would change in an outcome if you changed one specific thing, while everything else stayed as it would have been. "Accounts that use saved reports are retained more often" is an association. "Giving an account saved reports raises its chance of being retained by 5 points" is a causal claim. The second sentence needs more than the data in front of you: it needs a design and a set of assumptions you are willing to defend.
Judea Pearl draws the line this way. An associational concept, such as correlation, regression or conditional dependence, can be defined from the joint distribution of the variables you observe. A causal concept, such as effect, confounding or randomization, cannot be defined from that distribution alone. So no amount of extra rows turns a correlation into an effect. More data narrows the uncertainty around the association; it does not tell you which way the arrow points or what else is driving both sides.
A causal question has three parts that should be written down before any analysis:
- Treatment: the thing you could change (the feature, the price, the message), stated precisely enough that someone could actually do it.
- Outcome: what you measure and when (retained on day 30, not just "engagement").
- Population: for whom the answer should hold (new accounts, all active accounts, one plan).
Counterfactuals: the comparison you never observe
The standard framework imagines two potential outcomes for each unit: Y(1), what happens if it gets the treatment, and Y(0), what happens if it does not. The causal effect for that unit is Y(1) − Y(0). The catch is that only one of the two ever occurs. Paul Holland named this the fundamental problem of causal inference in 1986: you cannot observe both values on the same unit, so you cannot observe the effect on that unit.
Four hypothetical accounts make it visible. A question mark is the counterfactual, the outcome that did not happen:
| Account | Used the feature? | Retained if used, Y(1) | Retained if not used, Y(0) |
|---|---|---|---|
| A | Yes | Yes | ? |
| B | Yes | Yes | ? |
| C | No | ? | Yes |
| D | No | ? | No |
Holland's way out, which he calls the statistical solution, is to stop asking about single units and estimate an average over a group. The usual targets are:
| Estimand | Question it answers |
|---|---|
| Average treatment effect (ATE) | What if everyone in the population got it, compared with no one? |
| Average treatment effect on the treated (ATT) | How much did it do for those who actually got it? |
| Local average treatment effect (LATE) | What was the effect for units whose behavior a nudge or rule changed? |
| Conditional average treatment effect (CATE) | How does the effect differ by subgroup? |
The four can be different numbers in the same product. State which one you are estimating, because "the effect of the feature" is ambiguous without it.
Worked example: does a feature cause retention?
Sample data: 10,000 accounts, observed without any experiment. Some started using saved reports; the outcome is being active on day 30.
The naive comparison:
| Group | Accounts | Retained | Retention rate |
|---|---|---|---|
| Used saved reports | 3,300 | 2,004 | 60.7% |
| Did not use them | 6,700 | 2,554 | 38.1% |
The gap is 60.7% − 38.1% = 22.6 points. But busy accounts are both more likely to try a feature and more likely to stay. Activity before the feature appeared is a confounding variable. Split by it:
| Prior activity | Used: accounts, retained | Did not use: accounts, retained | Gap |
|---|---|---|---|
| High (4,000 accounts) | 2,400, 1,680 = 70% | 1,600, 1,024 = 64% | 6 points |
| Low (6,000 accounts) | 900, 324 = 36% | 5,100, 1,530 = 30% | 6 points |
Within each activity level the gap is only 6 points. To get one population figure, weight each stratum by its share of all accounts (40% high, 60% low), a step called standardization:
- Everyone uses it: 0.4 × 70% + 0.6 × 36% = 49.6%
- No one uses it: 0.4 × 64% + 0.6 × 30% = 43.6%
- Adjusted difference: 49.6% − 43.6% = 6.0 points
About 16.6 of the 22.6 points came from who chose the feature. The remaining 6 points are causal only if prior activity was the one thing that differed between users and non-users in a way that matters. If motivated teams adopt more and also stay longer regardless of activity, 6 is still too high. That assumption, often called no unmeasured confounding, cannot be tested from this table.
Randomization and the encouragement design
Random assignment removes the problem at its root: if a coin decides who gets the treatment, motivation, activity and everything you never thought of are balanced between arms on average. Any remaining difference is due to the treatment or to chance. That is why a controlled experiment is the reference design.
You often cannot force people to use a feature, but you can randomly encourage them. Sample data: a new cohort of 20,000 accounts, half shown an in-app prompt for saved reports.
| Arm | Accounts | Used saved reports | Retained on day 30 |
|---|---|---|---|
| Prompt | 10,000 | 6,000 (60%) | 4,500 (45.0%) |
| No prompt | 10,000 | 2,000 (20%) | 4,300 (43.0%) |
- Intention-to-treat effect (what the prompt did): 45.0% − 43.0% = 2.0 points, with a 95% interval of about 0.6 to 3.4 points.
- Uptake difference (what the prompt changed): 60% − 20% = 40 points.
- Wald estimate (what using the feature did for accounts that used it because of the prompt): 2.0 ÷ 0.40 = 5.0 points, roughly 1.6 to 8.4 once the interval is scaled the same way (a simple approximation).
This is a local effect, and it holds under extra assumptions: the prompt affects retention only through use of the feature (the exclusion restriction), and nobody is less likely to use the feature because they saw the prompt. The result rules out anything near 22.6 and is compatible with the adjusted 6. It says nothing directly about accounts that would adopt without any prompt or would never adopt.
Observational designs and the assumption each one buys
When randomization is impossible, each design replaces it with a specific assumption. Choose the design whose assumption you can argue for with knowledge of how the data was produced.
| Design | When it fits | Key assumption | Typical failure |
|---|---|---|---|
| Stratification or regression adjustment | The reasons for choosing treatment are measured | No unmeasured confounding | A motive nobody logged |
| Matching and propensity scores | Many covariates, enough overlap between groups | Same as above, plus overlap | Treated units with no comparable untreated unit |
| Difference-in-differences | A change reaches one group and not another, with data before and after | Both groups would have trended in parallel | A second change hits one group |
| Regression discontinuity | A rule assigns treatment at a cutoff (score, seat count) | Units cannot precisely control which side they land on | Customers gaming the threshold |
| Instrumental variable | Something shifts treatment but affects the outcome no other way | Exclusion restriction and relevance | A "nudge" that also informs or annoys |
| Interrupted time series | One series, one dated intervention, a long history | Nothing else changed at that date | A holiday or campaign in the same week |
| Synthetic control | One treated unit, several untreated ones | A weighted mix of others tracks it before the change | Poor fit in the pre-period |
Lee and Lemieux describe regression discontinuity as quasi-experimental for this reason: near the cutoff, assignment behaves like a local experiment, but only if units cannot manipulate their score precisely. Hernán and Robins organize much of their book around stating such identifying conditions before estimating anything.
A short decision rule: if you can randomize, randomize. If a rule or date created the groups, look for a design that exploits that rule or date. If people simply chose, adjustment is the fallback, and the result should be reported as conditional on the confounders you listed.
Causal inference vs correlation vs incrementality
| Correlation | Causal inference | Incrementality | |
|---|---|---|---|
| Question | Do the two move together? | What would changing X do to Y? | How much of the result would not have happened without this marketing activity? |
| Needs | Observed pairs | A design plus assumptions | A comparison group that did not get the activity |
| Output | A coefficient | An effect with its estimand and uncertainty | Incremental conversions or revenue |
| Scope | Any two variables | Any intervention | A causal question applied mostly to campaigns |
Incrementality testing is causal inference applied to marketing. For ways to tell the two apart in everyday reports, see correlation vs causation.
Common mistakes in causal analysis
- Adjusting for things the treatment caused. Sessions after adoption are partly an effect of the feature. Controlling for them removes some of the effect you want. Adjust only for variables fixed before treatment.
- Controlling for everything available. Some variables are colliders, influenced by both treatment and outcome; conditioning on them creates bias that was not there.
- Filtering to survivors. Studying only accounts still active today introduces selection bias.
- Reading a non-significant result as zero. An interval from −3 to +9 points is compatible with a large effect.
- Dropping the assumption from the sentence. "Raises retention by 6 points, assuming prior activity is the only confounder" is a different claim from "raises retention by 6 points".
- Carrying a local effect to everyone. The 5-point estimate above belongs to prompt-driven adopters.
Where TapCub fits
TapCub does not run A/B tests, assign treatments or compute causal estimates. It records behavior and lets you cut it, which covers the data side of the example above.
- Record the treatment as an event. Send an event such as
saved_report_createdwhen an account first uses the feature, and calltapcub.loginso people can be followed under one identity. - Build the comparison groups. In All-platform analytics › Users › Segments & tags, create rule segments with Did and Did not on that event. Add an Active condition over a fixed date range before the feature launched to separate high and low prior activity.
- Read retention by group. In All-platform analytics › Behavior › Retention, apply each segment as a cohort. Four groups give you the stratified table; the weighting is a few lines in a spreadsheet.
- If you randomize, log the arm. Let your own code decide who sees the prompt, send an event with the arm as a property, and build one segment per arm. Compare retention for everyone assigned, not only those who adopted.
Segments by person hold identified users only, and rule segments refresh daily, so check membership counts before reading rates.
Sources
- Paul W. Holland, Statistics and Causal Inference, Journal of the American Statistical Association 81(396), 1986.
- Judea Pearl, Causal inference in statistics: An overview, Statistics Surveys 3, 2009.
- Miguel A. Hernán and James M. Robins, Causal Inference: What If, Chapman & Hall/CRC.
- David S. Lee and Thomas Lemieux, Regression Discontinuity Designs in Economics, NBER Working Paper 14723.
Was this explanation clear?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

Data Analyst
Explores traffic sources, conversion funnels, and retention, using clear metric definitions and concrete examples to explain what the numbers mean.