Sub topic 7
Checking Whether the Data Are Normal
This chapter assumes you understand means, medians, standard deviation, histograms, box plots, and the difference between a sample and a population. It also assumes that you know the Analyze phase of DMAIC is used to identify likely causes of process variation.
Why normality matters
Many statistical tests used in Six Sigma assume that the measured output, or the model residuals, follow an approximately normal distribution. A normal distribution is symmetric around its mean, with most observations near the center and fewer observations in the tails.
Normality is an assumption, not a requirement that every data set must satisfy perfectly. Small departures from normality often have little effect on a t-test or ANOVA when the sample is reasonably large and contains no extreme outliers. Strong skew, heavy tails, or outliers can make the test's p-value and confidence interval unreliable.
Check the data that the test actually uses:
- For a one-sample test, check the individual observations.
- For a two-sample test, check each group separately.
- For a paired test, check the differences within each pair.
- For regression or ANOVA, check the residuals rather than only the response values.
Use plots before formal tests
Start with a histogram, box plot, and normal Q-Q plot. A Q-Q plot compares the ordered data with the values expected from a normal distribution. Points close to a straight line support approximate normality.
Look for these patterns:
| Pattern | Possible meaning | Next step |
|---|---|---|
| Symmetric, straight Q-Q plot | Approximately normal data | Continue with the planned test |
| Long right or left tail | Skewed data | Investigate the process or consider a transformation |
| Isolated distant points | Potential outliers or special causes | Verify the observations before deleting anything |
| Curved Q-Q plot | Heavy tails or a different distribution | Consider a robust or non-parametric method |
Use the Shapiro-Wilk test carefully
The Shapiro-Wilk test evaluates the null hypothesis that the data came from a normal distribution.
- A small p-value, often below 0.05, provides evidence against normality.
- A larger p-value does not prove normality. It means the test did not find enough evidence against it.
Sample size affects the result. With a very small sample, the test may miss meaningful non-normality. With a very large sample, it may reject normality for a minor departure that does not affect the analysis. Therefore, combine the p-value with plots, subject knowledge, and the planned test's sensitivity to non-normality.
import numpy as np
from scipy import stats
rng = np.random.default_rng(42)
before = rng.normal(loc=50.0, scale=2.0, size=30)
after = rng.normal(loc=51.5, scale=2.0, size=30)
print("Shapiro-Wilk before p =", stats.shapiro(before).pvalue)
print("Shapiro-Wilk after p =", stats.shapiro(after).pvalue)What to do when normality fails
First, check whether the unusual values are data-entry errors, measurement failures, or valid process observations. Do not remove a valid observation only because it makes the p-value inconvenient.
If the data are valid but strongly skewed, consider a transformation such as the logarithm when it fits the measurement scale. You can also use a non-parametric test. Non-parametric tests use ranks rather than relying on the original numerical distances, but they answer a somewhat different question and may have less power when the normality assumption is reasonable.
Exercise
A paired improvement study has 18 before-and-after observations. Which data should you check for normality before a paired t-test?
Show answer
Check the 18 paired differences, calculated as after minus before. The paired t-test assumes that these differences are approximately normal, not that each measurement set must independently be normal.