SCIENCEYE BLOG

Contact

Causal Inference

26 min read

Updated on November 16, 2026
Painterly night scene of a man walking a forked path beside a translucent copy of himself under a constellation of linked lights representing observed and counterfactual outcomes

SHARE:

Introduction

Definition

Causal inference is the use of data and stated assumptions to estimate what would happen to an outcome if a treatment, exposure or behavior were changed.1 A causal effect compares two outcomes for the same people: the outcome they would have under one action and the outcome they would have under another.1 Causal inference is one of three tasks in data science. Description summarizes data, and prediction forecasts an outcome from the information at hand. Causal inference is counterfactual prediction: a forecast of the outcome under an action that may not have been taken.2

Context

For most of the twentieth century, judgments about cause rested on checklists. In 1965 Bradford Hill set out nine viewpoints, among them strength, consistency and temporality, for deciding whether an association reflects a cause.3 However, a formal language came later. In 1974 Donald Rubin showed how potential outcomes could define causal effects in both randomized and nonrandomized studies.4 Paul Holland then named the core difficulty: for any one person, only one potential outcome can ever be seen.5 James Robins built methods for treatments that change over time,6 causal diagrams entered epidemiology in 1999,7 and Judea Pearl joined these strands into structural causal models.8

Scope

This entry is a map of causal inference as a field. It defines the core ideas, sets out the main study designs and methods of analysis, explains the formal basis of identification, and reviews uses in health, exercise science and wearable technology. Each method named here, from propensity scores to instrumental variables, has more depth in its own entry. The SciencEye post Causality and Study Design gives a shorter introduction.

The causal inference workflowSix steps in a loop: ask a causal question; specify the target trial and the estimand; state the assumptions in a causal diagram; check that the effect is identified; estimate it with a fitting design and method; test sensitivity and triangulate. An arrow from step 6 returns to step 1, because a result that fails a sensitivity test sends the analyst back. Each box lights up in turn. From question to answer 1 Ask a causal question 2 Specify the target trial and estimand 3 State assumptions in a causal diagram 4 Check identification 5 Estimate with a fitting design 6 Test sensitivity and triangulate revise Each step has its own entry in the SciencEye wiki series. The causal inference workflowSix steps in a loop: ask a causal question; specify the target trial and the estimand; state the assumptions in a causal diagram; check that the effect is identified; estimate it with a fitting design and method; test sensitivity and triangulate. An arrow from step 6 returns to step 1, because a result that fails a sensitivity test sends the analyst back. Each box lights up in turn. From question to answer 1 Ask a causalquestion 2 Specify the targettrial and estimand 3 State assumptionsin a causal diagram 4 Checkidentification 5 Estimate with afitting design 6 Test sensitivityand triangulate Dashed line: revise and repeat
Figure 1. The causal inference workflow. A result that fails a sensitivity test sends the analyst back to the question or the design.

Detailed Explanation

Components

Every causal analysis, simple or complex, has the same six parts (Table 1). The first is the causal question, which names a treatment, an outcome, a population and a time frame. The second is the estimand, the exact quantity the question asks for. A common estimand is the average treatment effect (ATE): the average outcome if everyone were treated minus the average outcome if no one were.1 An analysis that never states its estimand can answer a different question from the one its authors meant to ask. In a review of 234 health studies that used causal diagrams, only 21% reported their target estimand.9

The third part is the set of assumptions that link the data to the estimand. Three are central. Exchangeability means the treated and untreated groups would have had the same outcomes had they received the same treatment, once measured confounders are taken into account. Positivity means every kind of person in the study had some chance of receiving each treatment. Consistency means the treatment is defined well enough that a person’s observed outcome equals their potential outcome under the treatment they received.1,10 In particular, randomization makes exchangeability hold by design. For that reason a well-run trial needs fewer assumptions than an observational study.1

The fourth part is a causal diagram, which makes the assumptions visible. A directed acyclic graph (DAG) draws each variable as a node and each assumed direct cause as an arrow. Rules applied to the graph then show which variables to adjust for and which to leave alone.7 The fifth part is estimation: the design and statistical method that turn data into a number. The sixth is sensitivity analysis, which asks how wrong the assumptions would need to be to change the conclusion.11 Together the parts form a cycle rather than a line. A result that fails a sensitivity test sends the analyst back to the question or the design.

The estimand also fixes how the analysis treats people who do not follow their assigned treatment. An intention-to-treat (ITT) effect compares groups as assigned, whatever each person later did. A per-protocol effect compares groups as if everyone had followed the protocol, which needs further assumptions and adjustment.10 A target trial makes this choice explicit before any data are analyzed. It also fixes time zero, the moment when eligibility is checked, treatment is assigned and follow-up starts. When these three moments do not coincide, an observational analysis can count time during which an outcome could not have occurred.12

ComponentWhat it isRoleExample
Causal questionTreatment, outcome, population and time frameSets what the study is forDo sitting breaks lower arterial stiffness in midlife adults?
EstimandThe exact quantity sought, such as the ATEFixes the form of the answerMean change in pulse wave velocity, breaks versus no breaks
Identifying assumptionsExchangeability, positivity, consistencyLink the data to the estimandRandom order of conditions in a crossover trial
Causal diagramVariables as nodes, assumed causes as arrowsShows what to adjust forAge and fitness drawn as confounders
EstimationDesign and statistical methodProduces the estimateMixed model fitted to crossover data
Sensitivity analysisTests of the assumptionsShows how fragile the result isE-value; negative control outcome

Table 1. The six components of a causal analysis. ATE, average treatment effect.

Variations

Causal methods differ mainly in how they earn exchangeability. Experimental designs create it by randomization. The parallel-group randomized controlled trial (RCT) is the reference standard. In a randomized crossover trial, each participant receives every condition in random order and serves as their own control. The Sitting with Interruption and Whole-Body Cardiovascular Health (SWITCH) study uses this design. It compares four 4-hour sitting conditions in 56 inactive adults aged 36 to 55, with change in aortic pulse wave velocity as its primary outcome.13 A crossover trial from the same research group found that an acute stressor, the Trier Social Stress Task, raised brachial-femoral pulse wave velocity compared with a time- and speech-matched control task.14

The micro-randomized trial (MRT) moves randomization into daily life. A phone or watch randomizes, many times a day, whether to deliver a prompt, so the effect of each prompt can be estimated close to when it happens.15

In contrast, observational designs must earn exchangeability by assumption and adjustment. Propensity score methods compare treated and untreated people who had the same estimated chance of treatment, given their measured traits.16 The post Propensity Score Matching: Causality Without a Trial works through an example. The g-methods of Robins handle treatments and confounders that change over time, a setting where ordinary regression gives biased answers.6 Target trial emulation frames an observational analysis as an attempt to copy the randomized trial that would answer the question. The trial’s eligibility rules, treatment strategies, start of follow-up and analysis plan are all written down first.10

A second family of methods, meanwhile, looks for variation that acts like randomization. An instrumental variable is a factor that shifts treatment but affects the outcome only through treatment. When its strong conditions hold, it can estimate an effect even with unmeasured confounding.17 Mendelian randomization uses genetic variants, which are allocated at conception, as instruments for modifiable exposures.18 Other variations, by contrast, change the question rather than the design. Mediation analysis splits a total effect into the part that runs through a named intermediate step and the part that does not; it needs extra assumptions about confounding of that intermediate.19 Methods for effect heterogeneity ask for whom an effect is larger. Causal forests, a machine learning method, estimate how an effect varies with a person’s traits while keeping valid confidence intervals.20

The same data can support a descriptive, a predictive or a causal analysis, and the label matters.2 In the Coronary Artery Risk Development in Young Adults (CARDIA) study, each daily hour of television viewing was linked to higher odds of hypertension five years later. The odds ratio was 1.14 (95% confidence interval [CI] 1.04 to 1.26), after adjustment for sociodemographic factors, body mass index and Physical Activity.21 The analysis estimates an association. Reading it as the effect of watching one hour less requires the assumptions above. The adjustment set must close every confounding path, every kind of person must have been able to watch more or less, and ‘one hour less’ must be a well-defined action. A causal framework does not make those assumptions true. It makes them explicit, so a reader can judge them.

Scientific Basis

The Formal Framework of Causal Inference

The potential outcomes framework writes Ya for the outcome a person would have if treatment A were set to the value a. For a yes-or-no treatment, each person has two potential outcomes, Y1 and Y0, and the individual causal effect is their difference.1 However, only one of the two is ever observed: the one under the treatment the person actually received. The other is counterfactual.5 Because individual effects cannot be seen, most analyses target averages. The ATE is E[Y1] − E[Y0]: the mean outcome if all were treated minus the mean outcome if none were.1

Identification is the step that links these unseen quantities to quantities the data can show. In a randomized trial, the treated group is a random sample of the whole population. Its mean outcome therefore estimates E[Y1], and the control group’s mean estimates E[Y0].1 In observational data the same link holds only within levels of the confounders L, and only if exchangeability, positivity and consistency hold. The mean potential outcome is then a weighted average of the observed means across those levels:

E[Ya] = Σl E[Y | A = a, L = l] × Pr[L = l]

This is standardization, the simplest case of the g-formula that Robins extended to treatments sustained over time.6 Propensity score methods aim at the same target by comparing people with similar chances of treatment rather than by averaging over strata.16

Treatments that change over time add a further difficulty. Suppose a clinician adjusts a drug dose in response to a patient’s blood pressure, and blood pressure also predicts the outcome. Blood pressure is then a confounder for later doses and a result of earlier ones. Adjusting for it in an ordinary regression blocks part of the effect of earlier doses, while leaving it out leaves later doses confounded. The g-methods resolve this by modeling each time point in turn.6 The same problem arises with Physical Activity, sleep and other behaviors that wearables record day after day.

Randomization earns exchangeability by design. Every other method earns it by assumption.

Structural causal models state the same ideas with equations and graphs. Each variable is a function of its direct causes plus independent noise. An intervention is written do(A = a): the equation for A is replaced by the constant a, which cuts every arrow into A.8 The question of identification then becomes a question about the graph. Pearl’s back-door criterion states that a set of variables Z is enough to adjust for if no member of Z is a descendant of A, and Z blocks every path between A and the outcome Y that begins with an arrow into A.8

Three kinds of path drive the rules (Figure 2). A confounder is a common cause of treatment and outcome. It opens a back-door path, so it must be adjusted for. A mediator lies on the causal path from treatment to outcome, so it should be left alone when the total effect is wanted. A collider is a common effect of two variables. It blocks a path until it is adjusted for, and adjusting for it opens the path and creates bias.7 A SciencEye post on using DAGs to find research gaps shows these rules at work on a real research question.

Confounder, mediator and colliderThree small causal diagrams. Panel A, confounding: L causes both the exposure A and the outcome Y, and A causes Y; adjust for L. Panel B, mediation: A causes M, which causes Y; do not adjust for M when the total effect is wanted. Panel C, collider: both A and Y cause C; do not adjust for C, because doing so opens a non-causal path. These are illustrative structures, not a diagram of any study. No arrow means no direct effect is assumed. A. Confounder L L A exposure Y outcome Adjust for L B. Mediator M M A exposure Y outcome Leave M alone C. Collider C A exposure Y outcome C Leave C alone Illustrative structures, not a study diagram. No arrow: no direct effect assumed. Confounder, mediator and colliderThree small causal diagrams. Panel A, confounding: L causes both the exposure A and the outcome Y, and A causes Y; adjust for L. Panel B, mediation: A causes M, which causes Y; do not adjust for M when the total effect is wanted. Panel C, collider: both A and Y cause C; do not adjust for C, because doing so opens a non-causal path. These are illustrative structures, not a diagram of any study. No arrow means no direct effect is assumed. A. Confounder L L A exposure Y outcome Adjust for L B. Mediator M M A exposure Y outcome Leave M alone C. Collider C A exposure Y outcome C Leave C alone Illustrative structures only. No arrow: no direct effect assumed.
Figure 2. Three paths that drive adjustment. A is the exposure and Y the outcome. Adjusting for a confounder closes a back-door path; adjusting for a mediator removes part of the effect; adjusting for a collider opens a biasing path. Illustrative structures, not a study diagram.

Evidence

The case for formal methods rests on examples where informal analysis failed and formal analysis repaired it. Observational studies had suggested that postmenopausal hormone therapy lowered the risk of coronary heart disease. The Women’s Health Initiative trial then found a higher risk in women assigned to estrogen plus progestin.22 Hernán and colleagues reanalyzed the observational Nurses’ Health Study as a sequence of emulated trials, each comparing women who started therapy with women who did not. The ITT hazard ratio (HR) was 1.42 (95% CI 0.92 to 2.20) for the first 2 years and 0.96 (0.78 to 1.18) for the whole follow-up, estimates similar to the trial’s.22

Similarly, statins and cancer followed the same pattern. In many observational studies, statin users had a much lower risk of cancer than in meta-analyses of randomized trials. In the electronic health records of 733,804 UK adults, an emulated target trial gave a 10-year difference in cancer-free survival of −0.5% (95% CI −1.0% to 0.0%) for the ITT analogue. Earlier analytic approaches gave estimates that appeared strongly protective.23 Much of the earlier bias was, in fact, self-inflicted. When the start of follow-up, the check of eligibility and the assignment of treatment do not line up, biases such as immortal time bias follow.12 Table 2 summarizes these and other key studies; the entry on meta-analysis explains how trial results are pooled.

StudyYearFindingDOI
Hernán et al.2008Nurses’ Health Study analyzed as emulated trials; ITT HR 0.96 (95% CI 0.78 to 1.18) over follow-up, similar to the trial2210.1097/EDE.0b013e3181875e61
Hernán et al.2016Framework that prevents immortal time bias by aligning eligibility, assignment and start of follow-up1210.1016/j.jclinepi.2016.04.014
Dickerman et al.2019733,804 UK adults; emulated trial of statins gave −0.5% (95% CI −1.0% to 0.0%) in 10-year cancer-free survival2310.1038/s41591-019-0597-x
Klasnja et al.2019Micro-randomized trial; walking suggestion raised 30-minute step count by 24% (59 steps)2410.1093/abm/kay067
Tennant et al.2021234 studies using DAGs; 21% stated the estimand and 48% the adjustment set910.1093/ije/dyaa213

Table 2. Key studies on causal design and analysis. CI, confidence interval; DAG, directed acyclic graph; HR, hazard ratio; ITT, intention to treat.

Current Understanding

There is broad agreement on three points. First, a causal question should be stated as such, with its estimand, rather than hidden behind the word association.2 Second, an observational analysis should be judged by how well it emulates a target trial.10 Third, no single method settles a causal question. Triangulation compares results from approaches whose main biases differ. When biases would push the results in opposite directions and the results still agree, confidence in a causal effect rises.25

Negative controls add a direct check. An exposure that cannot cause the outcome, or an outcome that the exposure cannot affect, should show no association. An association that does appear flags confounding or another bias.26 The E-value adds a check on unmeasured confounding.11 Debate continues over how far a single formal framework should shape the field, as the section on controversies sets out.

Clinical and Practical Applications

Relevance

Causal inference matters because health decisions are causal decisions. A clinician choosing a drug, a public health agency setting guidance on sitting and a product team deciding whether to send a reminder all need to know what will happen if they act. Prediction alone cannot tell them.2 The post Why Machine Learning Can’t Answer ‘What If?’ explains why.

The Apple Heart Study shows the line between the two tasks. It enrolled 419,297 participants, and 0.52% received an irregular pulse notification from a smartwatch. Among notified participants, the positive predictive value of a later notification for atrial fibrillation, seen at the same time on an electrocardiography (ECG) patch, was 0.84 (95% CI 0.76 to 0.92).27 Those figures answer a question about detection. Whether notification improves health is a causal question. The authors described their remote, pragmatic design as a foundation for studies that measure such outcomes with user-owned devices.27

Wearables also make new causal designs possible. A watch can randomize and measure within the same day, so it can estimate effects on a scale of minutes. In the HeartSteps MRT, 44 adults received tailored activity suggestions up to five times a day for 6 weeks. A walking suggestion raised the step count over the next 30 minutes by 24% (59 steps) on average. The effect was larger at the start of the study and faded over time, and anti-sedentary suggestions had no detectable effect.24 Thus, results of this kind tell designers not only whether a prompt works but when it stops working. A SciencEye post on causal machine learning covers the machine learning side of the same question.

Measurement

A causal effect is reported on a stated scale. For a yes-or-no outcome, the risk difference gives the absolute change in risk and the risk ratio gives the relative change. Survival analyses often report hazard ratios, which compare event rates at each moment. For a continuous outcome such as pulse wave velocity, the effect is a mean difference in the outcome’s own units. Every estimate needs its confidence interval, and the P-value entry explains why a p-value alone cannot carry the result. Estimands also differ in whom they describe: everyone in the population, only those who were treated, or the people who share given traits. The last is the conditional average treatment effect (CATE).20 Table 3 links common methods to the estimand each targets and the assumption each depends on most.

Reporting both absolute and relative effects helps readers judge size. In HeartSteps, the effect of a walking suggestion was 59 extra steps in 30 minutes, a relative rise of 24% over what would otherwise have been taken.24 The analysis matched the design: because the same person was randomized many times, the trial used a centered and weighted least-squares method that compares each person’s step counts after a prompt with their counts after no prompt.24 In the same way, a crossover trial compares conditions within each participant, so differences between people do not enter the estimate of the effect.

MethodTypical estimandKey assumptionTypical use
Randomized trial, parallel or crossoverATE in the trial populationRandomization holds; little dropout or crossover carry-overEfficacy of an intervention13
Micro-randomized trialShort-term effect of a promptRandomization at each decision pointPrompts on phones and watches15
Propensity score methodsATE or effect in the treatedNo unmeasured confounding; positivityTreatment comparisons in health records16
G-methodsEffect of a sustained strategyExchangeability at each time pointTreatments that change over time6
Target trial emulationObservational analogue of ITT or per-protocol effectEligibility, assignment and follow-up alignedComparative effectiveness in big data10
Instrumental variables, Mendelian randomizationEffect in a subgroup, or the ATE under extra assumptionsInstrument conditionsWhen confounders are unmeasured17,18
Causal forestsCATENo unmeasured confounding; overlapFinding who benefits most20

Table 3. Common methods, the estimand each targets and the assumption each depends on most. ATE, average treatment effect; CATE, conditional average treatment effect; ITT, intention to treat.

Good Practice

Guidance on causal inference for applied researchers converges on a short sequence (Figure 3). State the causal question and the estimand in plain words. Write down the target trial the analysis would emulate: eligibility, treatment strategies, assignment, start and end of follow-up, outcome and analysis plan.10 Draw a causal diagram from subject knowledge, report it, and report the adjustment set it implies. In the review of applied studies, only 48% reported their adjustment sets and 62% made a diagram available.9

Next, choose an estimation method that fits the question and the data. Then test the result. The E-value is the minimum strength of association, on the risk ratio scale, that an unmeasured confounder would need with both treatment and outcome to explain an estimate away. Its authors recommend reporting it for the estimate and for the confidence limit closest to the null.11 A result that survives these steps still rests on assumptions, but the reader can see which ones.

Finally, language is part of good practice. Authors who want a causal answer but describe their estimate only as an association leave readers unsure what was estimated. A clear causal aim makes the question sharper, the analysis easier to check and the conclusions easier to judge.2 In exercise science the same sequence links laboratory work to policy. A crossover trial can show that breaking up sitting changes a vascular marker within hours, and the SWITCH study was designed to inform a later trial and sitting guidance.13

Choosing a causal designA decision tree. First question: can the treatment be randomized? If yes and decisions recur many times a day, use a micro-randomized trial; otherwise use a randomized controlled or crossover trial. If it cannot be randomized: are the key confounders measured? If yes, emulate a target trial, using propensity scores or standardization for a fixed treatment and g-methods for a treatment that changes over time. If not: is there a valid instrument? If yes, use instrumental variables or Mendelian randomization. If not, bound the bias with sensitivity analysis, negative controls and triangulation. Can the treatmentbe randomized? Yes No Many decisionsa day? Yes No Micro-randomized RCT orcrossover Key confoundersmeasured? Yes No Emulate a target trial.Treatment varies? No Yes Propensity score,standardization G-methods Validinstrument? Yes No Instrumental var.or Mendelian rand. Bound thebias Every route ends withsensitivity analysis. Choosing a causal designA decision tree. First question: can the treatment be randomized? If yes and decisions recur many times a day, use a micro-randomized trial; otherwise use a randomized controlled or crossover trial. If it cannot be randomized: are the key confounders measured? If yes, emulate a target trial, using propensity scores or standardization for a fixed treatment and g-methods for a treatment that changes over time. If not: is there a valid instrument? If yes, use instrumental variables or Mendelian randomization. If not, bound the bias with sensitivity analysis, negative controls and triangulation. Can the treatment be randomized? Yes, decisions many times a day: Micro-randomized trial Yes, otherwise: RCT or crossover trial No: Key confounders measured? Yes, fixed treatment: Target trial + propensity score Yes, treatment varies: Target trial + g-methods No: Valid instrument? Yes: IV or Mendelian rand. No: Bound the bias Every route ends with sensitivity analysis.
Figure 3. A simplified guide to choosing a causal design. Real choices also weigh cost, ethics and the estimand. IV, instrumental variables; RCT, randomized controlled trial.

Controversies and Limitations

Debates

The main debate is about scope. Vandenbroucke, Broadbent and Pearce argue that a restricted version of the potential outcomes approach can narrow the questions epidemiologists ask, the designs they consider and the evidence they accept.28 Krieger and Davey Smith argue that no single approach should drive the questions asked. In their phrase, diagrams are useful but should not alone wag the causal tale, and they propose inference to the best explanation as a broader frame.29 In a commentary titled ‘misguided or misrepresented?’, Daniel, De Stavola and Vansteelandt defend the formal approach against these critiques.30 Table 4 sets out the positions.

Even so, the two sides share more than the debate suggests. Hill’s viewpoints remain in use, and he himself warned that none of them can bring indisputable evidence for or against a cause.3 Triangulation offers common ground: it asks for agreement across methods whose biases differ, which both formal and pluralist camps accept.25 The practical disagreement is narrower. It is about whether questions that cannot be framed as a well-defined intervention, such as the effect of a social position, still count as causal questions.28,29

PositionMain claimSource
PluralismA restricted potential outcomes approach can narrow questions, designs and acceptable evidenceVandenbroucke et al.28
Inference to the best explanationNo single approach should drive the questions; diagrams should not alone decideKrieger and Davey Smith29
Formal approach defendedDefends the formal approach against these critiquesDaniel et al.30
TriangulationAgreement across methods with different biases builds confidenceLawlor et al.25

Table 4. Positions in the debate on causal inference in epidemiology.

Limitations

Formal methods do not remove the core limit of observational data: the key assumptions cannot be tested with the data alone. No analysis can prove that no confounder was missed, and the conditions for an instrument are strong and often in doubt.17 Positivity fails when some kinds of people never receive a treatment, and estimates for them then rest on extrapolation. Open problems include methods for continuous, high-frequency exposures from wearables, and ways to combine trial and real-world data without importing the biases of either.

In addition, each method has its own weak point. Mendelian randomization fails when a genetic variant affects disease through more than one pathway, or when no suitable variant exists for the exposure of interest.18 Effects estimated in one population may not carry over to another whose members differ in the factors that modify the effect. Exposures measured by a device carry measurement error, and an effect estimated from a noisy exposure can be biased toward or away from the null. Causal inference is therefore best read as a discipline for making assumptions explicit and testable where possible. It turns a vague claim of cause into a precise claim whose weak points a reader can find.

Leave a Reply

Your email address will not be published. Required fields are marked *