Why Put the Curves on the Data?
A fitted equation is compact, but its shape can be difficult to picture from its coefficients alone. Plotting observed points together with fitted candidate curves gives a direct visual comparison: do the curves follow the broad pattern of the data, where do their shapes differ, and what do they imply near the ends of the observed predictor range? Those questions are especially useful when several nonlinear forms are plausible.
An overlay is a visual comparison, not a decision rule by itself. It helps reveal what each candidate curve says about the relationship in the range where observations were collected. It does not establish that a curve is correct, or that its behavior outside that range is supported by the data.
Making a Fair Shared-Axes Plot
Use the same horizontal and vertical scales for every candidate curve and every observed point. The horizontal axis represents the predictor \(x\); the vertical axis represents the response \(y\), in its original units unless a transformation is explicitly part of the analysis. First identify the observed predictor range. Then choose axis limits that show all the observations and curves over that range clearly.
A curve is usually drawn by evaluating its fitted equation at a sequence of predictor values, then connecting the resulting predicted values smoothly. A small set of values can be enough to sketch a simple curve, but use a finer grid when the shape bends quickly. Do not connect the raw observations in the order they appear in a data table: the data points are observations, not a fitted path.
For a fitted candidate model \(j\), write its prediction at predictor value \(x\) as \(\hat y_j(x)\). On a shared plot, each point \((x_i,y_i)\) shows one observed response, while the curve for candidate \(j\) shows the sequence of predictions \((x,\hat y_j(x))\). Keep the point symbols visible and use distinct line styles or colors for the candidates, with a legend that identifies each form.
A useful overlay makes it easy to see both overall shape and local differences. It should not hide observations under thick lines or use separate axes for different candidates. If the curves nearly coincide over most of the range, that is informative too: their differences may be concentrated near one boundary or may be too small to distinguish clearly at the chosen plotting scale.
Worked Example: Overlaying a Linear and a Curved Fit
Suppose hypothetical observations have predictor values \(x=0,1,2,3,4\) and responses \(y=2.1,3.0,4.2,5.1,6.2\). Two fitted candidate equations are \(\hat y_1(x)=2.05+1.02x\) and \(\hat y_2(x)=2.00+1.00x+0.025x^2\). To sketch both curves, calculate their predictions at representative values across the observed range.
At \(x=0\), the predictions are \(\hat y_1(0)=2.05+1.02(0)=2.05\) and \(\hat y_2(0)=2.00+1.00(0)+0.025(0^2)=2.00\).
At \(x=2\), they are \(\hat y_1(2)=2.05+1.02(2)=4.09\) and \(\hat y_2(2)=2.00+1.00(2)+0.025(2^2)=4.10\).
At \(x=4\), they are \(\hat y_1(4)=2.05+1.02(4)=6.13\) and \(\hat y_2(4)=2.00+1.00(4)+0.025(4^2)=6.40\).
Plot the five raw observations and draw both fitted curves from \(x=0\) to \(x=4\), using the same axes. Both curves rise through the data range, and they are nearly indistinguishable around \(x=2\). The quadratic curve is slightly higher at the upper edge: its prediction there exceeds the linear prediction by \(6.40-6.13=0.27\) response units. This overlay shows where the candidate shapes begin to separate; it does not, by itself, decide which candidate is preferable.
Read the Shape Across the Observed Range
Compare curves over the full observed range rather than judging them from a single point or from their equation labels. Look at whether each curve increases or decreases, whether its steepness changes, whether it bends upward or downward, and whether it appears to flatten or turn within the range. These features describe the fitted relationship’s shape. The coefficients of a nonlinear equation do not always correspond directly to the slope of the curve at every \(x\).
At the lower and upper boundaries, inspect how the curve meets the data region. A curve may be steepening as it approaches the upper edge, flattening there, or turning direction just inside the observed range. These visual features matter because observations are often less informative about behavior at a boundary than they are in the middle of a range. An overlay can make the candidate curves’ implied edge behavior visible even when only a few observed points lie near an edge.
The edge of the plotted data is not a special point at which a curve becomes certain. A fitted curve is determined by a model and the available data; the line itself does not display how much uncertainty there is about its shape. Treat what the curve implies near an edge as a feature to notice and explain, not as independent evidence that the behavior is true.
Worked Example: Comparing Flattening With Continued Increase
Consider hypothetical observations at \(x=0,1,2,3,4\), with responses \(0.2,1.9,3.0,3.8,4.3\). Suppose two fitted candidates are a saturating curve, \(\hat y_1(x)=0.2+4.8(1-e^{-0.55x})\), and a quadratic curve, \(\hat y_2(x)=0.2+2x-0.2x^2\). Calculate predictions at \(x=0,2,4\) to compare their shapes across the range.
For the saturating curve, at \(x=0\), \(\hat y_1(0)=0.2+4.8(1-e^0)=0.2\). At \(x=2\), \(\hat y_1(2)=0.2+4.8(1-e^{-1.1})\approx0.2+4.8(1-0.3329)=3.402\). At \(x=4\), \(\hat y_1(4)=0.2+4.8(1-e^{-2.2})\approx0.2+4.8(1-0.1108)=4.468\).
For the quadratic, \(\hat y_2(0)=0.2\), \(\hat y_2(2)=0.2+2(2)-0.2(2^2)=3.40\), and \(\hat y_2(4)=0.2+2(4)-0.2(4^2)=5.00\).
On a shared plot, the candidates nearly agree at \(x=2\), but their predictions at the upper observed boundary differ by \(5.00-4.468=0.532\) response units. The saturating curve is becoming flatter as it approaches that edge, whereas the quadratic is still increasing more sharply there. Both are increasing throughout the observed range in this example. The overlay makes the difference in edge shape apparent without requiring a claim about which curve is correct.
Why Common Axes Matter
A comparison is meaningful only when visual distances represent the same data-unit distances for all candidates. If one curve is shown on a narrower vertical scale than another, the same difference in predicted response can look large in one plot and small in the other. Even when all curves appear in one panel, unusually tight axis limits can make small differences look dramatic; very broad limits can make important differences hard to see.
The effect of the vertical axis can be stated precisely. If the displayed vertical range is from \(y_{\min}\) to \(y_{\max}\), a response difference \(\Delta y\) occupies a fraction \(\Delta y/(y_{\max}-y_{\min})\) of that range. Thus, changing the axis limits changes the apparent size of a gap, though it does not change the gap in response units. Use limits that show the data and curves clearly, and interpret visual separation with the response units in mind.
Worked Example: Checking Separation at Both Boundaries
Suppose the observed predictor values range from \(x=2\) to \(x=8\), and two fitted candidates are \(\hat y_1(x)=1.2+0.8x\) and \(\hat y_2(x)=1.2+0.8x+0.04(x-5)^2\). Hypothetical observations occur at \(x=2,4,6,8\), with responses \(3.1,4.2,6.4,8.2\). Calculate curve predictions at both boundaries and at the center.
At the lower boundary, \(x=2\), the first curve predicts \(1.2+0.8(2)=2.80\). The second predicts \(1.2+0.8(2)+0.04(2-5)^2=2.80+0.36=3.16\).
At the center, \(x=5\), both predict \(1.2+0.8(5)=5.20\), because the quadratic term is \(0.04(5-5)^2=0\).
At the upper boundary, \(x=8\), the first predicts \(1.2+0.8(8)=7.60\), while the second predicts \(1.2+0.8(8)+0.04(8-5)^2=7.60+0.36=7.96\). The second curve is \(0.36\) response units above the first at both boundaries and agrees with it at the center. A shared overlay would display this symmetric bend directly. It would also show the observed points relative to both candidates; the calculated predictions alone do not indicate how close either curve is to every observation.
A Short Justification for the Overlay
An overlay lets the viewer compare predictions at the same predictor value because all curves share the same horizontal coordinate. At any \(x\), the vertical gap between two candidate curves is exactly the difference between their fitted predictions, \(\hat y_1(x)-\hat y_2(x)\). The sign indicates which curve predicts the higher response, and the magnitude is in response units.
For example, in the preceding example the difference is \(\hat y_2(x)-\hat y_1(x)=0.04(x-5)^2\). At \(x=5\), it is \(0\); at either boundary, where \((x-5)^2=9\), it is \(0.04(9)=0.36\). Therefore the candidate curves meet at the center and separate symmetrically toward the boundaries. This conclusion follows directly from the equations, and the overlay makes it easy to see where that difference occurs relative to the observations.
Common Mistakes and Practical Checks
A polished overlay is not automatically a fair or complete comparison. Before interpreting one, check that the candidate curves and observations use the same predictor and response scales, that the entire observed predictor range is displayed, and that the plotted lines represent the fitted equations rather than a hand-drawn path through the points.
- Using different scales for different candidates. The wrong reasoning is that separate panels are comparable because each has a labeled axis. The correction is to align the axes and use the same limits when the goal is a direct visual comparison.
- Judging a curve by only its middle. Two candidates may nearly coincide in the center but separate near a boundary. Check predictions and shapes across the entire observed range, especially near its ends.
- Treating a line beyond the data as observed evidence. A smooth curve can continue past the observed range, but there are no observations there to show whether that continuation is supported. Keep the overlay focused on the observed range unless an out-of-range display is specifically needed to communicate a model implication.
- Equating visual closeness with proof of a better model. A plot is useful for seeing shape and agreement, but appearance alone does not establish that a candidate is correct. Explain what the plot shows without turning it into a claim the data cannot support.
The main value of an overlay is that it translates candidate equations into comparable shapes in context. It shows how fitted relationships behave across the observed predictor range and how their predictions differ near its edges. That makes the candidate forms easier to explain before drawing broader conclusions from an analysis.
Check Your Understanding
Use the ideas in this tutorial to answer the following questions.
- What are the two axes of an overlay of response data and fitted candidate curves, and why must the curves share the same scales?
- A predictor is observed from 3 to 12. What does the curve’s appearance at \(x=3\) and \(x=12\) describe, and what does it not establish?
- Two fitted curves have the same prediction at the midpoint but differ at both range boundaries. What can an overlay help you describe about their shapes?
- Why can changing the vertical axis limits make a fixed difference between candidate predictions look larger or smaller?
- What is the difference between a raw observation and a point on a fitted curve?