Skip to content
Grad Coach

Diagram · CC BY 4.0

Moderating variable example: sunlight and fertilizer

The more sunlight the plants get, the more each gram of fertilizer adds to their height.

A conceptual diagram of a simple moderation model with a worked example. Amount of fertilizer in g per pot (X, independent variable) affects plant height in cm (Y, dependent variable). Sunlight in hours per day (W, moderator, in a box with a light neutral fill) has an orange arrow that points at the X to Y path, to show that W changes that effect rather than acting on Y directly (an interaction). A note beside the moderator's arrow gives the effect of X on Y at three levels of sunlight: 0.35 cm per g at 4 hours of sun, 0.8 cm per g at 7 hours and 1.25 cm per g at 10 hours. A key names the two arrow types.

Swipe sideways to see the whole diagram, or download the PNG.

Moderation model - sunlight moderates the effect of fertilizer on plant height. Derek Jansen, Grad Coach, CC BY 4.0.

The same model, plotted

Predicted plant height against fertilizer at 4, 7 and 10 hours of sun; the steeper the line, the stronger the effect of fertilizer.

Simple slopes for a moderation model: predicted plant height in cm against amount of fertilizer in g per pot (0, 5, 10 and 15 g), drawn as one line for each of three levels of the moderator, sunlight in hours per day. Each line is labeled at its end with its level and slope: 4 hours of sun (light gray): slope 0.35 cm per g; heights 12.5, 14.25, 16 and 17.75 cm; 7 hours of sun (black): slope 0.8 cm per g; heights 14, 18, 22 and 26 cm; 10 hours of sun (orange): slope 1.25 cm per g; heights 15.5, 21.75, 28 and 34.25 cm.

Swipe sideways to see the whole diagram, or download the PNG.

Simple slopes of a moderation model - fertilizer and sunlight. Derek Jansen, Grad Coach, CC BY 4.0.

"Simple slopes of a moderation model - fertilizer and sunlight" by Derek Jansen, Grad Coach (https://gradcoach.com/open-educational-resources/moderating-variable-example/) is licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).

Cite it (APA 7):Jansen, D. (2026). Simple slopes of a moderation model - fertilizer and sunlight [Diagram]. Figshare. https://doi.org/10.6084/m9.figshare.34701516

What it shows

A moderation model: fertilizer (X) affects plant height (Y), and sunlight (W) points at that arrow, not at Y, because it changes the relation.

The effect of fertilizer is 0.35 cm per g at 4 hours of sun, 0.8 at 7 hours and 1.25 at 10 hours.

How to read it

  1. An arrow that lands on another arrow is an interaction: the moderator changes the size of the X to Y effect.

  2. On the slopes plot, lines that are not parallel show the interaction in this model; with real data, it is the test of the interaction term (b3) that shows whether moderation is there.

The model (illustrative values)

  • height = 14 + 0.8 F + 0.5 (S − 7) + 0.15 F (S − 7), with F in g and S in hours of sun per day.
  • Slope of fertilizer: 0.35 cm per g at 4 hours, 0.8 at 7 hours, 1.25 at 10 hours.
  • Predicted heights at 4 hours: 12.5, 14.25, 16 and 17.75 cm; at 10 hours: 15.5, 21.75, 28 and 34.25 cm.

Ways to use it in teaching

  • Students compute the slope at 4 and 10 hours from the model, then find them on the plot.

  • Ask why sunlight was a controlled variable in the first experiment and a moderator here.

  • Contrast with the mediation diagram, which uses the same X and Y.

For how studies name and control their variables, see our guide to research variables.

Sources

  • Baron, R. M., & Kenny, D. A. (1986). The moderator–mediator variable distinction in social psychological research: Conceptual, strategic, and statistical considerations. Journal of Personality and Social Psychology, 51(6), 1173–1182. https://doi.org/10.1037/0022-3514.51.6.1173
  • Moderation (statistics). (n.d.). In Wikipedia. Retrieved October 19, 2026, from https://en.wikipedia.org/wiki/Moderation_(statistics)

Inference and evidence

Related diagrams

All open educational resources

Need something else?

Tell us which diagram, template or worked examples would help your teaching, and we’ll do our best to add it to the collection.