A mediator (or mediating variable) is a variable that falls between a dependent and independent variable; that is, it connects them.
For example, the dependent variable “academic performance” is influenced by the independent variable “exercise” via the mediator variable “stress.” Exercise reduces stress, which in turn improves academic performance. Stress therefore mediates the relationship.
A moderator (or moderating variable) influences how an independent variable influences a dependent variable; in other words, it impacts their relationship.
For example, the relationship between the dependent variable “mental health” and the independent variable “social media use” may be influenced by the moderator “age.” The impact that social media has on mental health depends on someone’s age.
The expected influence of mediator and moderator variables can be captured in a conceptual framework.