TapCub is live — analytics, insights and live chat, free on one platform
Glossary

Causal Inference: From Correlation to Effect

What causal inference is, why counterfactuals make it hard, and a feature-adoption example where a 22.6-point retention gap shrinks to 6 points once prior activity is accounted for.

Su He Reviewed by Ethan Brooks Also called causal analysis Last updated Dec 3, 2026 Glossary

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:

AccountUsed the feature?Retained if used, Y(1)Retained if not used, Y(0)
AYesYes?
BYesYes?
CNo?Yes
DNo?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:

EstimandQuestion 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:

GroupAccountsRetainedRetention rate
Used saved reports3,3002,00460.7%
Did not use them6,7002,55438.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 activityUsed: accounts, retainedDid not use: accounts, retainedGap
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.

ArmAccountsUsed saved reportsRetained on day 30
Prompt10,0006,000 (60%)4,500 (45.0%)
No prompt10,0002,000 (20%)4,300 (43.0%)
  1. 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.
  2. Uptake difference (what the prompt changed): 60% − 20% = 40 points.
  3. 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.

DesignWhen it fitsKey assumptionTypical failure
Stratification or regression adjustmentThe reasons for choosing treatment are measuredNo unmeasured confoundingA motive nobody logged
Matching and propensity scoresMany covariates, enough overlap between groupsSame as above, plus overlapTreated units with no comparable untreated unit
Difference-in-differencesA change reaches one group and not another, with data before and afterBoth groups would have trended in parallelA second change hits one group
Regression discontinuityA rule assigns treatment at a cutoff (score, seat count)Units cannot precisely control which side they land onCustomers gaming the threshold
Instrumental variableSomething shifts treatment but affects the outcome no other wayExclusion restriction and relevanceA "nudge" that also informs or annoys
Interrupted time seriesOne series, one dated intervention, a long historyNothing else changed at that dateA holiday or campaign in the same week
Synthetic controlOne treated unit, several untreated onesA weighted mix of others tracks it before the changePoor 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

CorrelationCausal inferenceIncrementality
QuestionDo the two move together?What would changing X do to Y?How much of the result would not have happened without this marketing activity?
NeedsObserved pairsA design plus assumptionsA comparison group that did not get the activity
OutputA coefficientAn effect with its estimand and uncertaintyIncremental conversions or revenue
ScopeAny two variablesAny interventionA 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.

  1. Record the treatment as an event. Send an event such as saved_report_created when an account first uses the feature, and call tapcub.login so people can be followed under one identity.
  2. 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.
  3. 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.
  4. 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

Was this explanation clear?

We use your answers to fix and expand this page.

Su He

Data Analyst

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

FAQ

Questions people ask

Short answers to the follow-up questions that come up most.

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

What is the difference between correlation and causal inference?

Correlation describes how two observed variables move together. Causal inference asks what would happen to one if you changed the other, which requires a design such as randomization or an explicit assumption such as no unmeasured confounding. In the sample here, a 22.6-point retention gap becomes 6 points after adjusting for prior activity.

What is a counterfactual?

It is the outcome that would have happened under the choice not taken. For an account that used a feature, the counterfactual is whether it would have been retained without it. It is never observed for the same unit, so analysts estimate averages across comparable groups instead.

Can you do causal inference without an experiment?

Yes, but each method replaces randomization with an assumption. Adjustment assumes all confounders are measured, difference-in-differences assumes parallel trends, and regression discontinuity assumes units cannot precisely control their position at a cutoff. The conclusion is only as credible as the assumption.

What is the fundamental problem of causal inference?

Paul Holland's 1986 name for the fact that you cannot observe the same unit both with and without a treatment at the same time. The individual effect is therefore never directly observable; randomization and other designs estimate average effects across groups.

See this number on your own site

Add one script tag for web and apps, and the first reports fill in within minutes.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics