Mediation Analysis
A method for examining the process through which one variable’s influence on another comes about.
Are employees with more autonomy in remote work more productive? If that relationship arises because they can focus better on their work, how could we check it? Can we analyze what role work focus plays in the relationship between autonomy and productivity?
Mediation analysis is the method for analyzing the path through which the relationship between two variables runs via an intermediate variable.
Whereas correlation or simple regression shows the overall relationship between remote-work autonomy and productivity, mediation analysis splits that relationship into a direct effect and an indirect effect that runs through work focus. The indirect effect is usually estimated as the product of path coefficients, and its uncertainty can be assessed with a bootstrap confidence interval.
It is useful in research that seeks to explain theoretically the process behind a relationship, in fields such as organizations and HR, education, psychology and marketing. In this lesson we’ll use remote-work autonomy, work focus and employee productivity as an example to look at how the analysis works, direct, indirect and total effects, interpreting bootstrap results, how mediation differs from moderation, and the cautions about causal interpretation.
What is mediation analysis?
It breaks the relationship between two variables down into its intermediate process.
Mediation analysis checks what role a mediator M plays in the process by which an independent variable X relates to a dependent variable Y. Going beyond simply asking whether X and Y are related, it estimates the path through which that relationship comes about.
For example, if employees with more remote-work autonomy are more productive, you might wonder whether that is due to autonomy itself or because it lets them focus better on their work. In that case you set work focus as the mediator and analyze that path.
Why do we need mediation analysis?
It helps us understand not only the size of an outcome but the process by which a relationship arises.
The correlation between autonomy and productivity alone can’t tell us what happens between the two variables. Mediation analysis splits the overall relationship into a direct path and an indirect path through the mediator, so the process proposed in the research hypothesis can be examined more concretely.
In organizational research in particular, how a policy changes employees’ behavior or work environment can matter more than whether the policy was introduced. But finding a statistical indirect effect doesn’t automatically prove an actual causal process.
How does mediation analysis work?
Estimate the a, b and c′ paths and calculate the indirect effect a×b.
| Path | Meaning | Hypothetical estimate |
|---|---|---|
| a | Autonomy (X) → focus (M) | 0.50 |
| b | Focus (M) → productivity (Y), controlling for autonomy | 0.40 |
| c′ | Autonomy (X) → productivity (Y), controlling for focus | 0.15 |
| ab | Indirect effect a × b | 0.20 |
| c | Total effect c′ + ab | 0.35 |
In a simple mediation model based on linear regression, M is explained by X and the covariates, and Y is then explained by X, M and the covariates. The indirect effect is a × b, and under the same model assumptions and scales the total effect decomposes into c′ + ab.
Worked example: remote work and employee productivity
We analyze the relationships among remote-work autonomy, focus and productivity.
Suppose remote-work autonomy, work focus and productivity scores were measured for 240 employees of a hypothetical company. All three variables are treated as continuous scale scores from 1 to 5, and job type and years of service are included as covariates.
| Variable | Role | Example measure |
|---|---|---|
| Remote-work autonomy | Independent variable X | Score for autonomy in setting schedules and ways of working |
| Work focus | Mediator M | Score for how well focus is maintained during work |
| Employee productivity | Dependent variable Y | Score for job performance and goal attainment |
| Job type · years of service | Covariates | Control for group characteristics and work experience |
The hypothesis is that higher autonomy leads to higher focus, and employees with higher focus are also more productive. Because this is a cross-sectional survey, the causal order is a hypothesis the researcher proposes, not a fact confirmed by the data alone.
How do direct and indirect effects differ?
Interpret them by separating the paths through which the influence is transmitted.
The direct effect of 0.15 is the average difference in productivity associated with a 1-point difference in autonomy when work focus is included in the model. The indirect effect of 0.20 is the part of a 1-point difference in autonomy that is linked to productivity through the path of changes in focus.
The total effect of 0.35 is the sum of these two paths. But just because the indirect effect is larger than the direct effect, we can’t conclude that focus actually produced most of the overall relationship.
How do you test the indirect effect?
Assess the uncertainty of the indirect effect with a bootstrap confidence interval.
Because the indirect effect is the product of two regression coefficients, its sampling distribution may not be normal. So in practice, the bootstrap, which repeatedly resamples the data, is widely used to estimate a confidence interval for the indirect effect.
| Effect | Estimate | 95% bootstrap CI | Interpretation |
|---|---|---|---|
| Indirect effect ab | 0.20 | [0.11, 0.30] | Excludes 0 |
| Direct effect c′ | 0.15 | [0.04, 0.26] | Excludes 0 |
| Total effect c | 0.35 | [0.23, 0.47] | Positive (+) overall relationship |
In the hypothetical example, the 95% confidence interval for the indirect effect does not include 0. So we can say that, in the specified model, a statistical indirect effect through focus was observed.
What do you check in mediation results?
Look at path coefficients together with confidence intervals and review the model as a whole.
| Item to check | What to look at |
|---|---|
| a path | Conditional relationship between the independent variable and the mediator |
| b path | Relationship between the mediator and the dependent variable, controlling for the independent variable |
| Indirect effect ab | Effect size and bootstrap confidence interval |
| Direct effect c′ | The relationship that remains after the mediator is included |
| Total effect c | Overall relationship combining the direct and indirect paths |
| Data and model | Missing data, covariates, linearity, error structure and assumptions |
Even if the indirect effect is significant, if it is small its practical significance should be assessed separately. Conversely, there’s no need to conclude automatically that mediation is complete just because the direct effect isn’t significant.
How is mediation different from moderation?
Distinguish the process through which a relationship is transmitted from the conditions under which its size changes.
| Aspect | Core question | Example |
|---|---|---|
| Mediation | Why, and through what process, does the relationship arise? | Autonomy → focus → productivity |
| Moderation | When, and for whom, is the relationship stronger or weaker? | Does the autonomy–productivity relationship differ by job type? |
A mediator is set up as an intermediate process that explains the X–Y relationship, and a moderator as a condition under which the X–Y relationship changes. Moderated mediation analysis, which combines the two roles, is also possible, but first make clear which role fits the research question.
How do regression and structural equation modeling (SEM) differ?
The same mediation hypothesis can be estimated with different modeling frameworks.
A simple mediation model that uses only three observed scores can be estimated with ordinary regression. Structural equation modeling (SEM) can specify the direct and indirect paths simultaneously and can also handle latent variables measured by multiple items, along with measurement error.
| Approach | Characteristics |
|---|---|
| Regression-based mediation analysis | Estimates the paths in sequence using composite scores or observed variables |
| SEM-based mediation analysis | Estimates the paths as one model and can include latent variables if needed |
Whichever method you choose, the temporal order of the mediator and the outcome, confounders and the validity of the research design must be reviewed separately.
Things to watch out for in mediation analysis
A statistical path is not the same as a causal mechanism.
The most common mistake is to say “we proved that focus is the cause of productivity gains from remote work” just because the indirect effect is significant. In cross-sectional data, autonomy, focus and productivity are measured at the same time, so it’s hard to establish which came first.
| Caution | What to check |
|---|---|
| Temporal order | Theoretical or design grounds that X precedes M and M precedes Y |
| Confounding | Possible unmeasured confounding of the X–M, M–Y and X–Y relationships |
| Measurement error | Reliability of survey scales and possible common method bias |
| Model assumptions | Variable scales, functional form, interactions, residual diagnostics |
| Missing data | How missing data were handled and the analysis sample |
What extensions of mediation analysis are there?
Models can include multiple mediators or a time structure.
| Extension | When it applies |
|---|---|
| Parallel mediation | Examining focus and job satisfaction as separate paths at the same time |
| Serial mediation | A sequential path: autonomy → less stress → focus → productivity |
| Moderated mediation | Examining whether the indirect effect differs by job type |
| Longitudinal mediation | Measuring X, M and Y at different times to reflect the time structure |
| Latent variable mediation | SEM that accounts for measurement error in multi-item scales |
The more complex the model, the larger the sample needed and the more assumptions to review. It’s best to avoid adding paths without theoretical grounds.
How do you report mediation analysis results?
Present the paths and the uncertainty of the indirect effect in sentences.
A research report should include the sample size, measurement methods, covariates, estimation method, direct, indirect and total effects, confidence intervals and so on. Below is an example report for the hypothetical learning example.
A mediation analysis controlling for job type and years of service was conducted with 240 employees. The indirect effect of work focus in the relationship between remote-work autonomy and productivity was 0.20, and its 95% bootstrap confidence interval [0.11, 0.30] did not include 0. The direct effect was 0.15 and the total effect 0.35. This suggests that, in the specified model, the relationship between remote-work autonomy and productivity is also associated with an indirect path through work focus.
This text was written to interpret the results only within the range the analysis supports, without asserting a causal relationship. In an actual paper it’s good to also state the number of bootstrap resamples, how the confidence interval was computed and the model assumptions.
Where can mediation analysis be used?
It’s used in social science, organizational and health research where the intermediate process matters.
| Field | Example mediation hypothesis |
|---|---|
| Organizations · HR | Leadership → job engagement → turnover intention |
| Education | Teaching method → learning motivation → academic achievement |
| Marketing | Brand experience → trust → repurchase intention |
| Health | Health education → self-efficacy → health behavior |
| Services | Service quality → customer satisfaction → likelihood to recommend |
The key isn’t arranging three variables; it’s explaining, through the research design and theory, why that variable can be seen as the intermediate process.
Mediation analysis examines the path through which a relationship between variables comes about.
Separate the direct and indirect effects, check the confidence interval of the indirect effect, and interpret within the range the research design allows.
Mediation analysis splits the relationship between an independent variable and an outcome into a direct path and an indirect path through a mediator. In the remote-work example, we set up hypothesized relationships among autonomy, work focus and productivity and walked through checking the size of each path and the confidence interval of the indirect effect.
Even if the indirect effect is statistically significant, that alone doesn’t prove a causal mediation process. The temporal order in which variables were measured, confounders and the research design must be reviewed, and the presence of mediation shouldn’t be judged by whether the total effect is significant either. Interpret the results within the range the research design supports.
The heart of mediation is evaluating the intermediate path a×b. Distinguish the direct effect (c′), indirect effect (ab) and total effect (c), and check the uncertainty of the indirect effect with a bootstrap confidence interval. A statistically significant indirect effect alone does not prove a causal process.