21.1 The Formal Notation of Causality
A common mistake is defining causation using probability:
X causes Y if P(Y|X)>P(Y).
Seeing X (1st level) doesn’t mean the probability of Y increases.
It could be either that
- X causes Y, or
- Z affects both X and Y. We might be able use control variables - P(Y|X,Z=z)>P(Y|Z=z). But then the question becomes
- How to choose Z?
- Did you choose enough Z?
- Did you choose the right Z?
Hence, the previous statement is incorrect. The correct causal statement is:
P(Y|do(X))>P(Y).
With causal diagrams and do-calculus, we can formally express interventions and answer questions at the 2nd level (Intervention).
Pearl (2019) also introduce the Pearl’s Structural Causal Model (SCM) framework for causal inference (Pearl 2019):
- Encoding Causal Assumptions – Using causal graphs for transparency and testability.
- Do-Calculus – Controlling for confounding using the backdoor criterion.
- Algorithmization of Counterfactuals – Modeling “what if?” scenarios.
- Mediation Analysis – Understanding direct vs. indirect effects.
- External Validity & Adaptability – Addressing selection bias and domain adaptation.
- Handling Missing Data – Using causal methods to infer missing information.
- Causal Discovery – Learning causal relationships from data using:
- d-separation
- Functional decomposition (Hoyer et al. 2008)
- Spontaneous local changes (Pearl 2014)
To explore causal inference in R, check out the CRAN Task View for Causal Inference:
For further reading:
- The Book of Why – Judea Pearl (Pearl and Mackenzie 2018)
- Causal Inference in Statistics: A Primer – Pearl, Glymour, Jewell
- Causality: Models, Reasoning, and Inference – Judea Pearl
References
Hoyer, Patrik, Dominik Janzing, Joris M Mooij, Jonas Peters, and Bernhard Schölkopf. 2008. “Nonlinear Causal Discovery with Additive Noise Models.” Advances in Neural Information Processing Systems 21.
Pearl, Judea. 2014. “Graphical Models for Probabilistic and Causal Reasoning.” Computing Handbook, 3rd Ed.(1), 44–41.
———. 2019. “The Seven Tools of Causal Inference, with Reflections on Machine Learning.” Communications of the ACM 62 (3): 54–60.
Pearl, Judea, and Dana Mackenzie. 2018. The Book of Why: The New Science of Cause and Effect. Basic books.