Normality testing
Is the distribution of a quantitative variable close to normal – before a t-test, ANOVA or regression, for the whole sample or for each group separately. The output is like Explore in SPSS: a descriptives table (mean, median, trimmed mean, skewness and kurtosis with their standard errors and z), a table of normality tests (Kolmogorov-Smirnov with the Lilliefors correction and Shapiro-Wilk), a histogram with a normal curve, a Q-Q plot, report sentences – and a reading box that says which of all this matters at your sample size.
Loading the data
Paste columns directly from the sheet (including the header row) – select them in Excel, copy, and paste here:
Variable selection
When to use?
Before a test that assumes normality – a t-test, ANOVA, regression, Pearson correlation – and especially when the sample is small. Field (2024, section 6.9) explains why the variable itself is checked, even though the assumption concerns the model's errors: if the outcome variable is normally distributed, the errors should be too, so checking the distribution of the variable is a "useful first step" – and if the outcome is clearly not normal (for example heavy positive skew), perhaps the linear model is not the right model in the first place. Pallant (2020, chapter 6) runs this check through Explore on every dependent variable before the tests in the fourth and fifth parts of her book, and for tests that compare groups – for each group separately (Factor List). That is why the page offers grouping.
What the page does not check: the other assumptions – linearity, equal variance, independence – which are more important than normality (the Outliers and assumptions page, section 3); and the residuals of a regression model (they are on the regression page). A single Likert item is an ordinal variable under the site convention (Variables and levels of measurement) – the normality question is not the right question for it, and the page warns when it is selected; a multi-item scale score (Cronbach's alpha and scale score) – yes.
The logic: graphs before numbers, numbers before tests
Field's order (2024, sections 6.9.4-6.9.5 and Box 6.7) is also the order of the output here. First the shape – histogram and Q-Q plot: both show visually whether the distribution is symmetric, whether there is a long tail to one side, and whether there are isolated values far from the rest. Then the numbers – skewness and kurtosis: in a normal distribution both are zero; positive skew – a pile-up at the low values and a tail to the right, negative – a pile-up at the high values; positive kurtosis – heavy tails, negative – light tails; "the further the value is from zero, the more severe the deviation" (section 6.9.5). Pallant (2020, chapter 6) has the same yardstick, with an addition: in reasonably large samples skewness "will not make a substantive difference in the analysis", and kurtosis may lead to an underestimate of the variance, but this risk too diminishes from 200 participants upward (Tabachnick and Fidell, 2013, as cited in Pallant). And only at the end the tests – with caution (section Normality tests).
Behind all this stands the central limit theorem (Field, 2024, Sections 6.2.7 and 6.8.3): what the tests need is a normal sampling distribution of the mean (or of the coefficient), and it approaches normality as the sample grows – regardless of the shape of the data. The accepted value is 30, but with a heavy-tailed distribution 100 or even more may be needed (Box 6.4). This is why the "Interpreting the result" box opens with the sample size: in a small sample normality really matters, and in a large sample it hardly matters – and the normality tests say exactly the opposite.
How to read the output?
Table 1 – description of the distribution. This is the Descriptives table of Explore, with three comparisons worth making in it. Mean vs. median: in a symmetric distribution they are close; positive skew pulls the mean up but not the median, so "if the mean is larger than the median, there is probably positive skew" (Field, 2024, Section 6.9.5) – and vice versa. Mean vs. 5% trimmed mean: SPSS removes the top 5% and the bottom 5% of the values and computes a new mean; "if the two means are very different, you may need to investigate these data points" – the extreme values have influence (Pallant, 2020, chapter 6; in her example 26.73 vs. 26.64 – very similar, and the cases stay). Skewness and kurtosis vs. their standard errors: the ratio gives z (Field, 2024, Equation 6.34) – above 1.96 significant at .05, above 2.58 at .01, above 3.29 at .001 (Box 6.7). The table marks this with asterisks, but note Field's own example: in the hygiene data of day 1 (N = 810) the skewness was -0.004 – a perfectly symmetric distribution – and still the kurtosis came out "significant" (z = −2.38), and "because of the large sample these findings should be taken with a pinch of salt, and we can take comfort from the central limit theorem". In a large sample the asterisks almost always appear; the value itself – not z – is what is read.
Table 2 – normality tests. The Tests of Normality table: the null hypothesis is that the distribution is normal, so p < .05 says "significantly different from normal" and p > .05 – "no difference found" (Field, 2024, Section 6.9.5; Pallant, 2020, Chapter 6). The degrees of freedom equal N: the sample is compared with an ideal normal distribution, not with N − 1 (Field, note 14 to chapter 6). Kolmogorov-Smirnov (D) measures the maximum distance between the cumulative distribution of the sample and that of a normal distribution with the sample's mean and standard deviation; since the mean and standard deviation are estimated from the data, the ordinary Kolmogorov-Smirnov p is incorrect, and the "Lilliefors correction" is used – this is the note below the table in SPSS (Gross & Ligges, 2015, lillie.test documentation). Shapiro-Wilk (W) is the squared correlation between the sorted data and the values expected under normality – 1 for a perfect fit, and smaller the larger the deviation; it is computed for up to 5,000 observations (R Core Team, 2024, shapiro.test documentation). In SPSS Shapiro-Wilk is printed next to Kolmogorov-Smirnov, and in the same table here too. When the two disagree – which happens quite often – there is no "winner": both are a signal to go back to the plots.
The histogram with the normal curve (the sample's mean and standard deviation) – look at symmetry, at peakedness or flatness, and at isolated distant values: in Field's example the value 20.02 on a 0-4 scale was discovered in the histogram before any test, and after it was corrected to 2.02 the distribution looked normal (section 6.9.3). The Q-Q plot (quantile-quantile; Field, 2024, Section 6.9.4): for each observed value, the normal score that would be expected for its rank is computed; if the data are normal, the points sit on the diagonal line. An arc (the points "bulge" above the line in the middle) – skewness; an S shape – heavy or light tails (Figure 6.23). The page draws as SPSS does: the observed on the horizontal axis and the expected on the vertical; in R the axes are reversed, and so are the patterns (Field, note 12 to chapter 6). Identical values – as on a rating scale – share one larger point. Pallant (2020) also reads the Q-Q plot this way: "a reasonably straight line suggests a normal distribution".
Normality tests – why with caution
Field (2024, Box 6.7) writes that he presents these tests "mainly because people expect to see these sorts of things in introductory textbooks, not because they are a good idea". The problem is twofold, and its two sides run opposite to what is needed: (1) in a large sample the tests are significant even for small, unimportant deviations – and precisely there, thanks to the central limit theorem, normality hardly matters; so the test causes worry and correction of something that needs no correction. (2) In a small sample, where there is reason to worry, the test has no power to detect a violation – and it "encourages us not to worry about something that we probably ought to be worried about". His advice: in a large sample do not use the tests at all ("essentially don't worry too much about normality"); in a small sample – pay attention when the test is significant, "but resist the false sense of security when it is not". The same in Pallant (2020, chapter 6): in her example (N = 433) Kolmogorov-Smirnov came out p = .000 even though the histogram "appears reasonably normal" – "this is quite common in larger samples", and Tabachnick and Fidell recommend using the histogram instead. Field's example is similar: day 1 (N = 810) looks perfectly normal and Kolmogorov-Smirnov gave p = .097 – "close to being surprisingly significant", only because of the sample size (section 6.9.5).
The site convention – "both". The tests are printed, because they appear in SPSS output and in articles and one needs to know how to read them; but the "Interpreting the result" box gives them weight according to sample size – in a sample of 200 or more it says explicitly to ignore them, between 30 and 200 to decide by the shape, and below 30 to take a significant test seriously and not to rely on a nonsignificant one. Reporting a normality test alone, without skewness, kurtosis and a plot, is not reporting a normality check.
What to do when it is not normal
First of all – do not panic: normality is the least important of the linear model's assumptions, and it concerns the errors (the Outliers and assumptions page, sections 3-4; Field, 2024, section 6.8). The order there: outliers and typing errors before anything else – a value outside the range of the scale is an error and not "non-normality"; a genuine outlier stays, unless it has been shown not to belong to the population. Then, when the violation is real and the sample is small, robust methods and bootstrap instead of transforming the outcome (section 6 there). And when a test that does not assume normality is wanted – the nonparametric alternatives: Mann-Whitney instead of the independent-samples t, Wilcoxon instead of the paired t, Kruskal-Wallis instead of one-way ANOVA. Pallant (2020, chapter 6) adds a reassuring note: many scales in the social sciences are skewed "not because of a problem with the scale but because of the nature of the construct being measured" – life satisfaction is negatively skewed (most people are fairly satisfied), anxiety and depression measures in the general population are positively skewed; this is a description of the world, and in a large sample not a problem for the test.
And how do you do it in SPSS?
Pallant's procedure (2020, chapter 6, "Assessing normality"): Analyze › Descriptive Statistics › Explore… – the variables into the Dependent List box; the grouping variable (if any) into Factor List; the ID variable into Label Cases by; under Display – Both; Statistics… – Descriptives and Outliers; Plots… – Histogram (and uncheck Stem-and-leaf) and Normality plots with tests; Options… – Exclude cases pairwise. Field (2024, section 6.9.2) stresses the last option: the default, listwise, drops a participant from all the variables if a value is missing on one of them – in his example 810 participants on day 1 would become 123. The syntax the page generates:
EXAMINE VARIABLES=attitude_score age BY group /PLOT HISTOGRAM NPPLOT /STATISTICS DESCRIPTIVES /CINTERVAL 95 /MISSING PAIRWISE /NOTOTAL.
Reading the output. Descriptives = Table 1 (including 5% Trimmed Mean, Interquartile Range, Skewness and Kurtosis with Std. Error; SPSS does not print z – divide by hand, or read it here); Tests of Normality = Table 2 (with the note Lilliefors Significance Correction, and .200* when the Kolmogorov-Smirnov p is .200 or more – "a lower bound of the true significance"; the page prints the computed value); Histogram, Normal Q-Q Plot and Detrended Normal Q-Q Plot (the deviation of the points from the line – they should scatter around zero without clustering; Pallant) and Boxplot; Extreme Values – the five highest and lowest values with the row number (this is how Field found the 20.02). Without /NOTOTAL SPSS also adds a row for the whole sample when there is a grouping variable.
And how do you do it in R?
In base R: shapiro.test(), qqnorm() and qqline(), hist(); for Kolmogorov-Smirnov with the Lilliefors correction – lillie.test() from the nortest package (Gross & Ligges, 2015; the p of base ks.test() is incorrect when the mean and standard deviation are estimated from the data – as stated in the package documentation), and for skewness and kurtosis with the SPSS formulas – skewness() and kurtosis() from the e1071 package with type = 2. Note: R's mean(x, trim = 0.05) trims a whole number of observations from each side, so it is not identical to SPSS's 5% Trimmed Mean; and SPSS's interquartile range is obtained with quantile(type = 6). The script was run as is on the sample data file and gave the table values (in the comments). The site rule for Hebrew in R: a UTF-8 file, every comment line starts with an English word, and a UTF-8 locale for Hebrew names.
# Normality testing – Professor Stat. This file is saved as UTF-8; every comment line starts with an English word
library(readxl) # Reading Excel
library(e1071) # Skewness and kurtosis with the SPSS formulas (type = 2)
library(nortest) # Lilliefors test (Kolmogorov-Smirnov with the Lilliefors correction)
# Loading: the standard template – row = participant, column = variable; the sheet "data"
d <- read_excel("C:/Rdata/DATA_normality_example_eng.xlsx", sheet = "data")
y <- d[["attitude_score"]]; y <- y[!is.na(y)]
# Description – Table 1: mean, standard error, median, standard deviation, confidence interval, interquartile range (type = 6 = SPSS)
n <- length(y)
c(n = n, M = mean(y), SE = sd(y) / sqrt(n), Mdn = median(y), SD = sd(y)) # 120, 3.269, 0.068, 3.25, 0.745
mean(y) + c(-1, 1) * qt(0.975, n - 1) * sd(y) / sqrt(n) # 95% confidence interval [3.135, 3.404]
quantile(y, c(0.25, 0.75), type = 6) # 2.75, 3.84 – interquartile range 1.09
# Skewness and kurtosis as in SPSS (type = 2), the standard errors and z
sk <- skewness(y, type = 2); ku <- kurtosis(y, type = 2) # −0.060, −0.142
se_sk <- sqrt(6 * n * (n - 1) / ((n - 2) * (n + 1) * (n + 3))) # 0.221
se_ku <- sqrt(4 * (n^2 - 1) * se_sk^2 / ((n - 3) * (n + 5))) # 0.438
c(z_skew = sk / se_sk, z_kurt = ku / se_ku) # −0.27, −0.32
# Normality tests – Table 2
shapiro.test(y) # W = 0.993, p = .818
lillie.test(y) # D = 0.045, p = .795
# Plots: histogram with a normal curve, and a Q-Q plot (in R the expected is on the horizontal axis – the reverse of SPSS)
hist(y, freq = FALSE); curve(dnorm(x, mean(y), sd(y)), add = TRUE)
qqnorm(y); qqline(y)
# By group: the same for each level of "group"
by(d[["attitude_score"]], d[["group"]], shapiro.test) # Group 1: W = 0.972, p = .179; group 2: W = 0.985, p = .692
Reporting the results
Report what you saw, not only what was tested: the shape in words (approximately symmetric; moderate positive skew), skewness and kurtosis with their standard errors, and if a test is reported – the statistic, the degrees of freedom (= N) and the exact p. Field's example (2024, section 6.9.5) is a description: "on day 1 the skew is basically zero, a symmetric distribution; on days 2 and 3 skew values around 1, positive skew". The report sentences in the output are built this way, in English: the shape of the distribution (by thresholds that are a site convention: skewness up to 0.5 in absolute value – "approximately symmetric", 0.5-1 "moderate", above 1 "marked"; the same thresholds for kurtosis), the values with their standard errors, mean, median and standard deviation, and then the two tests. When the sample is large, state explicitly that the decision is by the shape and not by the test, and refer to the central limit theorem. The formatting rules (American Psychological Association [APA], 2020, Section 6.36): D, W and p without a zero before the decimal point (they cannot exceed 1); skewness and kurtosis – with a zero.
Common mistakes
Deciding by the p of a normality test in a large sample. With an N in the hundreds almost everything is "significant", and almost nothing matters (Field, 2024, Box 6.7; Pallant, 2020, Chapter 6).
Being reassured by a nonsignificant p in a small sample. The test has no power; "no deviation found" is not "no deviation". Look at the plots.
Reading the asterisks of z instead of the value. z grows with the sample; a skewness of 0.3 is a small skew at N = 50 and also at N = 5,000, even though only the second has asterisks.
Testing the whole sample when the test compares groups. The assumption concerns the distribution within each group; two normal groups with different means look bimodal together.
Transforming because of skewness. Before that – outliers and typing errors; after that – robust methods and bootstrap, not a transformation of the outcome (the Outliers and assumptions page, section 6).
Testing the normality of a single Likert item. Five possible values are not normally distributed and are not supposed to be; a single item is an ordinal variable – frequencies and median (Frequencies and descriptive statistics).
Leaving the listwise default in Explore. A participant with a missing value on one of the variables is dropped from all of them (Field, 2024, Section 6.9.2; Pallant, 2020, Chapter 6) – select pairwise, as the page does.
Using the p of ks.test in R. It assumes a known mean and standard deviation; for normality with estimated parameters – lillie.test (Gross & Ligges, 2015).
References
American Psychological Association. (2020). Publication manual of the American Psychological Association (7th ed.). https://doi.org/10.1037/0000165-000
Field, A. (2024). Discovering statistics using IBM SPSS statistics (6th ed.). SAGE.
Gross, J., & Ligges, U. (2015). nortest: Tests for normality (R package version 1.0-4) [Computer software]. https://CRAN.R-project.org/package=nortest
Pallant, J. (2020). SPSS survival manual: A step by step guide to data analysis using IBM SPSS (7th ed.). Open University Press.
R Core Team. (2024). R: A language and environment for statistical computing (Version 4.3.3) [Computer software]. R Foundation for Statistical Computing. https://www.R-project.org/
Tabachnick and Fidell (2013) – as cited in Pallant (2020); Royston (1995) – as cited in R's shapiro.test documentation; Dallal and Wilkinson (1986) and Stephens (1974) – as cited in the nortest package documentation; Joel and Charlot (2022) – as cited in Field (2024). Under the site rule, the reference list includes only sources that were read in the original; Pallant (2020) and APA (2020) – by chapter and section of the printed edition; Field (2024) in a reflowable digital copy – by section, box and note; the R and nortest documentation – as printed in R 4.3.3. The Shapiro-Wilk algorithm and the Lilliefors p approximation were implemented on the page following the implementation in R and verified against it and against PSPP.