Inferensys

Glossary

Causal Impact Analysis

An approach for estimating the causal effect of a designed intervention on a time series by using a Bayesian structural time-series model to predict the counterfactual.
ML engineer managing model training cluster on laptop, GPU utilization visible, technical deep learning setup.
BAYESIAN TIME-SERIES COUNTERFACTUAL

What is Causal Impact Analysis?

A statistical method for estimating the causal effect of an intervention on a time series by constructing a counterfactual forecast.

Causal Impact Analysis is an approach for estimating the causal effect of a designed intervention on a time series by using a Bayesian structural time-series model to predict the counterfactual—what would have happened without the intervention. It synthesizes a synthetic control from predictor time series that were not affected by the event, then quantifies the divergence between the actual post-intervention data and the model's prediction.

Unlike static difference-in-differences, this method captures temporal dynamics like seasonality and trend evolution. The output is a pointwise causal effect estimate with full posterior probability intervals, allowing risk managers to determine not just the magnitude of a disruption's impact but its statistical significance over time.

BAYESIAN STRUCTURAL TIME-SERIES

Key Characteristics of Causal Impact Analysis

Causal Impact Analysis estimates the causal effect of an intervention on a time series by constructing a synthetic counterfactual—a prediction of what would have happened without the intervention—using a Bayesian structural time-series model.

01

Bayesian Structural Time-Series Foundation

The model decomposes the observed time series into interpretable components: trend (long-term direction), seasonality (cyclical patterns), and regression effects from control time series. Unlike classical difference-in-differences, this Bayesian framework quantifies uncertainty around the counterfactual prediction, producing posterior distributions for the causal effect at every point in time rather than a single point estimate.

02

Synthetic Counterfactual Construction

The core mechanism builds a synthetic control by training on pre-intervention data from the treated series and a set of unaffected predictor time series. During the post-intervention period, the model forecasts what the treated series would have been absent the intervention. The causal effect is the difference between the observed series and this counterfactual prediction, computed as pointwise impact (per time unit) and cumulative impact over the entire post-period.

03

Spike-and-Slab Variable Selection

To prevent overfitting from irrelevant control series, the model employs a spike-and-slab prior on regression coefficients. This Bayesian variable selection technique assigns a high prior probability that a coefficient is exactly zero (the 'spike'), with a diffuse prior for non-zero values (the 'slab'). The result is automatic shrinkage and selection of only the most predictive control series, yielding a parsimonious counterfactual model.

04

Full Posterior Inference Over Effects

Unlike frequentist approaches that return a single p-value, Causal Impact provides the full posterior distribution of the causal effect. This enables statements such as: 'There is a 97.3% posterior probability that the intervention caused a cumulative increase of at least X units.' Key outputs include:

  • Posterior probability of causal effect
  • Credible intervals for pointwise and cumulative impact
  • Tail-area probability for hypothesis testing
05

Assumption of Unaffected Controls

The validity of the counterfactual hinges on the assumption that the control time series are not themselves affected by the intervention. If the intervention spills over into the predictors, the model will attribute part of the true effect to the controls, biasing the estimate downward. This requires careful domain knowledge to select covariates that are correlated with the outcome pre-intervention but causally isolated from the treatment.

CAUSAL IMPACT ANALYSIS EXPLAINED

Frequently Asked Questions

Clear, technically precise answers to the most common questions about using Bayesian structural time-series models to estimate the causal effect of supply chain interventions and disruptions.

Causal Impact Analysis is a statistical methodology for estimating the causal effect of a designed intervention on a time series by constructing a counterfactual forecast—a prediction of what would have happened without the intervention—and comparing it to the observed data. The approach, popularized by Google's CausalImpact R package, uses a Bayesian structural time-series model that combines a state-space framework for the outcome variable with a regression component that incorporates one or more control time series unaffected by the intervention. The model is trained on pre-intervention data to learn the relationship between the outcome and control series, then projects this relationship into the post-intervention period to generate a counterfactual prediction with full posterior distributions. The causal effect is computed as the pointwise difference between the observed series and the counterfactual, with credible intervals quantifying uncertainty. This method is particularly valuable in supply chain contexts where A/B testing is infeasible—for example, estimating the impact of a port closure on delivery lead times or a new routing policy on fuel costs—because it provides rigorous inference from a single observational time series.

Prasad Kumkar

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.