# QQ Plot and Shapiro-Wilk Test Disagree

My QQ Plot shows that the data is not normally distributed

qqplot(residual_values, fit = True, line = '45')
pylab.show()


It has a skewness of 0.54

residual_values.skew()  # 0.5469389365591185


But the p_value of Shapiro-Wilk test is greater than 0.05, telling me that it is normally distributed

shapiro(residual_values) # (0.9569438099861145, 0.2261517345905304)


What is the correct inference from this? Is it normally distributed or not?

• The QQ plot looks consistent with being normally distributed. Did you expect every point to fall exactly on the line? – The Laconic Mar 10 at 20:24
• It is approximately normally distributed if you are prepared to discount slight skewness. No procedure ever indicates more. – Nick Cox Mar 10 at 21:07
• It's approximately normal, the skewness in the sample is quite mild; this doesn't automatically mean the population is also skewed (though I expect it is). A high p-value on a test of normality doesn't mean that it is normal, only that you couldn't detect whatever population non-normality there was. (The answer to "is it normally distributed" is "no" - unless you generated it to be normal it won't actually be normal -- but why would it have to be?) – Glen_b Mar 10 at 23:09

The QQ plot is an informal test of normality that can give you some insight into the nature of deviations from normality; for example, whether the distribution has some skew, or fat tails, or there are specific observations that deviate from what you would expect from a normal distribution (outliers). The QQ plot can often convince you that the distribution is definitely not normal, but this isn't such a case. Here, the points fall more or less along the line, which is broadly consistent with normality--intuitively, the sort of variation you would expect to see in a small sample.

The Shapiro-Wilk test is a formal test of normality. I'm not familiar with the shapiro function's output, so I'm not sure which number, if either, is supposed to be the p-value, but if you say it's largish, then we are led to accept the null hypothesis of normality. And this is consistent with what we see qualitatively in the QQ plot.

The q-q is consistent with (not "proving") approximate normality, more or less.

The Shapiro-Wilk is a formal test of normality and as such, it cannot confirm the null hypothesis of normality. The data may be reasonably consistent with normality yet still be from a different nonnormal underlying distribution. Frequentist hypothesis tests, as a general rule, cannot prove a hypothesis, and failure to reject (p>alpha) does not support the null hypothesis.

@The Laconic gave some decent advice to interpret the q-q plot. However, large p-values do not lead you to accept the null hypothesis (therefore, you don't conclude normality based on this test; the best you can do is say insufficient evidence of nonnormality at the a priori chosen alpha level).

My understanding is that, given power issues with normality tests, they are not highly recommended. As a result I don't use them any more, preferring QQ plots (which are recommended in the literature I have seen).

• I was under the impression formal tests of normality are usually too powerful and too frequently detect immaterial departures from normality. Visualization is generally preferred, as you said (and theoretical knowledge when available). – LSC Mar 11 at 0:57

The Shapiro-Wilk p-value being >0.05 indicates lack of evidence against normality. That is consistent with the QQ plot you showed, which is not too far off the line. I don't see what the inconsistency is here. Also, you should give a CI for the skewness coefficient.