Mauchly’s test of sphericity
Variances (spread) · Three or more repeated measures · reference distribution: χ²
When to use it
Check sphericity before a repeated measures ANOVA: the variances of the differences between conditions must be equal.
Null hypothesis
The covariance matrix is spherical.
Assumptions
- Multivariate normality
- At least three conditions
Test statistic
W = \dfrac{\det(\mathbf{S})}{\left(\operatorname{tr}(\mathbf{S}) / p\right)^p}How to report it
W = 0.71, χ²(2) = 6.2, p = .045, Greenhouse-Geisser ε = 0.78
In R and Python
R
library(afex)
summary(aov_ez("id", "y", df, within = "time")) # includes Mauchly's test
Python
import pingouin as pg
pg.sphericity(df, dv="y", subject="id", within="time")
In Python, stats is scipy.stats and np is numpy.
Variants and alternatives
- Repeated measures ANOVA, with the Greenhouse-Geisser or Huynh-Feldt correction if sphericity fails
Where it sits in the catalog
Variances (spread). They compare how spread out the data are, not the center. Useful on their own, as in quality control, and to check the equal-variance assumption of other tests.
Three or more repeated measures. The same individuals measured under three or more conditions or time points: the paired design with more than two measurements.
In the decision tree
- What do you want to do? Check an assumption or the distribution of the data
- What do you want to check? Sphericity, before a repeated measures ANOVA
It also appears alongside other tests:
- To check an assumption before Repeated measures ANOVA.