# Why is the fit line of a QQ (normality) plot not y=x, reflecting the theoretical normal distribution?

Given the definition of the fit line in a normal probability plot, I expected that this line would follow the y=x equation, i.e. that the x coordinate of any point on the line would equal its y coordinate. However, that doesn't seem to be the case. The following Matlab code does a QQ plot for a vector of 1000 numbers pulled from a standard (mu=0, sigma=1) normal distribution:

x = max * randn(1,1000);
qqplot(x)


and gives the plot below which looks like this when you zoom around the (0,0) point: That the generated values are not exactly on (but in this case a bit below) the line is clearly due to the random sampling of the generated numbers. But why is it that the line itself does not pass through the (0,0) point when that should reflect the "perfect" (theoretical) normal distribution?

As for the data points themselves, isn't it the case that any (x,y) point shows that the kth-ranked value in both distribution is x quartiles away from the median of the theoretical distribution and y quartiles away from the median of the observed distribution?

• You are plotting from a distribution with mean 1 against a theoretical distribution with mean 0. That is explicit in either case. There's a shift therefore. – Nick Cox Nov 30 '16 at 15:48
• mean 1? No, randn(1,1000) in Matlab just gives 1000 numbers from a stadard normal distribution (mu=0, sigma=1). I've editd my question to clarify this. – z8080 Nov 30 '16 at 16:18
• My mistake. Thanks for the correction. Presumably 1 x 1000 matrix and further arguments would specify non-default mean and SD. (I've used MATLAB about twice, although no excuse for an incorrect comment.) – Nick Cox Nov 30 '16 at 17:28
• I think on reflection the bigger deal is that successive quantiles are necessarily highly correlated. Thus even with samples from exactly the same distribution, points will drift around the line and hang together. – Nick Cox Nov 30 '16 at 17:29
• Try this more than once. Each set of points will wiggle slightly but the wiggle below and above the line of equality won't be identical. Not even a large sample can be an exact replica of its parent. – Nick Cox Nov 30 '16 at 18:12

The y-axis is labelled "Quantiles of Input Samples", so having a fixed line at $y=x$ would be useless except for the case where the samples are actually generated from $N(0,1)$. In fact, the line is a function of the data, likely with intercept = $\bar{x}$ and slope = $s$.

Here is an illustration in R (note that the left frame has intercept $\approx 1$ and the right frame has slope $\approx 2$):

> x11 <- rnorm(100,1) # 100 draws from N(1,1)
> x02 <- rnorm(100,0,2) # 100 draws from N(0,2)
> par(mfrow=c(1,2))
> qqnorm(x11, main="N(1,1)")
> qqline(x11)
> abline(v=c(0,1), h=c(1,2), lty=2)
> qqnorm(x02, main="N(0,2)")
> qqline(x02)
> abline(v=c(0,1), h=c(0,2), lty=2) • This. Same goes for the slope: if you compare the quantiles of a scaled Normal distribution (e.g. one with variance 4 instead of 1) to those of a standard Normal distribution the slope between them will not be 1. I think the line in qqplot is the line you'd get from a Normal distribution that has the same mean and variance as your sample. – Ruben van Bergen Nov 30 '16 at 15:51