
Image by Editor
It is very common that, before running core statistical tests like ANOVA and t-rests, your data must pass an unavoidable “entry requirement”: it has to be normally distributed, i.e. the way its values are distributed should visually resemble a symmetric bell curve in shape. This is important because otherwise conclusions drawn from subsequent analyses might be unreliable.
There are two standard diagnostic tools used to assess data normality before running downstream analyses, particularly parametric ones, which require the aforementioned conditions: Q-Q Plots and Shapiro-Wilk Test. Let’s uncover and compare them in terms of strengths, limitations, and usefulness.
Q-Q Plots: the Visual Check
Q-Q plot stands for “Quantile-Quantile”, and it is a visual approach whose aim is to compare your data to a mathematically perfect bell curve. Ironically, the Q-Q plot doesn’t display this “ideal bell curve” associated with a normal distribution as a curve, but as a straight, diagonal line (as we will see in the example below). But it is intended to simplify interpretation: if your data points appear tightly clustered around this line from one corner to the other, your data is normally distributed. Meanwhile, if they predominantly look distant from the line, your data may be skewed.
A Q-Q plot helps see exactly where your data normality goes missing, but bear in mind its interpretation ultimately depends on human judgment, being somewhat subjective.
Shapiro-Wilk Tests: the Formal Check
For a more exact, mathematical answer, consider applying a formal technique like the Shapiro-Wilk test, which accurately computes how far your data points deviate from a perfect normal distribution’s bell curve. Just like most statistical tests, it outputs a YES vs. NO probability score called a p-value. If 0>0.05, your data is assumed to behave normally.
This test eliminates possible human biases, but when used on large samples, it might be too sensitive, flagging even tiny deviations as failures and raising “false alarms” unnecessarily.
Anderson Darling Tests: the Tail Specialist
This is an alternative to Shapiro-Wilk tests, in which particular attention is paid to the edges of your data distribution, i.e. its left and right tails. Rather than a p-value, it outputs tiered grading scale that indicates how strictly the data meets normality: the lower, the better. While flexible and able to accommodate other distributions beyond normal, the Anderson Darling is generally deemed as less interpretable than Shapiro-Wilk in terms of results.
Example and Verdict: Which One to Use?
In practice, the best strategy is to utilize a combination of these approaches: Q-Q plot to comprehend the data shape, and Shapiro-Wilk (or Anderson Darling) to further confirm what your visuals show. In Python, for instance, you can use both methods with just a few instructions like this:
import scipy.stats as stats
import matplotlib.pyplot as plt
# A small sample of data (e.g., test scores)
data = [88, 92, 95, 85, 90, 89, 93, 87, 91, 86]
# 1. Visual Check: Q-Q Plot
stats.probplot(data, dist="norm", plot=plt)
plt.title("Q-Q Plot of Test Scores")
plt.show()
# 2. Formal Check: Shapiro-Wilk Test
stat, p_value = stats.shapiro(data)
print(f"Shapiro-Wilk p-value: {p_value:.3f}")
# (If p > 0.05, normal distribution in the data can be assumed)
# 3. Tail Check: Anderson-Darling Test
print(f"Anderson-Darling statistic: {stats.anderson(data).statistic:.3f}")
Output: Shapiro-Wilk p-value: 0.970.
Anderson-Darling statistic: 0.116

Based on what we learned, would you agree with me that the dataset in the example looks quite normally distributed?
