Mediation explains how or why one variable affects another, by placing a third variable on the causal path between them; moderation explains when or for whom that effect is stronger or weaker, by letting a third variable change the size of the relationship. A mediator sits in the middle of the chain and carries the effect; a moderator sits to the side and tunes it. Getting this distinction right is what keeps your dissertation hypotheses and your analysis aligned.

Why the two roles are easy to confuse, and how to tell them apart

Both involve a third variable, which is exactly why students mix them up in the theory chapter. The cleanest test is to ask whether the third variable is part of the mechanism or a condition. If it answers how the independent variable shapes the dependent variable, it is a mediator. If it answers under what circumstances the effect holds, it is a moderator. A mediator is caused by your predictor and in turn causes your outcome; a moderator is usually unrelated to the predictor and simply interacts with it.

Hot weatherIce cream salesDrowning deathscausescausesobserved correlation(not causal)
A third variable that drives both the predictor and the outcome is a confounder, not a mediator. Diagramming the causal arrows first stops you from labelling a side influence as part of the mechanism.

How mediation is modelled in your analysis

Classic mediation decomposes a total effect into a direct effect (predictor to outcome) and an indirect effect (predictor to mediator to outcome). Modern practice estimates the indirect path with bootstrapping and reports a bias-corrected confidence interval rather than relying on the older causal-steps logic. Because mediation makes a directional claim, your design has to justify the time ordering of the variables; a mediator measured at the same moment as the outcome cannot really sit before it. Many mediation models are fitted as a series of regressions, so the same diagnostics that matter in checking linear regression assumptions apply to each equation in the model.

How moderation is modelled in your analysis

Moderation is tested with an interaction term: you multiply the predictor by the moderator and add that product to the model. A significant interaction means the slope of the predictor changes across levels of the moderator, which you then unpack with simple slopes or a Johnson-Neyman region of significance. To keep the coefficients interpretable and reduce multicollinearity, you usually centre or standardise the continuous variables before forming the product. When the outcome is binary rather than continuous, the interaction lives inside a logistic model, so the same care you take in interpreting logistic regression results applies to reading the moderated effect on the odds scale.

What is mediation analysis, with a concrete example

Mediation analysis tests whether a third variable explains the pathway by which a predictor reaches an outcome, answering the question how does this effect happen. Picture a study where more exercise predicts better sleep quality. You suspect the link runs through reduced stress: exercise lowers stress, and lower stress improves sleep. Here stress is the mediator, and the analysis quantifies the indirect effect that travels exercise to stress to sleep, alongside any direct effect of exercise that remains once stress is accounted for. If the indirect path is significant and the direct path shrinks toward zero, you have evidence of full mediation; if the direct path stays meaningful, the mediation is partial. Because the claim is causal, the credibility of the whole exercise rests on a defensible time ordering of the three variables, which is a design decision rather than a statistical one, and sits close to the distinction in correlation versus causation.

What is moderation analysis, with a concrete example

Moderation analysis tests whether the strength or direction of a relationship depends on a third variable, answering the question for whom or under what conditions does this effect hold. Stay with exercise and sleep, but now ask whether the benefit differs by age. If exercise improves sleep far more for older adults than for younger ones, then age is a moderator: it does not lie on the causal path, it simply changes the size of the slope. You test this with an interaction term between exercise and age, and a significant interaction tells you the effect is conditional rather than uniform. The practical payoff is precision in your conclusions, because reporting a single average effect would hide a pattern that matters for theory and for how you frame your variables. Moderation never makes a mechanism claim; it maps where an existing effect is stronger or weaker.

Testing mediation and moderation in SPSS

Most dissertations run both through the PROCESS macro, a free add-in for SPSS that fits these models without manual coding. After installing it, you select a numbered model template: model 4 estimates simple mediation, model 1 estimates simple moderation, and model 7 or model 14 handle moderated mediation. You assign your predictor, outcome, and the mediator or moderator to their roles, request bootstrapped confidence intervals for any indirect effect, and ask PROCESS to mean-centre the variables that form an interaction. Read the indirect effect as significant when its bootstrap confidence interval excludes zero, not by a separate p-value. The same models can be built by hand as a chain of regressions, in which case the diagnostics from checking linear regression assumptions apply to every equation. If you would rather have the model specified and written up correctly the first time, that is the work in support for doctoral analysis.

Choosing the right one for your hypotheses

Let the wording of your research question decide. Process and mechanism language (through, because, by way of) points to mediation; contingency language (depends on, especially when, for whom) points to moderation. Some dissertations need both at once, a moderated mediation or conditional indirect effect, where the strength of a mediated path itself varies by group. Whichever you pick, remember that a statistical association is not proof of a mechanism, which is the same caution that runs through the correlation and causation distinction. A defensible model is grounded in theory first and estimated second, never the reverse.