How do you check whether data is normally distributed?
Look first: a histogram and a Q-Q plot, where points hugging the straight line suggest normality. Then optionally confirm with a test such as Shapiro-Wilk, remembering that large samples reject for tiny, harmless deviations.
Explain it simply
There is no single proof of normality, only evidence. Use pictures first and tests second.
- Histogram: is it bell-shaped and symmetric?
- Q-Q plot: sorted data against what a normal distribution would give. If points follow the diagonal, the data is close to normal. A curve at the ends means heavy tails; an S or bow shape means skew.
- Numbers: skewness near 0 and a mean close to the median.
- Tests: Shapiro-Wilk or Kolmogorov-Smirnov. The null hypothesis is that the data is normal, so a small p-value (say below 0.05) is evidence against normality.
Example
import numpy as np
from scipy import stats
rng = np.random.default_rng(0)
x = rng.normal(50, 10, 200)
stat, p = stats.shapiro(x)
print(p > 0.05) # usually True for truly normal data
stats.probplot(x, plot=None) # data for a Q-Q plotWith thousands of rows, Shapiro will flag almost any real data, so judge by the Q-Q plot and by how much the departure matters for your method.
What to say in the interview
"I start with a histogram and a Q-Q plot, check skewness, and then use Shapiro-Wilk if I need a formal check. Tests are sensitive to sample size, so I treat them as a supporting signal. Many methods, like t-tests, tolerate mild non-normality when the sample is reasonably large."
Common mistakes
- Reading a high p-value as proof of normality. It only means no evidence against it.