Bartlett’s Test in r, a hypothesis test, is used to determine if there is a statistically significant variation between two or more independent sets of normally distributed continuous data. This test is useful in determining whether particular groups or strata could be used to identify the root cause of process problems.

For example, if Assembly Line A product weights have a variance of 1 gram, Assembly Line B has a variance of 2 grams, and Assembly Line C has a variance of 2.5 grams. You want to see if one of these lines really has more variation than the other or if it is a random chance.

Bartlett’s test for homogeneity in variances can be used to verify that are equal for all samples. Before running certain statistical tests such as the One Way ANOVA, it checks that the assumption about equal variances has been confirmed. This test is used when your data are from a normal distribution. For non-normal distributions, a similar test is Levene’s test.

The null hypothesis is that all samples have equal variances. This is a stats term.
H0: s12 = s22 = … = sk2.
The alternative hypothesis, which you are testing, is that the variances for any pair of pairs are not equal:
H0: s12 s22 … sk2.

Bartlett’s Test in r for Sphericity


Bartlett’s test for Sphericity compared your correlation matrix (a matrix Pearson correlations), to the identity matrix. It checks for redundancy among variables that can be summarized using some factors.

  • IBM SPSS 22 allows you to find the test by going to the Descriptives menu. Analyse-> Dimension reduction-> Factor->Descriptives-> KMO, Bartlett’s test for sphericity.
  • Instructions in R.

Bartlett’s Test is used to verify that variances across groups are equal. It is simple to use and yields valid results, provided that data points within groups were randomly selected from a normal distribution.

Bartlett’s test can detect deviations from normality. A normality test is a prudent option. There are three simple tests that can be used to test for deviations from normality.

Note: Hartley’s Fmax test also tests homogeneity. However, Bartlett’s test doesn’t assume equal sample sizes between groups.