# What Is a Mediating Variable?

A mediating variable is a variable that accounts for the relationship between a predictor variable and an outcome variable. Mediator variables explain why or how an effect or relationship between variables occurs.

Mediating variables are statistically significant when the relationship between two variables becomes nonsignificant when the mediating variable is introduced into the statistical model. Mediating variables are defined in contrast to moderator variables. Moderator variables change the strength or the nature of the relationship between a predictor variable and an outcome variable. Moderator variables explain the conditions in which an effect occurs. Moderator variables can increase or decrease the strength between a predictor and outcome variable or reverse the relationship altogether.