Is it normally distributed? Shapiro-Wilk test and Q-Q plot
In brief
Many methods (t test, analysis of variance, Pearson correlation, regression) assume that certain values are approximately normally distributed: in a group comparison the values within each group, in regression the residuals (the deviations from the line). With larger samples, what matters most is that the means behave roughly normally. Under "How is something distributed?" Statable tests each number column as a whole with the Shapiro-Wilk test and shows it in a chart. For a group comparison, the shape within the groups matters, not that of the whole column.
The Shapiro-Wilk test
- It gives W (close to 1 means: fits a normal distribution well) and a p.
- p < .05: the distribution departs from a normal distribution. p ≥ .05: the test does not indicate a departure. This is no proof that the values are normally distributed.
- It is calculated for 3 to 5000 valid values; it is omitted for few-level columns (for example answers from 1 to 5).
- With many people the test flags even small, unimportant departures; with few it misses large ones. So always look at the chart too.
Lilliefors as a second test
Next to Shapiro-Wilk there is the Lilliefors test (Kolmogorov-Smirnov with estimated mean and SD). It is read in the same way and is usually less powerful. More in the article "Goodness-of-fit tests".
The Q-Q plot
Under "Charts" → "Show numbers as" you can choose between histogram, box plot and Q-Q plot. In the Q-Q plot each value is a point against the value a normal distribution would predict. If the points lie close to the line, the normal distribution fits. Curves show skewness, fanning out at the ends shows outliers or heavy tails. The histogram can additionally show the normal curve. In regression the same is available as "Q-Q plot of the residuals".
What if it does not fit?
- Whether a departure matters for the t test and the analysis of variance depends mainly on clear skewness and outliers, not on a fixed number of people: without either, Welch's tests hold even with small groups.
- With clear skewness, outliers or few-level values: choose "No normal distribution (rank test)" in a group comparison (Statable names the reason before the calculation); for correlation use Spearman.
- Look at a single outlier in the data check before changing anything else.
Typical example
Reaction times are almost always right-skewed: a few very slow answers pull the mean up. The test shows p < .001, the Q-Q plot bends upward at the top end, the median describes the center better.
Shapiro-Wilk: W = .912, p < .001