|Statistically, mediation is calculated with three equations that are typically represented with the diagrams to the right.
X is considered the causal variable, M is the mediator, and Y is the outcome.
The equations are:
a, b, c, and c' are the "coefficients" and understanding them is the key to understanding mediation.
To appropriately indicate the fact that the variables differ when they are predictors versus when they are outcomes, the three equations must be modified slightly:
Primes are added to M or Y to show that M' is on a different scale than M. Because Y is the outcome variable in two equations, it gets the coveted "double-prime" to show that the scale of Y differs from Y' which differs from Y".