Inferensys

Glossary

Mediation Analysis

Mediation analysis is a statistical method that decomposes the total effect of a treatment on an outcome into a direct effect and an indirect effect that operates through an intermediate mediator variable.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
CAUSAL MECHANISM DECOMPOSITION

What is Mediation Analysis?

A statistical method used to identify and quantify the mechanism through which an independent variable influences a dependent variable via an intermediate mediator variable.

Mediation analysis is a causal inference method that decomposes the total effect of a treatment on an outcome into a direct effect and an indirect effect operating through a specific mediator. It answers not just if a disruption causes a delay, but how—for example, quantifying whether a port closure reduces throughput directly or indirectly by first depleting chassis availability.

The technique relies on estimating two key pathways: the effect of the treatment on the mediator (path a) and the effect of the mediator on the outcome (path b). The indirect effect is the product of these coefficients, while the direct effect captures residual influence. In supply chains, this distinguishes whether a supplier failure propagates via inventory depletion versus a direct contractual penalty.

DECOMPOSING CAUSAL MECHANISMS

Core Characteristics

Mediation analysis dissects the total effect of a disruption (treatment) on a supply chain outcome into a direct path and an indirect path that flows through an intermediate variable (mediator). This decomposition is critical for identifying the precise operational lever to pull during a crisis.

01

Direct vs. Indirect Effects

The core function of mediation analysis is to partition the Average Treatment Effect (ATE) into two distinct components:

  • Natural Direct Effect (NDE): The effect of a disruption (e.g., port closure) on an outcome (e.g., stockout) that does not operate through the mediator.
  • Natural Indirect Effect (NIE): The effect of the disruption on the outcome that operates specifically through the mediator (e.g., carrier capacity). This decomposition reveals whether a disruption causes failure directly or by choking a specific resource.
02

The Mediator Variable

A mediator is a variable that sits on the causal pathway between the treatment and the outcome, transmitting the effect. In supply chains, mediators are often operational bottlenecks:

  • Inventory Buffers: A demand spike (treatment) causes a stockout (outcome) by depleting safety stock (mediator).
  • Supplier Lead Time: A raw material shortage (treatment) delays production (outcome) by extending procurement cycles (mediator).
  • Transportation Hubs: A regional weather event (treatment) causes late deliveries (outcome) by congesting a specific cross-dock (mediator). Identifying the mediator pinpoints where intervention will be most effective.
03

Counterfactual Framework

Modern mediation analysis relies on the counterfactual framework to define causal pathways without ambiguity. It answers two nested hypotheticals:

  1. What would the outcome be if we changed the treatment, but kept the mediator at the value it would naturally take under the control condition?
  2. What would the outcome be if we fixed the treatment, but changed the mediator to the value it would take under the treatment condition? This framework, formalized by Imai, Keele, and Tingley, allows for the estimation of causal mediation effects even in the presence of treatment-mediator interactions.
04

Sequential Ignorability Assumption

To identify causal mediation effects, a strong assumption called sequential ignorability must hold. This requires:

  • No unmeasured treatment-outcome confounding: The treatment assignment is independent of potential outcomes given observed covariates.
  • No unmeasured mediator-outcome confounding: The mediator is independent of potential outcomes given the treatment and observed covariates.
  • No confounders of the mediator-outcome relationship are affected by the treatment. In complex supply chains, this is a high bar, often requiring sensitivity analysis to assess robustness to hidden confounders.
05

Product of Coefficients Method

A classical approach to mediation, often used in Structural Equation Modeling (SEM) and linear systems:

  • Estimate the effect of the treatment on the mediator (path a).
  • Estimate the effect of the mediator on the outcome, controlling for the treatment (path b).
  • The indirect effect is calculated as the product a × b.
  • The direct effect is the remaining effect of the treatment on the outcome (path c'). While intuitive, this method assumes linearity and no interaction, making it less suitable for the non-linear dynamics of global logistics.
06

Mediation in High-Dimensional Settings

In modern supply chains with thousands of potential mediators (e.g., every node in a logistics graph), high-dimensional mediation analysis is required. Techniques include:

  • Regularization: Applying LASSO or elastic net to select a sparse set of true mediators from a high-dimensional candidate set.
  • Latent Variable Mediation: Modeling the mediator as an unobserved latent construct inferred from multiple noisy indicators, such as a composite 'supplier stress index' derived from financial, news, and weather data.
  • Causal Mediation Forests: Non-parametric machine learning methods that estimate heterogeneous indirect effects across different sub-populations or product categories.
CAUSAL DECOMPOSITION

Frequently Asked Questions

Explore the mechanics of mediation analysis, a statistical method for dissecting how an independent variable transmits its effect to a dependent variable through an intermediate mechanism.

Mediation analysis is a statistical method used to decompose the total effect of a treatment variable (X) on an outcome variable (Y) into a direct effect and an indirect effect that operates through an intermediate mediator variable (M). The process works by estimating two key models: one that predicts the mediator from the treatment, and another that predicts the outcome from both the treatment and the mediator. The indirect effect is quantified as the product of the path coefficient from X to M (the a path) and the path coefficient from M to Y controlling for X (the b path). This a*b product represents the amount of the total effect that is transmitted through the hypothesized mechanism. Modern approaches, particularly the causal inference framework developed by Imai, Keele, and Tingley, define effects using potential outcomes notation, allowing for the estimation of the Average Causal Mediation Effect (ACME) even in the presence of treatment-mediator interactions and non-linear models.

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.