Why Fitted Lines Need Observed Data
An interaction plot can make a change in slope look clear: two fitted lines may diverge as the focal predictor increases. But a fitted line is a model summary, not a picture of how densely the data cover every part of the predictor range. If one line is supported by many observations across that range while another is supported only near one end, the apparent contrast over the full range may depend heavily on extrapolation.
Checking observed predictor coverage means displaying the observed data alongside the fitted interaction lines and asking where observations actually occur. This check does not replace estimating or testing an interaction. It helps you judge what parts of the plotted pattern are supported by the observed predictor combinations and where the model is being asked to extend beyond them.
The Model and What an Interaction Plot Shows
For two quantitative predictors \(x\) and \(z\), consider the linear interaction model
Here \(Y_i\) is the outcome for observation \(i\), \(x_i\) and \(z_i\) are its predictor values, and \(\varepsilon_i\) is the error. The model specifies a linear conditional mean in the included terms: \(E(Y_i\mid x_i,z_i)=\beta_0+\beta_1x_i+\beta_2z_i+\beta_3x_iz_i\). For interpreting fitted lines as descriptions of the mean, assume this form is adequate over the predictor region being discussed and that observations provide relevant support there. Usual regression inference also relies on conditions such as independent errors and an appropriate error-variance model; normal errors are often used for exact small-sample inference. A coverage plot alone cannot verify those assumptions.
At a fixed value \(z=z_0\), the conditional fitted line as \(x\) changes is
Thus, the fitted slope for \(x\) at \(z_0\) is \(\hat{\beta}_1+\hat{\beta}_3z_0\). An interaction plot typically draws this line for each of several selected \(z\) values. When \(z\) is continuous, however, an observed point has its own \(z\) value; it does not automatically belong to every plotted line. A useful display therefore shows the points' actual \(x\) and \(y\) values and communicates their \(z\) values—for example, through color, symbols, or small panels. If a line is drawn for \(z_0\), highlight observations with \(z\) near \(z_0\), rather than implying that distant \(z\) values lie on that slice.
A Short Justification for Checking Coverage
The model's slope contrast between two fixed values \(z_1\) and \(z_2\) follows directly from the conditional slopes:
So the fitted lines differ in slope whenever \(\hat{\beta}_3\) and \(z_2-z_1\) are nonzero. This algebra describes the fitted model, not the distribution of observations. If few or no observations support the relevant combinations of \(x\) and \(z\), the lines can still be drawn there, but their plotted separation is not equally well anchored by observed data throughout the displayed range. The line equation alone cannot answer the coverage question; the observed predictor values must be inspected.
Worked Example: Broad Overlap Supports a Visual Comparison
Suppose a hypothetical analysis relates task-performance points \(Y\) to practice hours \(x\) and a centered preparation score \(z\). The fitted equation is \(\widehat{Y}=10+2x+z+0.5xz\). To illustrate two slices, compare \(z=-1\) and \(z=1\). The observed practice-hour ranges for observations near these slices are 0–10 hours in both cases, with points spread across each range.
At \(z=-1\), the fitted line is
Its predictions at the ends of the observed range are \(9+1.5(0)=9\) points and \(9+1.5(10)=24\) points. At \(z=1\), the line is
giving \(11+2.5(0)=11\) points and \(11+2.5(10)=36\) points. The estimated slopes are 1.5 and 2.5 points per practice hour, respectively. Because observations near both \(z\) values cover the same broad \(x\) range, a plot can compare the fitted slopes across that range without one line relying on a much longer unsupported extension than the other. The points still matter: a wide range with only a few observations at one end would be weaker support than a similarly wide, well-populated range.
The overlapping coverage makes the comparison more grounded in the observed predictor combinations; it does not prove that the model is correct or that the slope difference is statistically significant. Those are separate questions.
How to Read the Overlay
Use \(z\) values that are meaningful for the question and lie within the observed range. Record which observations are near each slice.
Display the actual \(x\) and \(Y\) values. Use color or panels to show the observations' \(z\) values; do not treat all points as though they came from one fixed-\(z\) line.
For each slice, check how far observations extend in \(x\), how densely they cover that range, and whether the slices have comparable coverage.
If a fitted line extends past the observed \(x\) values for its slice, describe that portion as extrapolation or weakly supported rather than presenting it as equally evidenced.
For continuous \(z\), there may not be many observations with exactly the selected value. A practical display can use narrow, clearly described bands around representative \(z\) values, or small panels showing ranges of \(z\). Bands should not be so broad that they mix substantially different fitted slopes, especially when the interaction is large. Alternatively, color points by their actual \(z\) values and draw selected conditional lines, while making clear that the line represents a fixed \(z\) slice. In every case, keep the observed pairs \((x,z)\) visible or otherwise summarize their distribution.
Worked Example: A Long Fitted Line With Sparse Support
Consider a hypothetical model for crop yield \(Y\), with fertilizer amount \(x\) in kilograms per hectare and a centered soil index \(z\): \(\widehat{Y}=40+x+0.8xz\). The fitted lines are to be compared at \(z=0\) and \(z=2\). In the hypothetical data, observations near \(z=0\) span \(x=0\) to \(10\), while those near \(z=2\) occur only between \(x=8.8\) and \(10\), with just a few observations in that narrow band.
At \(z=0\), the fitted line is \(\widehat{Y}=40+x\), with slope 1 yield unit per kilogram per hectare. Its fitted values at \(x=0\) and \(x=10\) are 40 and 50 yield units. At \(z=2\),
The second fitted slope is 2.6 yield units per kilogram per hectare. The model predicts \(40+2.6(8.8)=62.88\) yield units at \(x=8.8\) and \(40+2.6(10)=66\) at \(x=10\). But it has no observations near \(z=2\) at \(x=0\), or across most of the plotted range from 0 to 8.8. Drawing the \(z=2\) line from 0 to 10 may make the slope contrast seem supported across the full range, even though its observed coverage is concentrated near the upper end.
The correct reading is not that the interaction must be false. Rather, the plot shows that the \(z=2\) slope is estimated from a narrow and sparse range, so its extension across the full \(x\) range is weakly supported. A reader should be cautious about broad claims comparing yields at high and low fertilizer amounts for \(z=2\). The observed coverage also signals that a small number of points could have substantial influence on that part of the fitted pattern.
Joint Coverage and Predictor Association
Even when both predictors individually span wide ranges, the observed combinations of \(x\) and \(z\) may be limited. For example, if low \(x\) values occur almost exclusively with low \(z\) values and high \(x\) values almost exclusively with high \(z\) values, the data may contain little information about comparisons that hold one predictor fixed while changing the other. This is why inspecting the joint predictor coverage matters: a plot of the outcome against \(x\) alone can hide which \(z\) values accompany each part of the \(x\) range.
The fitted model still supplies conditional lines for any chosen \(z\), but a line at \(z=z_0\) is well supported only where observations near that \(z_0\) also cover the relevant \(x\) values. Empty regions in the observed \((x,z)\) combinations are not filled in by drawing more of the fitted line. If the predictors are associated, describe that pattern and distinguish observed combinations from model-based extensions.
Worked Example: Wide Marginal Ranges but Little Joint Overlap
Suppose a hypothetical model relates a greenhouse growth measure \(Y\) to light exposure \(x\) in hours and a centered nutrient index \(z\): \(\widehat{Y}=20+0.5x+3z+0.4xz\). The observed predictor pairs lie approximately along a diagonal: \((0,-2),(2,-1),(4,0),(6,1),(8,2)\), with additional observations clustered near those pairs. Thus, \(x\) ranges from 0 to 8 and \(z\) ranges from -2 to 2, but observations at low \(x\) tend to have low \(z\), and observations at high \(x\) tend to have high \(z\).
The conditional slope for \(x\) at \(z=-2\) is \(0.5+0.4(-2)=-0.3\) growth units per light hour. The line at that \(z\) is
It predicts 14 at \(x=0\) and \(14-0.3(8)=11.6\) at \(x=8\). At \(z=2\), the slope is \(0.5+0.4(2)=1.3\) growth units per light hour, and the fitted line is
This line predicts 26 at \(x=0\) and \(26+1.3(8)=36.4\) at \(x=8\). Yet the observed pairs put \(z=-2\) near \(x=0\) and \(z=2\) near \(x=8\); they do not show observations near \(z=2,x=0\) or \(z=-2,x=8\). Therefore the two lines' predictions at the opposite ends of the range rely on combinations far from the observed cloud. The plot should make that limitation visible. The fact that each predictor has a wide marginal range does not mean the conditional slopes are equally supported over all \(x\) values.
Common Mistake: Treating Every Line Segment as Equally Evidenced
- Wrong reasoning: “The fitted lines are drawn from \(x=0\) to \(x=10\), so the slope difference is supported throughout that interval.”
- Correction: A line can be drawn anywhere the model equation can be evaluated. Check whether observations at the relevant \(z\) values actually cover each part of the \(x\) interval.
- Wrong reasoning: “Both predictors have a wide range, so all predictor combinations are represented.”
- Correction: Inspect their joint coverage. Strong association between predictors can leave large parts of the \((x,z)\) plane empty.
- Wrong reasoning: “A sparse region proves the interaction is absent.”
- Correction: Sparse coverage limits how confidently the plotted pattern can be interpreted in that region; it does not establish that the interaction is zero.
Check Your Understanding
Use the fitted lines and observed predictor patterns to answer these questions.
- For the model \(\widehat{Y}=5+2x+z+0.3xz\), what is the fitted slope for \(x\) at \(z=2\)? State the units if \(Y\) is measured in points and \(x\) in hours.
- In a plot, one selected \(z\) slice has observations across the full \(x\) range, while another has observations only near its upper end. Which portion of the second fitted line should be treated cautiously, and why?
- Why does displaying observations against \(x\) without showing or summarizing their \(z\) values provide an incomplete coverage check for an interaction?
- Suppose each predictor has a broad range, but observed pairs lie close to a diagonal in the \((x,z)\) plane. What does this suggest about predictions at combinations far from that diagonal?
- Does a region with few observed points prove that the interaction is absent? Explain what the coverage plot does and does not establish.