# Plotting residuals vs fitted values or vs independent variables?

I've seen posts where residuals were plotted against fitted values $$\hat{y}$$ and posts where they were plotted against the independent variable (assume simple linear regression for simplicity).

When is one preferred over the other? What information is present in each that might not be present in the other? In terms of assessing homoscedasticity, it seems that either would work?

Follow-up question. If you plot residuals vs independent variable and identify no signs of heterscedasticity. Does this guarantee that a plot of residuals vs fitted values will show the same behavior?

• You seem to imply plain regression as context, but the ideas of residual and fitted are more general. With just one predictor $x$ (you say: independent variable) a plot of residuals against fitted ($a + bx$, say) is essentially the same as a plot against $x$, although the difference in labelling on the horizontal axis is not always trivial. But with many predictors $x_j$ the plots are often far from being the same. Otherwise put, a residual versus fitted plot is a general health check for a model; a plot versus a specific $x_j$ is more focused on how that variable appears in the model. Jul 9, 2020 at 17:37
• @NickCox I used simple linear regression for context because I thought the same concepts would apply to multiple regression. Could you expand on what you mean by "labelling on horizontal axis is not always trivial?" Jul 9, 2020 at 18:10
• Simply, axis labels on the same scale as the response may make it easier to think about the range of fitted values. I mean numbers by labelled ticks, not axis titles, which some people call axis labels. Jul 9, 2020 at 21:44