# Disagreement between studentized Breusch-Pagan test and the plots "residuals vs fitted" and "scale location"

Given the model:

> Durée <- c(6, 5, 3.5, 3, 5, 3, 2, 8, 2.5)
> Note  <- c(18, 16, 14, 10, 15, 13, 8, 19, 12)
> model <- lm(Note ~ Durée)


I was tasked, among other things, to verify whether homoscedasticity is true.

After running plot(model) I was able to visualise the following graphs:   From the Residuals vs Fitted and Scale-Location plots, we can see that the line is very far from being straight, which indicates the presence of heteroscedasticity.

However, when I run the studentized Breusch-Pagan test using the command bptest(model), I got the following output:

    studentized Breusch-Pagan test

data:  model
BP = 1.8622, df = 1, p-value = 0.1724


The test gives a p-value of 0.1724, which is greater than 0.05. This means that we can't reject the hypothesis of homoscedasticity, which contradicts, at least in my understanding, the output of the plots previously mentioned.

• You only have 9 data points. Very few tests could possibly return a significant result with such a small sample size. Mar 2 at 4:46
• By "significant", I mean $p < 0.05$. As in, it is unlikely a test would return $p<0.05$ with only 9 data points. Mar 2 at 4:51
• I just think you just don't have enough data to see whether homescedasticity is violated with only 9 data points. Maybe you could conclude a hint that homoscedasticity might be violated but you just don't have enough information to tell. Mar 2 at 5:39
• As in, if you had lots of data points, the plots looked like there was an issue, but the test was non-significant? I would probably trust the plot. But I don't really know the test particularly well. Mar 2 at 6:09
• @AlexJ Why not turn that into an answer?
– mkt
Mar 2 at 10:06

I believe that tests of assumptions are very often "essentially useless" (see: Why use normality tests if we have goodness-of-fit tests?, e.g.). Box said, "All models are wrong, but some are useful." In that spirit, homoscedasticity is a model, and the idea that it is perfectly met is implausible. A test of a false null can return either a correct decision or a type II error (because you don't have enough data). It is much better to assess the apparent magnitude and type of deviations from perfectly met assumptions than to conduct formal tests. The best way to do this is generally to look at appropriate plots.

For assessing possible heteroscedasticity, the scale-location plot is better than the plot of residuals vs fitted values. In neither case does it look like you have a magnitude of heteroscedasticity that is likely to cause problems. On the other hand, it looks like you have a curvilinear relationship between Note and Duree (but don't have enough data to establish that with a conventional degree of confidence).

• "In neither case does it look like you have a magnitude of heteroscedasticity that is likely to cause problems" I don't understand. Do you mean that the magnitude of peresent heteroscedasticity is unlikely to cause problems or the opposite? Mar 3 at 12:01
• @MehdiCharife, it is implausible to assume that you have no heteroscedasticity, but the amount you probably have is small enough that it will not cause any problems. Mar 3 at 12:21
• "The amount you probably have is small enough that it will not cause any problems" Can you please explain why is that the case? Mar 3 at 12:28
• @MehdiCharife, assumptions are never perfectly met. Fortunately, regression methods are quite robust to minor violations of the assumptions. Any heteroscedasticity you have is likely to be very minor. You may want to click on the heteroscedasticty tag, sort by votes, and start reading some of our existing threads on the topic to learn more about it. Mar 3 at 12:37
• I'm aware of the methods used to test for heteroscedasticity. I just don't understand why the amount I have is likely to be very minor? From what I see, the line in the scale vs residuals plot is very (not slightly) far from being straight. Doesn't that point at the opposite direction? Mar 9 at 22:48

You just don't have enough data to see whether homoscedasticity is violated with only 9 data points. Maybe you could include a hint that homoscedasticity might be violated but you just don't have enough information to tell.

• How much data would be enough data? 30? Mar 3 at 14:02
• @MehdiCharife, that's a question of statistical-power. You would need to specify the type of heteroscedasticity you care about, how much there is, & the test you would use to detect it, then you would do a power analysis. The result would tell you the $N$ required to achieve your desired level of power at your chosen alpha. In the real world, this is not something anyone ever does--it's another reason why tests aren't really good for this task. Mar 3 at 14:19