AI Glossary / Statistics and probability / Intermediate

Mediation (statistics)

Definition

Mediation in statistics concerns an intermediate variable through which an exposure or intervention may affect an outcome. The intermediate variable is called a mediator. Mediation analysis investigates a proposed pathway from exposure to mediator to outcome and may distinguish effects operating through that pathway from effects operating through other routes. A causal interpretation requires assumptions and evidence beyond observing correlations among the three variables.

What it means

Suppose a training program changes practice time, which in turn changes task performance. Practice time is a candidate mediator. The question is not only whether training affects performance, but whether part of its effect operates by changing practice.
This differs from moderation, which concerns whether an effect varies across conditions or groups. It also differs from confounding, where another variable creates or distorts an association. A variable's role depends on the causal question and timing, not simply on which column it occupies in a dataset.

How it works

Define the exposure, mediator, outcome, and causal contrast before selecting a statistical model. Establish a plausible temporal sequence and identify pre-exposure factors that may affect the relationships.
Specify the effect of interest. A total effect compares outcomes under different exposures. A natural indirect effect considers changing the mediator from the value it would take under one exposure to the value it would take under another, while holding exposure fixed in the outcome comparison. Direct-effect definitions depend on how the mediator is held or assigned.
In a simple additive linear setup without exposure-mediator interaction, one model describes the exposure's effect on the mediator and another relates exposure and mediator to the outcome. Under suitable causal and statistical assumptions, the product of the exposure-to-mediator coefficient and mediator-to-outcome coefficient represents an indirect effect.
Those assumptions are demanding. Randomizing exposure does not automatically randomize the mediator. Unmeasured common causes of mediator and outcome can still bias the analysis. Exposure-induced mediator-outcome confounders complicate standard natural-effect identification and cannot generally be handled by casually adding them to a regression.
Estimate uncertainty and examine sensitivity to unmeasured confounding and model choices. Nonlinear outcomes, interactions, multiple mediators, and time-varying processes require methods appropriate to their structure; the simple coefficient product is not universally applicable.

Three practical examples

  • Employee learning: researchers examine whether a training intervention improves performance partly through additional practice, with practice measured before the outcome.
  • Product onboarding: a team investigates whether a tutorial changes later completion through improved understanding rather than equating extra clicks with a proven mechanism.
  • AI assistance: researchers study whether access to an assistant affects task quality through changes in verification effort, while considering ability and motivation as possible common causes.

Think of it this way

Think of water reaching a garden through several channels. A mediator is a proposed intermediate channel carrying part of an effect. Seeing water in that channel and a greener garden does not prove how much it contributed, because other channels and common conditions may explain both observations.

Worked example

Consider an invented additive linear system. Let T equal zero without training and one with training. Let the expected mediator be M = 1 + 2T. Let the expected outcome be Y = 10 + T + 3M. Assume these equations correctly represent causal relationships for this illustration, with the necessary identification conditions and no treatment-mediator interaction.
Training raises M by two units. Each unit increase in M raises Y by three under the model. The indirect effect is therefore 2 × 3 = 6 outcome units. The direct coefficient of T is one, so the total effect is 1 + 6 = 7.
Substitution checks the result. Without training, M is one and Y is thirteen. With training, M is three and Y is twenty. Their difference is seven.
Now change the direct coefficient from +1 to -6 while keeping the mediator pathway unchanged. The indirect effect remains +6, but the total becomes zero. Opposing pathways can cancel, so an overall effect near zero does not logically rule out a nonzero indirect effect. These are assumed model quantities, not estimates proving a mechanism in observed data.

Illustrative case study

Fictional case: Spruce Learning evaluates an AI coaching feature. Assignment to the feature is randomized, but time spent practicing is chosen by users. The researchers suspect practice mediates learning gains, yet recognize that motivation can affect both practice and performance.
They define the intended mediation effect, collect relevant baseline information, and conduct sensitivity analyses before describing the result as causal. They distinguish the randomized total-effect evidence from the stronger assumptions needed for a pathway claim.

Common misconceptions and mistakes

Do not treat a mediator's significant regression coefficient as proof of mediation. Do not assume that an exposure coefficient becoming nonsignificant after adjustment establishes complete mediation. Significance changes depend on precision, specification, and correlations among variables.
A statistically significant total effect is not a logical prerequisite for an indirect effect, particularly when pathways oppose each other. Likewise, a proportion mediated can be unstable or misleading when the total effect is near zero or component effects have different signs.
Do not adjust for every available post-exposure variable automatically. Conditioning on the wrong variable can introduce bias. A bootstrap interval can describe uncertainty in an estimator without making its causal assumptions true.

Business use

Mediation can help evaluate proposed mechanisms and guide the design of follow-up interventions. Its practical value depends on whether the intermediate process is well measured and whether the causal assumptions are defensible.
Report the effect definition, temporal ordering, design, adjustment variables, model, uncertainty, and sensitivity analysis. When evidence supports only an associational decomposition, label it accordingly. Decisions about changing the mediator itself may require additional evidence, because a natural indirect effect does not automatically equal the effect of every feasible intervention on that mediator.

People also ask

Does randomizing treatment solve every mediation problem?

No; mediator-outcome confounding can remain.

Is mediation the same as moderation?

No; mediation concerns a pathway, while moderation concerns variation in an effect.

Can indirect and direct effects have opposite signs?

Yes, and their cancellation can make the total small.

Check your understanding

an exposure changes a mediator by three units and the mediator coefficient is two in the stated additive causal model. What is the indirect effect?

Answer: six units.

does a correlation between mediator and outcome establish a causal pathway?

Answer: no.

does a narrow confidence interval remove unmeasured confounding?

Answer: no; precision and identification are different issues.

Related terms

  • Causal inference
  • Confounding
  • Moderation (statistics)
  • Sensitivity analysis
  • Mediator
  • Direct effect
  • Indirect effect
  • Moderation
  • Counterfactual

Learn next

Next, study causal diagrams and the distinction between natural and controlled direct effects. Then examine sensitivity analysis and how exposure-mediator interactions change the decomposition.

  • Sensitivity analysis

More in Statistics and probability

  • Median - The median is a value that divides an ordered distribution so that at least half the observations or probability lie at or below it and at least half lie at...
  • Median absolute error - Median absolute error is a prediction-error measure obtained by taking the median of the absolute differences between actual values and their corresponding...
  • Median test - The median test, commonly called Mood's median test, is a nonparametric procedure for comparing the population medians of two or more independent groups.
  • Mendelian randomization - Mendelian randomization, or MR, uses genetic variants as instrumental variables to investigate whether an exposure has a causal effect on an outcome.
  • Mesokurtic - Mesokurtic describes a distribution whose kurtosis equals the normal distribution's benchmark: Pearson kurtosis of three, or excess kurtosis of zero.
  • Meta-analysis - Meta-analysis is the statistical synthesis of results from multiple studies addressing a sufficiently related question.

Sources

Imai, Keele, and Yamamoto, Identification, Inference and Sensitivity Analysis for Causal Mediation Effects: https://arxiv.org/pdf/1011.1079 Tingley and colleagues, mediation: R Package for Causal Mediation Analysis: https://www.jstatsoft.org/article/view/v059i05

Previous: Median-threshold bitmap (MTB) Next: Medoid

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer