Data Analysis with Microsoft Excel: Updated for Office 2007

(Tuis.) #1

258 Fundamentals of Statistics


Testing for Equality of Variance


Part of the challenge in performing a two-sample t test is determining
whether to use a pooled or unpooled estimate of the variance. Equal vari-
ances across different samples is called homogeneity of variance. Three
ways to test for equal population variances are: the F test, Bartlett’s test, and
Levene’s test.
The F test is used for comparing only two sample variances. The test
statistic is

F 5

larger variance
smaller variance
where F follows the F distribution with^1 n 12 1, n 2212 degrees of freedom.
Here n 1 is the number of observations in the sample with the larger vari-
ance, and n 2 is the size of the sample with the smaller variance. You’ll learn
more about the F distribution in Chapter 9. The F test requires normal data
and it performs badly if the data deviate from normality.
Bartlett’s test can be used to test for homogeneity of variance from more
than two samples. Bartlett’s test is sensitive to the effect of nonnormal data.
If the sample data come from a nonnormal distribution, then Bartlett’s test
may simply be testing for nonnormality rather than homogeneity of vari-
ance. Because of its computational complexity, we will not discuss how to
calculate the Bartlett test statistic here.
Levene’s test can also be used to test for homogeneity of variance from more
than two samples. The Levene test statistic is less sensitive to departures from
normality than the Bartlett test statistic. On the other hand, if the sample data
do follow a normal distribution, then Bartlett’s test has better performance.
Generally it’s a good idea to use all three tests (if possible) with your data.
If none of the tests reject the hypothesis of variance homogeneity, you can
probably use a pooled variance estimate in your analysis. If one or more of
the tests reject this hypothesis, you should defi nitely consider performing
an unpooled analysis.
To calculate the values of these test statistics, use the functions described
in Table 6-5.

Table 6-5 Homogeneity of Variances functions in Excel


Function Description
FDIST(array1, array2) Returns the p value of the F test for the
values in array1 and array2.
BARTLETT (column1,
column2,.. .)

Returns the p value of the Bartlett test
statistic for values in column1, column2,
and so forth. StatPlus required.
(continued)
Free download pdf