Normal quantile plots

A histogram can be used to assess normality, but not all symmetric and bell-shaped histograms are normal. An easier tool to use is the normal quantile plot, or just normal plot for short. Here is how it works.

Suppose the vector is called x. Then type

qqnorm(x)

To obtain the normal quantile plot and type

qqline(x)

to add a line to the plot.

Normally distributed data should lead to a fairly straight plot, so the added line helps judge the straightness of the qqplot. The advantage this plot has over a histogram for judging normality is that it is easier to judge linearity or lack of it than to judge adherence to the normal pdf.

Here is a function you can cut-and-paste into Splus to perform both qqnorm() and qqline() in one step:

qqboth <- function(x, ...)
{
qqnorm(x,...)
qqline(x)
}

A little illustration

Generate a random vector from a normal distribution and apply qqboth() to the vector. Do this several times to get a feeling for the variability in the pictures. Prepare some space in the graphics window via:

par(mfrow=c(3,3))

Then

qqboth(rnorm(100))

Try it several times. Then re-do it with:

qqboth(rnorm(20))

Now apply qqboth to some non-normal data:

qqboth(rexp(100))



Which uses 100 random numbers from an exponential and:

qqboth(rlogis(100))

which uses 100 random numbers from a logistic distribution and then

qqboth(runif(100))

which samples from the uniform distribution.