Tutorials › Exam PA - Predictive Analytics › Q-Q Plots for Comparing Distribution Shapes

Exam PA · Visualization and Anomaly Detection · Tutorial 141 of 966

Q-Q Plots for Comparing Distribution Shapes

Learn to read a normal Q-Q plot as a comparison of sample and theoretical quantiles, and use its departures from a straight line as evidence about distribution shape.

Beginner 10 min read

What You'll Learn

  • Identify the theoretical and sample quantiles on a normal Q-Q plot.
  • Explain why normally distributed data should lie approximately on a straight line.
  • Recognize patterns that can indicate tail weight, skewness, or unusual observations.
  • Read the output of qqnorm and qqline in R.
  • Describe the limits of a Q-Q plot and avoid treating it as a definitive test.

What a Normal Q-Q Plot Compares

A histogram shows the overall shape of observed values, while a normal Q-Q plot compares their ordered values directly with the quantiles expected from a normal distribution. This comparison can reveal departures that are hard to judge from a histogram, especially at the tails. It is a diagnostic, not a verdict: a curved pattern is evidence to investigate, not proof of a particular cause or distribution.

Definition: A normal Q-Q plot pairs the ordered sample values with theoretical quantiles from a standard normal distribution. The horizontal coordinate is a theoretical normal quantile; the vertical coordinate is the corresponding ordered sample value. If the sample is reasonably consistent with a normal distribution, the plotted points should lie approximately along a straight line.

For a sample of size \(n\), write the ordered observations as \(x_{(1)} \leq x_{(2)} \leq \cdots \leq x_{(n)}\). Each observation \(x_{(j)}\) is paired with a theoretical quantile \(z_j\) chosen for its rank. In R, qqnorm(x) makes a normal Q-Q plot, and qqline(x) adds a reference line based on the sample and theoretical quartiles. The line is a visual guide, not a fitted probability model.

Theoretical quantiles are calculated from the standard normal distribution, \(N(0,1)\). For example, the theoretical quantile at cumulative probability \(p=0.90\) is approximately \(1.282\). Software must choose plotting positions to assign probabilities to the ordered observations; different conventions can give slightly different values, particularly in small samples. Focus on the overall pattern rather than expecting a particular set of exact coordinates.

Why Normal Data Make a Straight Line

The straight-line pattern follows from the relationship between normal distributions. Suppose observations come from a normal distribution with mean \(\mu\) and standard deviation \(\sigma>0\). Its population quantile at probability \(p\) is \(\mu+\sigma z_p\), where \(z_p\) is the standard normal quantile at that probability. Thus, if the plotted sample quantile is close to its population quantile, it is close to a linear function of the theoretical quantile.

$$ Q_X(p) = \mu + \sigma z_p $$

This relationship also explains what the line's position and slope represent. A positive slope is expected because higher theoretical quantiles pair with higher sample quantiles. The intercept and slope reflect location and scale; they do not, by themselves, establish that the data are normal. The justification is the standardization of a normal variable: if \(X \sim N(\mu,\sigma^2)\), then \(Z=(X-\mu)/\sigma \sim N(0,1)\). Rearranging gives \(X=\mu+\sigma Z\), and the same affine relationship holds for corresponding quantiles.

In an actual finite sample, points need not fall exactly on a line, even if the data were generated from a normal distribution. Sampling variation, small sample size, rounding, and ties can all affect the pattern. The relevant question is whether departures from a line are modest and unsystematic or instead form a consistent curve, tail pattern, or isolated point.

Worked Example: Recognizing an Approximately Normal Pattern

A hypothetical sample has five ordered observations paired with the following theoretical normal quantiles. Assess the pattern using the proposed line \(y=10+2x\), where \(x\) is the theoretical quantile and \(y\) is the sample value. Round the calculated sample values and residuals to three decimals.

The theoretical quantiles are \(-1.282,-0.524,0,0.524,1.282\). For each, calculate the value predicted by the line:

At \(x=-1.282\), \(y=10+2(-1.282)=7.436\). At \(x=-0.524\), \(y=10+2(-0.524)=8.952\). At \(x=0\), \(y=10\). At \(x=0.524\), \(y=11.048\). At \(x=1.282\), \(y=12.564\).

Suppose the ordered sample values are \(7.436, 8.952, 10.000, 11.048, 12.564\). The residual, defined here as observed value minus line value, is zero for each pair. The points therefore fall exactly on the stated line at the displayed precision.

Interpretation. The paired quantiles show a straight-line pattern, consistent with a normal shape at these five ranks. The line has intercept \(10\) and slope \(2\), indicating the location and scale represented by this constructed pattern. Five points are not enough to establish normality; real samples would show sampling variation.

Method and mistake avoided. Compare ordered observations to the theoretical quantiles and assess the pattern, rather than comparing the observations to zero. A normal sample need not have mean zero or standard deviation one; those are properties of the theoretical reference scale.

Reading Departures from the Reference Line

A useful first reading is to look for systematic departures across several adjacent points. Then compare the lower and upper tails, and finally check whether a single observation is separated from the overall pattern. The direction of a departure depends on the axes: in the usual R normal Q-Q plot, theoretical quantiles are horizontal and sample quantiles are vertical. A point above the line has a sample quantile greater than the line's value at that theoretical quantile.

  • Approximately straight pattern: the sample's quantiles are broadly consistent with a normal shape. This does not prove normality, particularly in a small sample.
  • Both tails depart outward: lower-tail points below the line and upper-tail points above it can indicate tails heavier than a normal distribution, relative to the central pattern.
  • Both tails depart inward: lower-tail points above the line and upper-tail points below it can indicate tails lighter than a normal distribution.
  • Unequal or asymmetric curvature: a noticeably different departure in one tail from the other can indicate skewness. Describe which tail departs and in what direction rather than relying only on a label such as “skewed.”
  • One isolated point: a single point far from an otherwise roughly straight pattern may indicate an unusual observation. The plot alone cannot determine whether that value is an error or a genuine extreme.

These patterns are clues, not unique signatures. Skewness and tail weight can both produce curvature, and the precise shape depends on the sample and reference line. For example, a strongly extended upper tail may be compatible with right-skewness, but it should be described as an upper-tail departure rather than automatically attributed to a cause. A histogram, summary statistics, and knowledge of how the data were collected provide useful context. The earlier material on boxplots and empirical cumulative distribution plots offers other views of the same observations.

Worked Example: Identifying Outward Tail Departures

A hypothetical normal Q-Q plot has theoretical quantiles \(x=-2,-1,0,1,2\). Its reference line is \(y=1.5x\), and the plotted sample quantiles are \(-4,-1.5,0,1.5,4\). Calculate each residual as sample quantile minus reference-line value, then interpret the tail pattern.

At \(x=-2\): the line value is \(1.5(-2)=-3\), so the residual is \(-4-(-3)=-1\). The lower-tail point is below the line.

At \(x=-1\): the line value is \(1.5(-1)=-1.5\), so the residual is \(-1.5-(-1.5)=0\).

At \(x=0\): the line value is \(0\), so the residual is \(0-0=0\).

At \(x=1\): the line value is \(1.5\), so the residual is \(1.5-1.5=0\).

At \(x=2\): the line value is \(3\), so the residual is \(4-3=1\). The upper-tail point is above the line.

Interpretation. The central three points lie on the line, while the lower tail falls below it and the upper tail rises above it. This symmetric outward departure is consistent with heavier-than-normal tails relative to the central pattern. With only five points, it is a cautious indication, not a conclusive classification.

Method and mistake avoided. Compute residuals using observed minus reference-line value, and check both tails. Calling the upper-tail point alone evidence of skewness would miss the equally strong outward departure in the lower tail.

Using R and Describing the Result

For a numeric vector x, the standard R commands are:

$$ \texttt{qqnorm(x)} \qquad \texttt{qqline(x)} $$

The plot does not estimate a complete distribution or conduct a formal hypothesis test. It provides a visual comparison of sample quantiles with normal quantiles. In an exam-style interpretation, state the visible evidence and its implication with appropriate caution. For example: “The points are roughly linear except for an upper-tail point well above the line; this may indicate a high unusual value or an upper-tail departure, but the plot alone cannot identify its cause.”

A reliable reading process is:

1
Check the axes.
Confirm that theoretical normal quantiles are horizontal and ordered sample values are vertical.
2
Assess the central pattern.
Decide whether the middle points follow an approximately straight trend or show persistent curvature.
3
Compare the tails.
Note whether both tails depart in similar directions or whether one tail differs, and describe the observed directions.
4
Check isolated points and context.
Identify points that depart sharply from their neighbors, then consider sample size, ties, measurement precision, and data meaning before drawing a conclusion.

A common exam trap is to treat every departure from the line as proof that the data are not normal. Finite samples naturally fluctuate, and small samples provide little information about extreme quantiles. The opposite mistake is to call a plot normal just because its central points are straight while the tails depart substantially. A balanced conclusion reports both the central pattern and the tail evidence.

Worked Example: Describing an Asymmetric Upper-Tail Departure

A Q-Q plot has theoretical quantiles \(x=-2,-1,0,1,2\). A reference line is \(y=x\), and the ordered sample quantiles are \(-1.4,-0.9,-0.2,0.8,2.8\). Calculate the residuals and give a cautious interpretation. Round residuals to one decimal.

The line values at the five theoretical quantiles are \(-2,-1,0,1,2\).

The residuals are, in order: \(-1.4-(-2)=0.6\); \(-0.9-(-1)=0.1\); \(-0.2-0=-0.2\); \(0.8-1=-0.2\); and \(2.8-2=0.8\).

The lower-tail point is above the line by \(0.6\), while the upper-tail point is above it by \(0.8\). The two middle points are close to the line, with residuals of \(-0.2\) each. The uppermost point's departure is more pronounced than the adjacent point's: at \(x=1\), the residual is \(-0.2\), but at \(x=2\), it is \(0.8\).

Interpretation. The central points are approximately linear, but the uppermost sample quantile rises well above the line. This suggests an upper-tail departure or a potentially unusual high observation. Because the lower-tail point also lies above the line, this small example does not show a perfectly simple one-direction pattern. More observations and other summaries would help distinguish skewness from an isolated extreme.

Method and mistake avoided. Use the sequence of residuals, not just the most extreme point, to describe the shape. Declaring “right-skewed” from one high point alone would overstate what this five-point plot establishes.

Common Interpretation Limits

A Q-Q plot compares quantiles; it does not explain why observations have their shape. It also does not show the order in which observations were collected, and it cannot distinguish a data-entry error from a valid but extreme value. If observations are rounded or discrete, tied values can create horizontal stretches in the plotted sample quantiles even when the underlying process is more continuous. With a small sample, tail behavior is particularly uncertain because only a few observations determine the ends of the plot.

Key takeaway: A normal Q-Q plot is approximately straight when sample quantiles track a location-and-scale transformation of standard normal quantiles. Describe systematic curvature, tail directions, and isolated points as evidence; do not treat the visual pattern as proof of normality, skewness, or an error.

Check Your Understanding

For each question, state what the plot supports and avoid claims stronger than the evidence.

  1. A normal Q-Q plot has theoretical quantiles \(-1,0,1\) and sample quantiles \(4,6,8\). Does this three-point pattern depart from a straight line? What line relates the sample to the theoretical quantiles? (Answer: It is exactly linear, \(y=6+2x\); three points provide very limited evidence about the full distribution.)
  2. A reference line has value \(-3\) at theoretical quantile \(-2\), and the plotted sample quantile there is \(-4.2\). Calculate the residual and state the point's position relative to the line. (Answer: Residual \(=-4.2-(-3)=-1.2\); the point is below the line.)
  3. The center of a Q-Q plot is near the line, while the lower tail falls below and the upper tail rises above it in a roughly balanced way. What departure is suggested? (Answer: Tails heavier than normal relative to the central pattern; this is suggestive, not conclusive.)
  4. Most points follow a line, but one high-end point is far above it while the lower tail stays close to the line. Give a cautious interpretation. (Answer: A potentially unusual high observation or upper-tail departure; the plot alone cannot establish the cause or prove skewness.)
  5. For theoretical quantiles \(-1,0,1\), the reference line is \(y=2x\), and the sample quantiles are \(-2.2,0,3.0\). Calculate all three residuals and describe the pattern. (Answer: Residuals are \(-0.2,0,1.0\); the upper-tail point is above the line while the lower point is close, suggesting an upper-tail departure that needs cautious interpretation.)
Clinical Biostats