liveBook · Manning

Intervention distribution

As explained in Causal AI

An intervention distribution is the probability distribution over variables induced by externally setting or changing one or more variables in a causal model.

When a decision changes the data-generating process, prediction from the original environment no longer answers the causal question. An intervention distribution describes the outcomes produced after externally setting one or more variables. For an ideal intervention, the target is fixed to a value and disconnected from its causal parents; stochastic interventions choose the value through a random process. Causal effects compare such distributions, as in ATE = E(Y|do(X=1)) − E(Y|do(X=0)). section 7.7

Operationalize an intervention distribution by:

  • Specify the target variable and intervention value, distinguishing external setting from merely conditioning on an observed value. section 7.7 section 13.3.3
  • Alter the causal model with an intervention operator: replace a structural assignment, perform graph surgery, or replace the target kernel with a point mass. section 7.7
  • Sample from the altered model to simulate experiments, estimate outcomes, or compare intervention distributions with observational and counterfactual distributions. section 7.7 section 9.3.4

Setting femur length in a Pyro model

Applying pyro.do(model, data={"femur": tensor(46.0)}) creates a hypothetical model in which femur length is fixed at 46 cm. Repeatedly calling that model generates samples from the corresponding intervention distribution. Supplying an inferred exogenous-variable distribution instead produces a counterfactual distribution conditioned on the actual world; comparing histograms makes the difference visible. section 9.3.4

int_model = pyro.do(model, data={"femur": tensor(46.0)})

Inspect the compact Pyro operation that fixes a causal variable before sampling from the altered model. section 9.3.4

How Causal AI covers it

How deep it goes
Descends from definition to SCM operators, graph surgery, probability kernels, and Pyro sampling, while leaving identification assumptions implicit.
Examples
Uses fixed femur length, generated height samples, and an LLM example contrasting conditioned and intervened story distributions.
What it assumes
Assumes familiarity with causal models and probability distributions while distinguishing conditioning from intervention through worked implementations.
What you can do after
Apply it via Pyro to construct intervention models, generate samples, and compare hypothetical outcomes with observational or counterfactual distributions.
How it connects
Connects intervention distributions to causal effects, stochastic interventions, observational distributions, counterfactual distributions, and graph surgery.

Also explained in

Compare how 2 books explain intervention distribution →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal AI. The section links point to the parts of the book it draws on.