skip to content

Residual and Q-Q Plots

Residual-versus-fitted plots expose curvature and funnel shapes, and a Q-Q plot checks whether the errors look normal. Interviewers ask which assumption a given pattern is telling you is broken.

on this pageshow

questions

6

What should a residual-vs-fitted plot from a linear regression look like when the model's assumptions hold?

level: juniorimportance: must knowfreq 74%

answer

  1. boring is the goal
  2. look for a shape, not for small points
  3. flat band centred on zero
  4. check level, then check spread
  5. curve or funnel are the two shapes

basics

~10 s

A structureless horizontal band: residuals scattered randomly around zero across the whole fitted range, with roughly constant vertical spread and no curve, funnel or clustering. Any visible shape means the model is missing something.

solid answer

~50 s

The plot puts the fitted values on the horizontal axis and the residuals (observed minus predicted) on the vertical axis. When the model is right, it should be boring: a cloud centred on the zero line, equally thick from left to right, with no curvature and no drift. That picture supports two assumptions at once. Level says the mean function is correct: the residuals average zero everywhere, so the model is not systematically over- or under-predicting in any region. Spread says the error variance is constant: the band is as tall on the left as on the right. Two shapes matter most in practice. A curve (residuals negative in the middle, positive at the ends, or the mirror of it) says the relationship is not straight. A funnel widening to one side says the error variance changes with the level of the prediction.

go deeper

for a junior

Be ready to say what the axes are and that the healthy picture is a flat, even band of points around zero with no pattern. Know that a curve means the relationship is not straight and a funnel means the spread changes.

for a middle

Explain why fitted values are the right horizontal axis, which two assumptions the picture speaks to, and which two it is silent about. Be able to separate design artefacts, such as stripes from categorical predictors, from real violations.

for a senior

Show that you read the plot in a fixed order and act on it: diagnose the shape, decide whether it threatens the estimates or only the standard errors, and know when sparse points at the edges make a suspected trend not worth chasing.

for a principal

Own the judgment about how much diagnostic effort a model deserves. Argue when a visible but small violation is acceptable for the decision the model supports, and set the team norm for what must be inspected before a model is used.

## What the plot is After fitting a linear regression you have, for each observation, a fitted value `yhat_i` (what the model predicts) and a residual `e_i = y_i - yhat_i` (how far the observation sits above or below the fit). The residual-vs-fitted plot puts `yhat_i` on the horizontal axis and `e_i` on the vertical axis, usually with a horizontal reference line at zero and a smoother drawn through the cloud. It is the single most informative diagnostic picture in linear regression because it compresses every predictor into one axis (the fitted value is a weighted combination of them) and shows what the model has *failed* to explain. ## The healthy picture Three properties define a clean plot: 1. **Centred on zero everywhere.** Slice the plot vertically anywhere along the fitted range; the residuals in that slice should average about zero. The smoother should be flat and sit on the zero line. 2. **Constant vertical spread.** The band should be about as tall at the left edge as at the right. This is the visual form of constant error variance. 3. **No structure.** No stripes, arcs, gaps or drifting clumps. A residual plot that looks like static is the goal. A useful mental discipline: you are looking for the *absence* of a pattern, not for points close to the line. Residuals are supposed to be large — they carry all the variation the model does not explain. A tall but even band is fine; a thin band with a curve in it is not. ## Which assumptions this plot speaks to A linear model that is used for inference leans on four things: the mean function is correctly specified (linearity), the errors are independent, the errors have constant variance, and — only for some purposes — the errors are normally distributed. The residual-vs-fitted plot addresses the first and third directly. It says nothing about normality, which needs a quantile plot, and it usually says nothing about independence, because independence is about relationships between observations in some natural order or grouping that this plot does not display. ## The two shapes you must recognise **Curvature.** If the residuals sag in the middle and rise at both ends (or the reverse), the straight-line mean function is wrong. The model is systematically under-predicting in some ranges and over-predicting in others. This is a bias problem: the coefficients no longer describe the relationship you think they describe. **A funnel.** If the band starts narrow on the left and opens up toward the right, the size of the errors grows with the predicted level. The fitted line still passes through the middle of the data, but the assumption that every observation carries the same amount of noise is broken, and the usual standard errors and intervals are no longer trustworthy. ## Patterns that are not violations Some structure comes from the design of the data rather than from a broken assumption. - **Vertical stripes.** If the predictors are categorical or take few distinct values, the fitted values do too, and residuals stack into columns. That is expected. - **A hard diagonal edge.** If the outcome is bounded — a count that cannot go below zero, a score capped at 100 — then for high fitted values the residuals cannot be very positive, producing a straight boundary in the cloud. That is a signal about the outcome's scale, not random noise misbehaving. - **Sparse edges.** At the extremes of the fitted range there are usually few points, so the band naturally looks thinner and the smoother wobbles. Do not read a trend from three points at the right edge. ## How to read it in an interview Say what you check, in order: is the smoother flat and on zero (level), is the band equally thick (spread), is there any repeating or geometric structure (something else going on). Then name the shape you see and the assumption it indicts. Interviewers usually show a plot and want the diagnosis and the consequence, not a recital of assumptions. Finally, remember that a good residual plot is evidence of nothing being *visibly* wrong, not proof that the model is right. It cannot detect an omitted variable that happens to be uncorrelated with the fitted values, and it cannot tell you whether the relationship is causal.

  • Which regression assumptions does a residual-vs-fitted plot tell you nothing about?
    Two. Normality of the errors, which needs a quantile plot of the residuals against a normal reference, and independence of the errors, which only becomes visible when the residuals are arranged in their natural order or grouped by whatever unit repeats. A flat, even band is fully compatible with badly correlated errors.
  • Why is a high R-squared not a substitute for looking at this plot?
    R-squared is one number summarising how much variance the model explains; it says nothing about where the model is wrong. A fit can explain 90 percent of the variance and still curve systematically, so predictions are biased across whole ranges. The residual plot localises the error; R-squared averages it away.
  • The residuals stack into three vertical stripes. Is that a violation?
    Usually not. If the predictors are categorical or take only a few values, the fitted values do too, so residuals line up in columns. Read each column as a group: are they centred on zero, and are the columns equally tall? Different column heights are the real signal.

It is like listening to an engine: you are not waiting for one particular noise, you are confirming that nothing rhythmic or rising stands out from the hum.

saying these in an interview costs you the question

  • Treats individual large residuals as the thing to look for
  • Reads a high R-squared as proof the assumptions hold
  • Says the plot checks whether the errors are normal
  • Wants the points to hug the zero line rather than spread evenly
  • Cannot name which assumption a funnel or a curve indicts

context

open as a page

In a residual-vs-fitted plot from an OLS fit, what does a clean U-shaped curve indicate?

level: middleimportance: must knowfreq 64%

basics

~20 s

It indicates the straight-line mean function is wrong. The true relationship curves, so the fit over-predicts in the middle of the fitted range and under-predicts at both ends. The remedy is to change the model, not to delete points.

open as a page

In a normal Q-Q plot of regression residuals, which pattern signals heavy tails rather than right skew?

level: middleimportance: should knowfreq 55%

basics

~20 s

Heavy tails bend both ends away from the straight line in opposite directions: the lowest points fall below it and the highest rise above it. Right skew bends the whole plot upward, with both ends above the line and the largest gap at the top.

open as a page

What does a rising smoother in a regression's scale-location plot indicate about the errors?

level: middleimportance: should knowfreq 47%

basics

~20 s

It indicates non-constant error variance: the typical size of a residual grows with the fitted value. The same fact shows up in the residual-vs-fitted plot as a band that widens into a funnel toward the right.

open as a page

With 5,000 rows, a regression's residuals are clearly non-normal in the Q-Q plot. Are the coefficient p-values still usable?

level: seniorimportance: should knowfreq 42%

basics

~20 s

Usually yes. With thousands of observations the sampling distribution of a least-squares coefficient is close to normal whatever the error distribution looks like, so its p-values and confidence intervals are approximately right. Prediction intervals for individual observations get no such protection.

open as a page

Why are regression residuals plotted against fitted values rather than against the observed outcome?

level: middleimportance: nice to knowfreq 24%

basics

~20 s

Because least-squares residuals are uncorrelated with the fitted values by construction, so any pattern there is a real signal. Residuals are correlated with the observed outcome, so that plot slopes upward even when the model is perfectly specified.

open as a page