Equality (Homogeneity) of Variance


Menu locations:

Analysis_Analysis of Variance_Oneway

Analysis_Analysis of Variance_Kruskal-Wallis).


StatsDirect provides parametric (Bartlet and Levene) and nonparametric (squared ranks) tests for equality/homogeneity of variance.


Most commonly used statistical hypothesis tests, such as t tests, compare means or other measures of location. Some studies need to compare variability also. Equality of variance tests can be used on their own for this purpose but they are often used alongside other methods (e.g. analysis of variance) to support assumptions made about variance. For this reason, StatsDirect presents equality of variance tests with analysis of variance.


Bartlett and Levene (parametric) tests


Two samples

Use the F testto compare the variances of two random samples from a normal distribution. Note that the F test is quite sensitive to departures from normality; if you have any doubt then please use the nonparametric equivalent described below.


More than two samples (Levene)

StatsDirect gives Levene's test as an option with One Way Analysis of Variance.


The W50 definition of Levene test statistic (Brown and Forsythe, 1974) is used; this is essentially a one way analysis of variance on the absolute (unsigned) values of the deviations of observations from their group medians.


Levene's test assumes only that your data form random samples from continuous distributions. If you are in any doubt about this, use the squared ranks test presented below, it is generally more robust.


More than two samples (Bartlett)

StatsDirect gives Bartlett's test as an option with One Way Analysis of Variance.


Bartlett's test assesses equality of the variances of more than two samples from a normal distribution (Armitage and Berry, 1994).


Please note that Bartlett's test is not reliable with moderate departures from normality; use Levene's test as an alternative routinely. Bartlett's test is included here solely for the purpose of continuity with textbooks.


Squared Ranks (nonparametric) test

StatsDirect gives the squared ranks test as an option in the Kruskal-Wallis test.


The squared ranks test can be used to assess equality of variance across two or more independent, random samples which have been measured using a scale that is at least interval (Conover, 1999).


When you analyse more than two samples with the squared ranks test, StatsDirect performs an automatic comparison of all possible pair-wise contrasts as described by Conover (1999).


Assumptions of the squared ranks test:



From Conover (1999, p. 305).

Test workbook (Nonparametric worksheet: Machine X, Machine Y).


The following data represent the weight of cereal in boxes filled by two different machines X and Y.


Machine X Machine Y
10.8 10.8
11.1 10.5
10.4 11.0
10.1 10.9
11.3 10.8


To analyse these data in StatsDirect you must first prepare them in two workbook columns appropriately labelled. Alternatively, open the test workbook using the file open function of the file menu. Then select Kruskal-Wallis from the Nonparametric section of the analysis menu. Then select the columns marked "Machine X" and "Machine Y" in one selection action. Ignore the Kruskal-Wallis test result and select the squared ranks variance equality test option then click on the calculate button.


For this example:


Squared ranks approximate equality of variance test (2 sample)


z = 2.327331

Two tailed P = .0199

One tailed P = .01


Here we reject the null hypothesis that the samples are from identical distributions (except for possibly different means) and we infer a statistically significant difference between the variances.


P values



Copyright © 2000-2016 StatsDirect Limited, all rights reserved. Download a free trial here.