Test for heteroscedasticity as function of a single independent variable or fitted value? In tests for heteroscedasticity the residuals have to be monitored. In the literature this is done in different ways in case there is only one independent variable.

*

*residuals as function of the independent variable


*residuals as function of the fitted values
In both cases the same residuals are used but the arguments of the residuals are different.
Visually spoken, in the 1st case the residuals are plotted as function of the independent variable (middle image), in the 2nd case the residuals are plotted as function of the fitted values (right image).

Does this make a difference for the test of heteroscedasticity?

example for usage of case 1 (Link):

standard deviations of a predicted variable, monitored over different values of an independent variable

example for usage of case 2 (Link):

variance of residuals should not increase with fitted values of response variable

 A: It's important to distinguish "residuals as function of the dependent variable" (in an earlier version of this question) from residuals as a function of the fitted values of the dependent variable. The former can be misleading, as observations with large residuals might also tend to have large observed values. The latter is the set of residuals around the linear predictor (the sum of the coefficients times the corresponding predictor values, plus the intercept), and is a standard quality-control plot for linear regression that extends naturally to multiple regression.
The first example involves only a single predictor variable. For a single predictor variable, the linear predictor is just the regression line for that predictor. So in that case the "residuals as function of the independent variable" (middle plot) are functionally the same as "residuals as a function of the fitted values of the dependent variable" (your second example). With your data, a negative slope for the regression line (leftmost plot) means the rightmost plot is a mirror image of the center plot.
