Do-calculus is a set of three inference rules developed by Judea Pearl for transforming interventional probability distributions—those involving the do-operator—into standard observational distributions. This mathematical framework enables the estimation of causal effects from non-experimental data by systematically identifying when a causal query can be answered using only observed associations and the structure of a causal graph.
Glossary
Do-Calculus

What is Do-Calculus?
A symbolic manipulation system for deriving causal effects from observational data.
The rules govern the insertion and deletion of observations and interventions, allowing an analyst to reduce a complex causal estimand into a formula containing only estimable statistical quantities. If a causal effect is nonparametrically identifiable, do-calculus provides a complete algorithmic procedure for deriving the corresponding estimator, making it the foundational logic behind modern causal identification engines.
Core Characteristics of Do-Calculus
A formal axiomatic system for transforming interventional queries into estimable observational expressions, enabling causal effect estimation without randomized experiments.
The Three Rules of Do-Calculus
Judea Pearl's complete axiomatic system consists of three transformation rules that govern how the do-operator interacts with probabilistic relationships:
- Rule 1 (Insertion/Deletion of Observations): Allows adding or removing a variable from the conditioning set when the intervention and outcome are independent given that set
- Rule 2 (Action/Observation Exchange): Permits replacing an intervention with a conditioning observation when the causal effect is identifiable from the observational distribution
- Rule 3 (Insertion/Deletion of Actions): Enables removing or adding an intervention when it has no causal effect on the outcome variable
These rules are complete—any identifiable causal effect can be derived through their sequential application.
Graphical Criteria for Identifiability
Do-calculus provides a sound and complete algorithmic procedure for determining whether a causal effect can be estimated from observational data given a causal graph:
- The backdoor criterion identifies covariate sets that block spurious paths between treatment and outcome
- The front-door criterion handles cases where confounders are unobserved by using an intermediate mediator
- The do-calculus derivation systematically applies the three rules to transform P(y|do(x)) into an expression containing only observed variables
If no sequence of rule applications yields an expression free of do-operators, the effect is non-identifiable from the available data.
Intervention vs. Observation
The fundamental distinction that do-calculus formalizes is between seeing and doing:
- P(y|x): The conditional probability of observing outcome y given that variable X was observed to take value x—a passive observation
- P(y|do(x)): The probability of outcome y given that X was actively set to value x through external intervention, severing all incoming causal arrows to X
This distinction is critical in supply chains: observing that expedited shipping correlates with on-time delivery does not imply that forcing expedited shipping will cause on-time delivery if both are driven by a common cause like order priority.
Truncated Factorization Formula
When a causal effect is identifiable, do-calculus yields the truncated factorization or g-formula:
- The joint distribution under intervention do(X=x) is obtained by removing the factor P(X|parents(X)) from the factorization of the joint distribution
- The remaining conditional probabilities are multiplied and marginalized over all variables except the outcome
- This produces an expression computable entirely from observational data
For supply chain disruption analysis, this allows estimating the effect of forcing a supplier switch without actually executing it, using historical operational data and the causal graph structure.
Completeness and Decidability
Do-calculus possesses two critical theoretical properties that distinguish it from ad-hoc causal adjustment methods:
- Completeness: If a causal effect is identifiable from a given causal graph and available data, there exists a finite sequence of do-calculus rule applications that derives the identifying formula
- Decidability: The question of whether a causal effect is identifiable can be answered algorithmically in polynomial time for Markovian models (no unobserved confounders)
For models with latent variables, identifiability becomes more complex but remains decidable through extensions like the ID algorithm, which operationalizes do-calculus for practical computation.
Supply Chain Disruption Application
In autonomous supply chain intelligence, do-calculus enables counterfactual disruption analysis without experimentation:
- Root cause identification: Given an observed delivery delay, do-calculus can isolate whether the cause was a specific supplier failure versus a systemic logistics bottleneck
- Intervention planning: Estimate the causal effect of adding buffer inventory at a specific node without physically implementing the change
- What-if simulation: Compute P(on_time_delivery | do(supplier_switch=yes)) using only historical observational data and the causal graph
This transforms supply chain control towers from correlational dashboards into causal decision engines capable of prescribing optimal interventions.
Frequently Asked Questions
Clear answers to the most common questions about Judea Pearl's do-calculus and its role in estimating causal effects from observational data.
Do-calculus is a set of three inference rules developed by Judea Pearl that transforms interventional probability distributions—expressions containing the do(X=x) operator—into standard observational probability distributions. The rules govern the systematic addition or deletion of conditioning variables and the conversion of interventions to observations when specific graphical criteria are met in a Directed Acyclic Graph (DAG). Rule 1 permits the insertion or deletion of observations when the outcome and the variable are conditionally independent given the treatment and other covariates. Rule 2 allows the exchange of an intervention for an observation when the causal effect of the variable on the outcome is fully mediated through observed variables. Rule 3 permits the insertion or deletion of an intervention when the variable has no causal effect on the outcome. By applying these rules iteratively, an unidentifiable causal query can often be reduced to a formula containing only observed probabilities, enabling causal effect estimation without randomized experiments.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Core concepts that form the mathematical and graphical foundation for applying do-calculus to real-world causal identification problems.
Structural Causal Model
A formal framework defining causal relationships through structural equations and exogenous variables. An SCM represents the data-generating mechanism of a system, where each endogenous variable is a function of its direct causes and an unobserved noise term. Do-calculus operates on the SCM's induced graph to derive testable implications of interventions without requiring the full parametric form of the equations.
Directed Acyclic Graph
A graphical representation where nodes represent variables and directed edges encode direct causal relationships, with no feedback loops permitted. DAGs encode the conditional independence assumptions necessary for do-calculus to determine whether a causal effect is identifiable. The three rules of do-calculus manipulate these graphs by adding or removing edges and conditioning sets.
Backdoor Criterion
A graphical rule for identifying a sufficient set of covariates to block all spurious paths between treatment and outcome. When a set of variables satisfies the backdoor criterion, the interventional distribution P(y|do(x)) can be expressed as an observational adjustment formula. Do-calculus generalizes this concept to cases where simple backdoor adjustment is insufficient.
Counterfactual Reasoning
The process of estimating what would have happened to an outcome if a treatment had been different, given observed data. While do-calculus addresses interventional queries at the population level, counterfactuals extend this to individual-level queries. The three-step derivation—abduction, action, prediction—relies on the same SCM that do-calculus manipulates.
Causal Discovery Algorithm
A computational method that infers causal structures directly from observational data by testing conditional independencies. Algorithms like PC and FCI produce a partial DAG that constrains the possible causal structures. Do-calculus can then be applied to the learned graph to determine which causal effects are identifiable without experimental data.
Instrumental Variable
A variable that affects the treatment but has no direct effect on the outcome except through the treatment. IV methods identify causal effects in the presence of unobserved confounding—precisely the scenario where standard do-calculus adjustments fail. The IV graph structure creates a specific pattern that do-calculus can exploit for identification.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us