#Causal Inference
Articles about Causal Inference — exploring patterns, best practices, and real-world implementations in production systems.
8 posts tagged with causal inference. ← All posts
Causal inference isn't an academic exercise — it's the discipline that makes data-driven decisions actually work instead of merely feeling rigorous. This closing post pulls the series into practice: how to approach a real causal question, how causal thinking fixes the most common ML and analytics mistakes, and the honest judgment about what you can and can't conclude. It's the difference between knowing what correlates with success and knowing what causes it.
Causal inference is the discipline that makes data-driven decisions actually work. A practical workflow for any causal question, how causal thinking fixes the most common ML and analytics mistakes (acting on confounded correlations, using predictive features as causal levers), and the calibrated humility that is the real rigor.
Sometimes you can't run an experiment, but the world runs one for you. A policy change, a lottery, an arbitrary cutoff, a quirk of timing — these can assign a "treatment" in a way that's effectively random, letting you recover experimental-grade causal evidence from observational data. Natural experiments are the most ingenious tools in causal inference, and the quasi-experimental methods built on them (instrumental variables, difference-in-differences, regression discontinuity) are how economists and data scientists establish causation when a controlled trial is impossible.
Sometimes the world runs the experiment for you — a policy change, a lottery, an arbitrary cutoff assigns treatment as-if-randomly. The three canonical designs (instrumental variables, difference-in-differences, regression discontinuity) that recover experiment-grade credibility from observational data, and their assumptions.
Often you can't run an experiment — it's unethical, infeasible, or too slow — but you still need to know whether something causes something. Observational causal inference is the set of techniques for extracting causal conclusions from data you didn't control, by reconstructing the comparable groups that randomization would have given you for free. This post covers the main tools (adjustment, matching, propensity scores) and the uncomfortable assumption they all depend on.
When you can't experiment, observational methods reconstruct the comparable groups randomization gives for free — adjustment, matching, propensity scores. All share one goal (remove confounders' influence) and one unprovable Achilles' heel: the 'no unmeasured confounding' assumption. How to use them honestly.
Causal reasoning gets dramatically clearer when you draw it. A causal graph is a diagram of what causes what — nodes for variables, arrows for causal influence — and it turns fuzzy debates about confounding and adjustment into visual rules you can actually check. This post introduces causal graphs (DAGs) and the single most useful thing they do: tell you exactly which variables to control for, and which ones you must leave alone.
Causal reasoning gets clearer when you draw it. A causal graph (DAG) turns fuzzy debates about confounding and adjustment into visual rules: the three building blocks (chain/mediator, fork/confounder, collider) and why 'control for everything' is wrong — adjusting the wrong variable adds bias.
The most reliable way to establish causation is almost embarrassingly simple: flip a coin to decide who gets the treatment. Randomization is the one technique that defeats confounding completely — including confounders you never thought of — which is why the randomized controlled trial is the gold standard of causal evidence and why the A/B test is the most powerful tool an engineer has. This post explains why randomization works its magic, and the many ways real experiments still go wrong.
The most reliable way to establish causation is almost embarrassingly simple: randomize. Why randomization defeats all confounders at once (even unknown ones), why the A/B test is a genuine causal tool, and the many ways real experiments still go wrong (peeking, power, interference, broken randomization).
If you remember one thing about why causal conclusions go wrong, make it confounding. A confounder is a lurking variable that influences both the treatment and the outcome, manufacturing a correlation that looks causal but isn't. It's the reason observational data is so treacherous, the reason randomized experiments are the gold standard, and the single concept that explains most spurious causal claims in business, science, and ML. This post makes confounding concrete and shows why it's so hard to defeat.
A confounder influences both the treatment and the outcome, manufacturing a correlation that looks causal but isn't — the reason observational data is treacherous and experiments are the gold standard. Why it produces confident wrong conclusions, why unmeasured confounders are the nightmare, and how the field fights it.
To reason about causation rigorously, you first need to define what a "causal effect" even is — and the answer is more subtle than it looks. The potential-outcomes framework defines it through a counterfactual: the difference between what happened and what would have happened otherwise. That single idea, and the "fundamental problem" that you can never observe both, is the foundation on which all of causal inference is built.
To reason about causation you must define a causal effect: the counterfactual difference between what happened and what would have happened otherwise. The potential-outcomes framework, the fundamental problem (you can never observe both), and why everything reduces to making treated and untreated groups comparable.
Every data-driven engineer knows the phrase "correlation is not causation," and almost everyone violates it anyway — in A/B test readouts, in metric dashboards, in ML models used to make decisions. The gap between "these move together" and "this causes that" is where enormous amounts of money and effort get wasted on changes that don't work. Causal inference is the discipline of crossing that gap rigorously, and this series builds it from first principles for people who build systems.
Everyone knows 'correlation is not causation' and violates it anyway — in A/B readouts, dashboards, and ML used to drive decisions. The real difference (observing vs intervening), the three reasons correlation appears without causation (reverse causation, confounding, selection), and why it's an engineering problem.
All posts on this site are written by Pratik Dhanave, an Agentic AI Architect with 7+ years building production distributed systems, multi-agent AI platforms, and cloud-native infrastructure. About the author → Each article includes working code, architecture diagrams, and references to the specific frameworks and standards discussed. Browse all posts or explore related topics using the tag cloud above.