Mediating Variable

A mediating variable explains how or why an independent variable causes an outcome variable. It sits in the causal pathway between the independent and outcome variables, transmitting the effect.

mediator variable
Mediating variable explains the process through which an independent variable exerts its effect on a dependent variable.

Mediation analysis

Mediation analysis is a statistical method for testing why or how an independent variable (IV) affects a dependent variable (DV). It examines this through a mediator (M), the intervening variable through which the IV’s effect is proposed to operate.

A mediator differs from a moderator, which changes how strong an effect is rather than explaining why it happens.

This is the mechanism mediation analysis is built to uncover.

The indirect effect is the portion of the IV’s effect that runs through the mediator.

The IV is proposed to influence M, which in turn influences the DV. Modern mediation studies typically estimate this indirect effect directly using bootstrapping, a resampling method described further below, rather than testing each step separately.

Conditions for Mediation:

  • Significant Relationship between IV and DV: There needs to be a significant direct relationship between the IV and the DV that can be potentially mediated.
  • Significant Relationship between IV and M: The IV must significantly predict the mediator variable.
  • Significant Relationship between M and DV: The mediator variable must significantly predict the DV (when controlling for the IV).
  • Diminished Direct Effect: The strength of the direct effect (relationship between IV and DV) should be reduced when the mediator is included in the model.
    • Full Mediation: The direct effect becomes non-significant after adding the mediator.
    • Partial Mediation: The direct effect remains significant but is weakened after adding the mediator.

When a mediating variable (M) is introduced to explain the relationship between an independent variable (IV) and a dependent variable (DV), there are two possible outcomes: full mediation or partial mediation.

mediation variable
  • Path a: the relationship between the independent variable and the mediator.
  • Path b: the relationship between the mediator and the dependent variable, while controlling for the independent variable.
  • Path c: the total effect of the independent variable on the dependent variable, without considering the mediator.
  • Path c’: the direct effect of the independent variable on the dependent variable, after controlling for the mediator.

Full Mediation

Complete mediation, also referred to as full mediation or total mediation, occurs when the relationship between an independent variable and a dependent variable is fully explained by a mediating variable.

full mediation 1

In simpler terms, the IV no longer has a direct effect on the DV; its influence is entirely channeled through the mediator.

Statistically, this is indicated by the direct path (c’) becoming non-significant (p > .05) after the mediator is included in the regression model.

Complete mediation provides strong evidence for a single, dominant mediator in the relationship.

It suggests that the mediator is a crucial component in the causal chain linking the independent variable to the outcome.

Partial Mediation

Partial Mediation occurs when the mediator explains some, but not all, of the relationship.

partial mediation

This means that the independent variable still has a direct effect on the outcome, but this effect is weaker than it was before considering the mediator variable.

Statistically, partial mediation is indicated by a significant direct path (c’) that is smaller in magnitude than the original relationship (c) between the IV and DV .

Partial mediation indicates that other factors, besides the mediator, contribute to the relationship between the IV and DV.

Why are mediating variables important?

  • Improve interventions: Mediation analysis allows researchers to move beyond simply asking “Does this intervention work?” to delve into the “how” and “why” behind its effects.
  • Explain unexpected results: When an intervention or treatment fails to produce a significant effect on the intended outcome, mediation analysis can shed light on why the intervention was unsuccessful.
  • Help build and refine theory: Testing mediation hypotheses can provide support for or against the theories that interventions are based on.

Many health conditions are the result of intricate interactions between multiple factors.

Mediation analysis can disentangle these relationships and help determine the relative contribution of each factor to the outcome.

For example, a researcher might be interested in the relationship between stress (independent variable) and depression (dependent variable).

They hypothesize that negative thoughts might be a mediating variable.

The idea is that stress leads to an increase in negative thoughts, and those negative thoughts lead to an increase in depressive symptoms.

By understanding the mediating mechanisms, interventions can be designed to specifically target those factors that are most critical in the development of a health condition.

This leads to more focused and potentially more effective interventions, rather than taking a one-size-fits-all approach.

For example, research show a link between social support and better outcomes for cancer patients.

Mediation analysis can explore whether this relationship is explained by factors like improved adherence to treatment, reduced stress levels, or better coping strategies.

Recent research confirms this pattern across very different topics. Benatov et al. (2026) tested whether autistic burnout mediates the link between camouflaging autistic traits and depression in autistic adults. Burnout-related exhaustion partially explained why camouflaging raised depression risk.

Karreman and Vingerhoets (2012) found that emotion regulation and resilience partly mediate the link between adult attachment style and psychological well-being. Downey et al. (2010) found that coping strategies partly mediate the link between adolescents’ emotional intelligence and problem behaviours.

Each study moves the question from whether an association exists to why it exists, pointing toward what a more targeted intervention might address.

How do I test for mediating variables?

To test for mediating variables, you need to follow a structured statistical approach using regression analysis.

This process involves demonstrating the mediator’s role in explaining the relationship between the independent variable (IV) and the dependent variable (DV).

A Worked Example

Here is how these four steps work in practice. Picture a study of 150 adults testing whether stress increases depressive symptoms because it increases negative, self-critical thoughts.

A first regression finds that stress alone reliably predicts depression. A second regression finds that stress alone reliably predicts negative thoughts.

In a third regression, with both entered together, negative thoughts still predict depression. Stress’s own effect shrinks, but it remains significant.

The bootstrapped confidence interval for the indirect effect excludes zero. Because the direct effect survives, this is partial mediation: negative thoughts explain part of the stress–depression link, and something else likely explains the rest.

Each step in the analysis should be statistically significant:

1. Establish the Baseline Relationship:

  • Goal: Before examining whether an indirect pathway through a mediator exists, you must first establish that there is a direct relationship between the IV and the DV. This step serves as the foundation for your mediation analysis.
  • Method: Regress the DV on the IV alone. This is a simple bivariate regression where the IV is the predictor and the DV is the outcome.
  • Interpretation: If this initial regression shows a statistically significant relationship between the IV and the DV, it confirms that there’s an effect to mediate. Without this initial relationship, there’s no need to proceed with testing for mediation.

In SPSS, go to Analyze > Regression > Linear.

  1. In the “Linear Regression” dialog box, specify your dependent variable in the “Dependent” box and your independent variable in the “Independent(s)” box.
  2. Click “OK” to run the analysis.
  3. The output will show the results of a simple linear regression.
  4. If the significance value (p-value) is less than .05, it indicates a significant relationship, which is necessary to proceed with testing for mediation.

2. Test for IV-Mediator Relationship:

  • Goal: This step aims to confirm that the IV has a causal effect on the proposed mediator. This is a crucial part of establishing the causal chain of mediation.
  • Method: Regress the proposed mediator on the IV. Again, this is a bivariate regression with the IV as the predictor and the mediator as the outcome.
  • Interpretation: A statistically significant relationship in this regression suggests that the IV does indeed influence or predict the mediator, supporting the first part of the proposed mediation pathway.

In SPSS, go to Analyze > Regression > Linear.

  1. In the “Linear Regression” dialog box, specify the proposed mediator in the “Dependent” box and your independent variable in the “Independent(s)” box.
  2. Click “OK” to run the analysis.
  3. Examine the “Coefficients” table in the output.
  4. A statistically significant relationship between the IV and the mediator is indicated by a p-value less than .05 for the independent variable’s coefficient.
  5. This finding supports the first part of the hypothesized mediation pathway, where the IV is expected to influence the mediator.

3. Test for Mediator-DV Relationship, Controlling for IV:

  • Goal: This is the core step in mediation analysis. You examine whether the mediator significantly predicts the DV while accounting for the IV’s influence. This helps determine if the mediator explains the relationship between the IV and the DV.
  • Method: Perform a multiple regression analysis where the DV is regressed on both the IV and the mediator simultaneously. This allows you to isolate the unique effects of each predictor while controlling for the other.
  • Interpretation: Two conditions must be met for mediation to be supported:
    • The mediator should be a significant predictor of the DV. This demonstrates that the mediator has a direct effect on the outcome, fulfilling the second part of the mediation pathway.
    • The direct effect of the IV on the DV should be reduced compared to the direct effect observed in the second step. This reduction in the direct effect suggests that the mediator accounts for some of the IV’s influence on the DV.

In SPSS, go to Analyze > Regression > Linear in SPSS.

  1. Enter the dependent variable in the “Dependent” box.
  2. Place both the independent variable and the mediator in the “Independent(s)” box.
  3. Click “OK” to run the analysis.
  4. The output will contain a “Coefficients” table that requires careful examination:
  5. The p-value for the mediator’s coefficient should be less than .05 to indicate that the mediator significantly predicts the dependent variable even after controlling for the independent variable’s influence. This supports the second part of the mediation pathway, showing a direct effect from the mediator to the DV.
  6. Compare the independent variable’s coefficient in this model to the coefficient obtained in Step 1. If the coefficient is smaller in Step 3 and the p-value is now larger (especially if it’s greater than .05), it suggests that the mediator is explaining part of the relationship between the IV and the DV. This reduction in the direct effect of the IV is key evidence for the presence of mediation.

4. Assess Significance of Mediation:

  • Goal: This final step aims to statistically confirm the significance of the mediated effect, providing a measure of confidence in your findings. The method employed depends on your sample size:
    • Bootstrapping (the recommended method): This resampling technique builds a distribution of the indirect effect without assuming its shape, so it is now preferred at any sample size (Preacher & Hayes, 2008).
    • Sobel Test (an older, less-preferred method): It assumes the indirect effect is normally distributed, which is often inaccurate, making it less reliable than bootstrapping (Sobel, 1982; Preacher & Hayes, 2008).

In SPSS, go to Analyze > Regression > Linear.

  1. Go to the “Linear Regression” dialog box used in Step 3.
  2. Click the “Bootstrap” button.
  3. Select “Perform bootstrapping.”
  4. Choose a suitable number of bootstrap samples (e.g., 1000 or more).
  5. Under “Confidence Intervals,” select “Bias corrected and accelerated (BCa).
  6. Click “Continue” and then “OK” to run the analysis.
  7. The output will include a table labeled “Bootstrap for Indirect Effects.”
  8. Focus on the confidence interval for the indirect effect of the independent variable on the dependent variable through the mediator. If the confidence interval does not include zero, it indicates that the mediated effect is statistically significant.

Critical Evaluation

Strengths and Mechanistic Insight

Mediation analysis moves a research question from whether a predictor affects an outcome to how it does so. This is often the more useful question for building or refining theory (Baron & Kenny, 1986).

Testing several plausible mediators against the same data can help researchers weigh competing explanations for an association, rather than settling for a single overall effect.

This matters statistically. The shift from stepwise significance testing to directly bootstrapping the indirect effect is a real improvement.

It avoids requiring every path to clear its own significance threshold (MacKinnon et al., 2002). Nor does it assume a normal distribution, unlike the older Sobel test.

Even so, nothing here relaxes the causal assumptions. Ordering still matters. So does ruling out unmeasured confounds.

Assumptions and Limitations

A mediation model assumes the causal order runs predictor → mediator → outcome. If the true order differs, the model is misspecified even when the statistics fit the data well (Baron & Kenny, 1986).

This is hard to check from a single dataset. Reversing the arrows and comparing which version fits better cannot reliably distinguish between competing causal orderings, because a rearranged model can fit the same correlational data equally well (Thoemmes, 2015).

The model also assumes no unmeasured variable confounds any of the three relationships, an assumption especially hard to defend when the predictor was not experimentally manipulated.

Even a significant result invites caution. A significant indirect effect is consistent with the proposed mechanism. But it does not rule out untested alternative mediators, or alternative causal orderings of the same three variables (Fiedler et al., 2018).

Some methodologists argue the field should drop the traditional full-versus-partial mediation labels altogether. Reporting the indirect effect’s size directly is more informative. The full/partial distinction depends heavily on a study’s statistical power, not the true strength of the mechanism (Zhao et al., 2010).

Contemporary Research

A cluster of 2015+ methodological critiques argues that a single significant mediation test is often treated as stronger causal evidence than the statistics can support.

Aim: Fiedler et al. (2018) tested whether published mediation studies draw only the causal conclusions their statistics support, or typically claim more.

Method: They systematically reviewed empirical articles published in 2015 that reported a mediation test. Each article was coded for two things. It considered alternative mediators or causal orderings, and how strongly it worded its causal claims.

Results: Most articles concluded a causal mechanism had been established from a correlational test alone, without acknowledging that untested alternative models could fit the same data equally well.

Conclusion: Researchers routinely overstate what a significant mediation test proves. Fiedler et al. (2018) recommend grounding mediator choice in theory, and actively considering rival pathways.

A more recent, pre-registered study shows how far mediation modelling has moved beyond this classic single-mediator design. It goes further.

Aim: Faur and Sava (2026) tested a parallel-mediation model of evaluative conditioning, and whether neuroticism and looming cognitive style change the strength of that pathway.

Method: In a pre-registered sample of 806 adults, participants rated aversive images for valence and threat. This step was simple. They then completed an evaluative-conditioning task pairing them with neutral images, and the team switched from a planned bootstrapped regression to a multilevel Bayesian model mid-study.

Results: Valence ratings robustly mediated the conditioning effect, and threat ratings partially did. Neuroticism amplified both image appraisal and valence transfer.

Conclusion: Neuroticism appears to amplify the learning process itself. It is not just the initial appraisal. As a single study, this personality-specific finding is a first demonstration, not an established pattern (Fiedler et al., 2018).

Alternative and Related Approaches

Two other questions are easy to confuse with mediation.

Moderation analysis asks when or for whom an effect holds, not how or why it arises: whether a predictor’s effect changes across levels of a third variable, the moderator.

SEM generalises this. Structural equation modelling turns single-mediator regression into a full system of equations, letting multiple mediators, multiple outcomes, and measurement error be modelled explicitly rather than assumed away.

Unreliable measurement of the mediator is itself a source of bias in a simple regression-based estimate. SEM can address this directly.

Causal mediation analysis reformulates mediation using potential outcomes rather than regression coefficients alone (Imai et al., 2010). It makes explicit an assumption regression-based mediation usually leaves implicit.

That assumption is sequential ignorability: no unmeasured variable confounds either half of the mediation chain, even after controlling for the predictor. This framework also provides tools for testing how sensitive a conclusion is to a violation of that assumption.

Key Takeaways

  • Definition: A mediating variable explains how or why an IV affects a DV by sitting on the causal pathway between them.
  • Mediator vs Moderator: A mediator explains a mechanism; a moderator changes an effect’s strength, a different question entirely.
  • Full vs Partial: Full mediation means the IV’s direct effect disappears once the mediator is added; partial mediation means it shrinks but survives.
  • Testing: Bootstrapping, not the older Sobel test, is now the preferred way to test whether an indirect effect is significant.
  • Assumptions: The model assumes the correct causal order and no unmeasured confounds, assumptions a single study rarely proves.
  • Modern Research: A single significant mediation test is consistent with a proposed mechanism, not proof that no other explanation fits (Fiedler et al., 2018).

References

Baron, R. M., & Kenny, D. A. (1986). The moderator–mediator variable distinction in social psychological research: Conceptual, strategic, and statistical considerations. Journal of Personality and Social Psychology, 51(6), 1173–1182. https://doi.org/10.1037/0022-3514.51.6.1173

Benatov, J., Sarel-Mahlev, E., & Bar Yehuda, S. (2026). Camouflage, burnout-exhaustion, and depression in autistic adults. Autism in Adulthood, 8(4), 801–808. https://doi.org/10.1089/aut.2024.0147

Downey, L. A., Johnston, P. J., Hansen, K., Birney, J., & Stough, C. (2010). Investigating the mediating effects of emotional intelligence and coping on problem behaviours in adolescents. Australian Journal of Psychology, 62(1), 20–29. https://doi.org/10.1080/00049530903312873

Faur, D., & Sava, F. A. (2026). Beyond the moderating role of neuroticism on evaluative conditioning: Threat appraisal. Journal of Personality. Advance online publication. https://doi.org/10.1111/jopy.70093

Fiedler, K., Harris, C., & Schott, M. (2018). Unwarranted inferences from statistical mediation tests – An analysis of articles published in 2015. Journal of Experimental Social Psychology, 75, 95–102. https://doi.org/10.1016/j.jesp.2017.11.008

Imai, K., Keele, L., & Tingley, D. (2010). A general approach to causal mediation analysis. Psychological Methods, 15(4), 309–334. https://doi.org/10.1037/a0020761

Karreman, A., & Vingerhoets, A. J. J. M. (2012). Attachment and well-being: The mediating role of emotion regulation and resilience. Personality and Individual Differences, 53(7), 821–826. https://doi.org/10.1016/j.paid.2012.06.014

Preacher, K. J., & Hayes, A. F. (2008). Asymptotic and resampling strategies for assessing and comparing indirect effects in multiple mediator models. Behavior Research Methods, 40(3), 879–891. https://doi.org/10.3758/brm.40.3.879

Sobel, M. E. (1982). Asymptotic confidence intervals for indirect effects in structural equation models. Sociological Methodology, 13, 290–312. https://doi.org/10.2307/270723

Thoemmes, F. (2015). Reversing arrows in mediation models does not distinguish plausible models. Basic and Applied Social Psychology, 37(4), 226–234. https://doi.org/10.1080/01973533.2015.1049351

Zhao, X., Lynch, J. G., Jr., & Chen, Q. (2010). Reconsidering Baron and Kenny: Myths and truths about mediation analysis. Journal of Consumer Research, 37(2), 197–206. https://doi.org/10.1086/651257

Olivia Guy-Evans, MSc

BSc (Hons) Psychology, MSc Psychology of Education

Associate Editor for Simply Psychology

Olivia Guy-Evans is a writer and associate editor for Simply Psychology, where she contributes accessible content on psychological topics. She is also an autistic PhD student at the University of Birmingham, researching autistic camouflaging in higher education.


Saul McLeod, PhD

Chartered Psychologist (CPsychol)

BSc (Hons) Psychology, MRes, PhD, University of Manchester

Saul McLeod, PhD, is a qualified psychology teacher with over 18 years of experience in further and higher education. He has been published in peer-reviewed journals, including the Journal of Clinical Psychology.