Question: what is the difference between a confounder and a mediator?
Answer: Mediation involves a distinctly causal relationship among the variables, and the direction of causation involving the mediational path is X → M → Y. The confounding hypothesis, on the other hand, focuses on adjustment of observed effects to examine undistorted estimates of effects.