The normal probability plot is formed by plotting the sorted data vs. an approximation to the means or medians of the corresponding
order statistics; see
rankit. Some plot the data on the vertical axis; others plot the data on the horizontal axis. Different sources use slightly different approximations for
rankits. The formula used by the "qqnorm" function in the basic "stats" package in
R (programming language) is as follows: : z_i = \Phi^{-1}\left( \frac{i-a}{n+1-2a} \right), for , where : if and ::0.5 for
n > 10, and is the standard normal
quantile function. If the data are consistent with a sample from a normal distribution, the points should lie close to a straight line. As a reference, a straight line can be fit to the points. The further the points vary from this line, the greater the indication of departure from normality. If the sample has mean 0, standard deviation 1 then a line through 0 with slope 1 could be used. With more points, random deviations from a line will be less pronounced. Normal plots are often used with as few as 7 points, e.g., with plotting the effects in a saturated model from a
2-level fractional factorial experiment. With fewer points, it becomes harder to distinguish between random variability and a substantive deviation from normality. ==Other distributions==