A mediator variable explains the relationship between a dependent and independent variable. For example, with an increase in heat, we can see an increased sale of ice creams. However, there could be a mediator variable in this scene which is the number of people sweating in this heat. The increase in people sweating can result in increased local area sales of ice creams. If one wants to utilize this mediator variable, then one can choose to open an ice cream store near a place that has a sauna rather than merely an area with hot weather.