A Q-Q plot (quantile-quantile plot) is a graphical tool that compares your data’s quantiles against the quantiles of a theoretical distribution (usually the normal distribution) to assess whether your data follow that distribution. You enter a single column of numeric data, and the plot shows whether the points fall roughly along a straight diagonal line; if they do, your data are approximately normal.
Formula
The Q-Q plot itself is not a formula but a scatterplot. For each ordered data value x(i) (i = 1, 2, …, n), you compute a theoretical quantile qi from the standard normal distribution using the formula:
qi = Φ−1( (i − 0.5) / n )
where Φ−1 is the inverse standard normal cumulative distribution function, and n is the sample size. The plot shows x(i) on the vertical axis and qi on the horizontal axis. If the data are normally distributed, the points will lie close to the line y = μ + σ·q (where μ is the mean and σ is the standard deviation of the data). The correlation coefficient r between the ordered data and the theoretical quantiles is a numeric summary of how straight that line is; values close to 1 indicate good normality.
Worked Example
Using the default data set: 1.2, 2.3, 3.1, 4.0, 4.9, 5.8, 6.7, 7.5, 8.4, 9.2 (n = 10). First, sort the data (already sorted). Compute the theoretical quantiles for i = 1 to 10 using (i − 0.5)/10:
- i=1: (1−0.5)/10 = 0.05 → Φ−1(0.05) ≈ −1.6449
- i=2: (2−0.5)/10 = 0.15 → Φ−1(0.15) ≈ −1.0364
- i=3: 0.25 → −0.6745
- i=4: 0.35 → −0.3853
- i=5: 0.45 → −0.1257
- i=6: 0.55 → 0.1257
- i=7: 0.65 → 0.3853
- i=8: 0.75 → 0.6745
- i=9: 0.85 → 1.0364
- i=10: 0.95 → 1.6449
Now compute the Pearson correlation coefficient between the sorted data and these quantiles. The data are perfectly linear (each step is 0.9 or 0.8, but overall the pattern is very close to a straight line). Calculating r gives approximately 0.9999, which is very close to 1, indicating that the data are nearly perfectly normal. The calculator shows r = 0.9999 and n = 10.
Assumptions
- The data are a random sample from a continuous distribution.
- The theoretical distribution is the standard normal (mean 0, standard deviation 1) – the plot automatically accounts for the data’s own mean and standard deviation.
- The sample size is large enough (at least ~10) for the quantile approximation to be meaningful.
How to Read a Q-Q Plot
Look at how closely the points follow the straight diagonal line (the reference line). In practice:
- Points hug the line → data are approximately normal.
- Points curve upward at the right end → heavy right tail (positive skew).
- Points curve downward at the left end → heavy left tail (negative skew).
- S-shaped pattern → data have lighter tails than normal (platykurtic) or heavier tails (leptokurtic), depending on the direction.
- Points deviate at both ends → outliers or a distribution with thicker tails than normal.
Remember that a Q-Q plot is a visual aid. It does not give a p-value. For a numeric test, use the Shapiro–Wilk test or the Anderson–Darling test, but the Q-Q plot is often more informative because it shows how the data deviate, not just that they deviate.
How to Choose the Right Normality Test
Several tests exist, and the choice depends on sample size and context:
- Shapiro–Wilk test: best for small samples (n < 50), powerful and widely used.
- Kolmogorov–Smirnov test: for larger samples, but less powerful than Shapiro–Wilk for detecting deviations.
- Anderson–Darling test: good for moderate to large samples, more sensitive to tails.
- Jarque–Bera test: based on skewness and kurtosis, works well for large samples.
For most purposes, the Q-Q plot combined with the Shapiro–Wilk test is a solid approach. If your sample is large (say > 100), even tiny deviations become significant, so rely more on the Q-Q plot than on the p-value.
Common Problems and Misconceptions
- “My data are normal because the p-value is > 0.05.” That only means you cannot reject normality; it does not prove normality. Small samples often fail to detect non-normality.
- “The Q-Q plot looks straight, so I’m fine.” For small samples, even normal data can show wiggly patterns. Use the correlation coefficient as a guide.
- Ignoring outliers – a single outlier can make the plot look terrible. Investigate outliers before concluding non-normality.
- Using the wrong quantile formula – some software uses (i−0.5)/n, others use i/(n+1). The difference is negligible for large n.
- Confusing the Q-Q plot with a P-P plot – a P-P plot compares cumulative probabilities, which is less sensitive to tail deviations.
Alternatives to the Q-Q Plot
If you cannot use a Q-Q plot or want a different view:
- Histogram with overlaid normal curve – quick but less precise for small samples.
- Boxplot – shows skewness and outliers but not normality directly.
- Shapiro–Wilk test – gives a numeric p-value.
- Kernel density plot – smooths the histogram for a better visual.
Remember that many statistical methods (like t-tests and ANOVA) are robust to moderate non-normality, especially with large samples. The Q-Q plot helps you decide whether a transformation (e.g., log) is needed.
Frequently Asked Questions
What does a Q-Q plot tell you?
It tells you whether your data come from a normal distribution by plotting your data quantiles against theoretical normal quantiles. If the points form a straight line, the data are approximately normal.
How do I know if my Q-Q plot is good?
Look for points that stay close to the diagonal reference line. The correlation coefficient (r) is a numeric summary: r > 0.99 indicates excellent normality, while r < 0.95 suggests notable deviation.
What if my Q-Q plot is curved?
A curve indicates skewness or heavy tails. For example, an upward curve at the right means right-skewed data. Consider a log transformation or a non-parametric test.
Can I use a Q-Q plot for non-normal data?
Yes, you can compare your data to any theoretical distribution (e.g., exponential, uniform), but the most common use is for normality. The same logic applies: compare quantiles.
What sample size do I need for a Q-Q plot?
There is no strict minimum, but with fewer than 10 points the plot is hard to interpret. For very small samples, use a Shapiro–Wilk test instead.
Is the Q-Q plot affected by outliers?
Yes, outliers pull the ends of the plot away from the line. If you see a few extreme points, check if they are data errors before deciding your data are non-normal.
Related
Formula used
in l | Data values (comma separated) | - | 1.2, 2.3, 3.1, 4.0, 4.9, 5.8, 6.7, 7.5, 8.4, 9.2 | 0 out r | Correlation coefficient (r) | - | corr(sort(l), qnorm((seq(1,count(l))-0.5)/count(l))) | 4 out n | Sample size (n) | - | count(l) | 0
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.
More in this section
- Normality to g/L Converter & Formula29.220 g/L
- Normality to meq/mL Conversion Calculator1.0000 meq/mL
- Normality Test Results: How to Analyze Them
- Normality Test for Paired t Test: How to Check
- Normality Slay the Spire?
- Normality SI Unit & How to Calculate It0.4000 eq/L