Methods note: Reviewed September 4, 2026. Software and flexible prediction do not create causal identification; estimates remain conditional on a question, design, data, and assumptions.

Prediction estimates an outcome for observations from a specified setting. Causal inference asks how an outcome would differ under defined treatment strategies. Machine learning can estimate flexible nuisance functions or heterogeneous effects inside a causal design, but it does not make a system “understand” cause and effect.

Define the estimand before choosing an estimator

Specify the population, eligibility, treatment versions, comparator, outcome, time zero, follow-up, and effect measure. An average treatment effect and an effect among treated people answer different questions. Individual counterfactual outcomes are not jointly observed, so a model prediction should not be presented as a person’s known causal effect.

State the identification strategy

  • Randomization: assignment can identify an intention-to-treat effect when implementation, missing outcomes, interference, and analysis are handled appropriately.
  • Measured-confounding adjustment: requires consistency, conditional exchangeability, positivity, correct timing and measurement, and a sufficient adjustment set.
  • Natural experiments: instrumental variables, regression discontinuity, and difference-in-differences each require design-specific assumptions and diagnostics.

A directed acyclic graph records assumptions; it does not discover truth from data. Avoid controlling for mediators, colliders, or post-treatment variables merely because they improve prediction. Propensity-score matching does not recreate randomization or remove unmeasured confounding.

Where machine learning can help

Flexible models can estimate outcome regressions, propensity scores, or conditional effects. Doubly robust and double/debiased methods can reduce sensitivity to some nuisance-model errors under their stated conditions; they do not rescue an unidentified effect. Cross-fitting helps control overfitting bias but does not fix measurement error, interference, selection, or absent overlap.

Causal forests estimate conditional average effects under assumptions. Treat discovered heterogeneity as uncertain, especially after extensive subgroup searching; use honest estimation, report intervals, and validate important patterns on independent data.

A reproducible workflow

  1. Specify population, strategies, outcome, time zero, follow-up, contrast, and estimand.
  2. Choose randomization or a defensible observational design and draw a graph including selection, censoring, and timing.
  3. State consistency, exchangeability or design-specific assumptions, positivity, and interference.
  4. Pre-specify preprocessing, nuisance models, cross-fitting, missingness, variance estimation, and subgroup analysis.
  5. Check overlap, balance, weights, attrition, protocol deviations, negative controls, model diagnostics, and influential observations.
  6. Run design-appropriate falsification and quantitative sensitivity analyses. Passing a refutation test cannot prove the assumptions.
  7. Report code and versions, exclusions, estimates with uncertainty, limitations, and the population to which results may transport.

Example interpretations

In marketing, define exposure timing, interference, targeting, lagged outcomes, and the measured-confounding assumption. In product experiments, random assignment supplies the design; use causal ML only for carefully planned heterogeneity. In healthcare, emulate a target trial when randomization is unavailable and acknowledge residual confounding rather than calling the result equivalent to a trial.

Before acting on an estimate

Separate statistical uncertainty from uncertainty about the design and assumptions. Consider harms, equity, privacy, feasibility, and external validity. A causal estimate informs a decision; it does not automatically justify deployment.

Related guides: data science fundamentals, bias and variance, and AI governance best practices.