What is a Q-Q Plot?
A Quantile-Quantile plot (Q-Q plot) is a graphical tool for assessing whether a dataset follows a particular theoretical distribution — most commonly the normal distribution. It plots your sorted sample quantiles against the quantiles you would expect from a perfect normal distribution with the same mean and spread. If your data is truly normal, the points fall on the diagonal reference line.
The power of a Q-Q plot is that it doesn't just say "not normal" — it shows how your data departs from normality. The shape of the deviation is diagnostic: a curve that rises above the line at the right end means a long right tail (right skew); an S-shape means heavier or lighter tails than normal; a staircase pattern reveals rounding or discrete data. No single summary statistic carries that much information.
Q-Q plots are the standard assumption check before running t-tests, ANOVA, or linear regression — procedures whose p-values depend on approximately normal errors. This tool computes the theoretical quantiles automatically and overlays the reference line, so you can judge normality in seconds instead of computing z-scores by hand.
How to Read the Pattern
- Points on the diagonal — data is approximately normal; proceed with parametric tests.
- Right end curves up — right (positive) skew; consider a log transform.
- Left end curves down — left (negative) skew.
- S-shape (both ends off the line, opposite directions) — heavier or lighter tails than the normal distribution.
- Staircase steps — discrete or heavily rounded data, common with Likert scales and counts.
- One or two distant points — isolated outliers rather than a systematic distribution problem; investigate them with the outlier detector.
Worked Example: Checking Exam Scores for Normality
Suppose a teacher has 20 exam scores and wants to run a t-test. Paste the scores above and generate the Q-Q plot. With the Normal Sample dataset loaded, the points track the diagonal closely with small random wiggles — exactly what genuine normal data looks like. Small scatter around the line is expected; perfect alignment is actually suspicious in real data.
Now load the Right-Skewed sample. Watch the right side of the plot: the largest values rise progressively above the line, meaning your data's high quantiles are larger than any normal distribution would predict. That arch is the textbook signature of right skew — common in income, reaction-time, and count data.
The logic underneath is simple: for a sample of n = 20, the smallest value is compared against the 1/(n+1) ≈ 4.8th percentile of the normal curve, the second smallest against the 9.5th, and so on. When your ordered values match those theoretical positions point for point, the plot is a straight line.
Common Misreadings
- Demanding a perfect line. Real normal data wiggles around the diagonal, especially in small samples; judge systematic curves, not noise.
- Over-reacting to the endpoints. The extreme quantiles are the noisiest; one stray point at an end is an outlier question, not a normality verdict.
- Treating it as a yes/no test. A Q-Q plot is a diagnostic, not a p-value. Pair it with Shapiro–Wilk if you need a formal test.
- Forgetting why you're checking. Mild non-normality rarely matters at n > 30 thanks to the central limit theorem; severe skew at small n is the real danger.
Frequently Asked Questions
What does a Q-Q plot tell me?
How many data points are needed?
What do curved patterns in a Q-Q plot mean?
Is a Q-Q plot a formal normality test?
Why does normality matter?
Key Terms
- Quantile
- A cut point dividing ordered data into equal-sized groups — e.g. the median is the 0.5 quantile.
- Theoretical Quantile
- The position a value would occupy in a perfect normal distribution with the same mean and spread.
- Reference Line
- The diagonal on a Q-Q plot; points on it indicate the sample matches the theoretical distribution.
- Normality
- How closely data follows the bell-shaped normal distribution — the key assumption behind t-tests and ANOVA.
- Heavy Tails
- More extreme values than a normal distribution predicts; shows as both ends of the Q-Q plot leaving the line.
- Shapiro–Wilk Test
- A formal hypothesis test of normality — the numerical companion to the visual Q-Q plot.
Computation Method
- Quartiles are calculated using linear interpolation (method 7 from Hyndman & Fan, 1996), consistent with Python's NumPy and pandas defaults.
- Outlier detection uses the Tukey fences method: lower fence = Q1 − 1.5 × IQR, upper fence = Q3 + 1.5 × IQR.
- Chart scaling caps the display axis at the upper fence value so the visualization remains clear even when extreme outliers are present.