# Why is the QQ Plot for Normal Distribution a Straight Line?

Pardon my basic question on this, but I could not find why the QQ Plot for normal distribution is a straight line.

Also, according to the accepted answer here: Percentile vs quantile vs quartile quantiles are in the range [0,1], but QQ plots shows quantiles that are clearly outside the [0, 1] range. Here is one I made in R:

set.seed(20160420)
x <- rnorm(1000)
qqnorm(x)
qqline(x, lty=2, col="red") • The short answer is: it's designed to do precisely that. IMHO, a much more interesting and useful question to ask is "given that the Normal QQ plot is designed to make samples from normal distributions plot along a diagonal line, exactly how does it do that?" – whuber Apr 21 '16 at 14:35

Why is the QQ Plot for Normal Distribution a Straight Line?

The values on the y-axis are the sorted data values (the order statistics).

The values on the x-axis are what you'd expect sorted data (at the same sample size) from a standard normal distribution to give. That is, the smallest data value is paired with what you expect the smallest data value from a standard normal distribution of the same sample size to be, the second smallest data value is paired with the expected second-smallest data value from a standard normal distribution, and so on up to the largest value.

Since any normal distribution is a scaled and shifted standard normal distribution, and scaling and shifting just change the axes, not the appearance of the plot, samples drawn from any normal distribution should yield a plot where the values are close to a straight line (if the values are really from a normal distribution, the plot can wiggle away from a straight line but it won't deviate in a consistent fashion from a straight line).

Also, according to the accepted answer here: Percentile vs quantile vs quartile quantiles are in the range [0,1], but QQ plots shows quantiles that are clearly outside the [0, 1] range.

The answers there are worded in a way that it might mislead you. The quantile function takes values between 0 and 1 as its argument, and produces values on the range taken by the original random variable or sample (depending on whether it's population or sample quantiles under discussion).

So with a standard normal distribution (which can take values between $-\infty$ and $\infty$), $q(\frac12)$ is the median ($0$), $q(0.025)$ is the 2.5 percentile ($-1.96$) and so on ... $q=F^{-1}(p)$ for $0< p< 1$ (equality can occur for distributions that are not on an infinite range). For a sample quantile, there are various definitions possible (the package R offers nine different ones) but they all attempt to choose values so as to give approximately the right proportion of data below them.

Because you are plotting values randomly sampled from a normal distribution against the normal distribution itself - i.e. the values on the x and y axis are virtually the same by definition - and are the same in the limit.

In answer to your second question note that the scale on the figure shown is number of std deviations from the mean, which has no upper or lower bound. If the scale related to proportion of observations, then the scale would be defined to be between 0 and 1 (or 0% and 100%), and the frequency of observations would not peter out at either end: instead it would be constant. For example, try amending your code to increase the number of random samples e.g. change x <- rnorm(1000) to x <- rnorm(10000), and the axes will adjust to include the 4th standard deviation.

• I've applied minor edits but I couldn't understand "the density of observations would not out at either end, as it would be even" to rewrite it. – Nick Cox Apr 21 '16 at 8:07
• I have re-read and rewritten that sentence and the one after. I don't think those sentences worked to convey my meaning. – Robert de Graaf Apr 21 '16 at 10:30