*78*

**Bartlett’s Test** is a statistical test that is used to determine whether or not the variances between several groups are equal.

Many statistical tests (like a one-way ANOVA) assume that variances are equal across samples. Bartlett’s test can be used to verify that assumption.

The following steps explain how to perform Bartlett’s test.

**Note:** Don’t confuse this test with Bartlett’s Test of Sphericity, which is used to compare an observed correlation matrix to the identity matrix.

**Steps to Perform Bartlett’s Test**

Bartlett’s Test uses the following null and alternative hypotheses:

**H _{0}:** The variance among each group is equal.

**H _{A}:** At least one group has a variance that is not equal to the rest.

The test statistic can be calculated as follows:

**B = (n-k)lns ^{2} – Σ(n_{j}-1)lns_{j}^{2} / c**

where:

- n: The total number of observations across all groups
- k: The total number of groups
- ln: This stands for “natural log”
- s
^{2}: The pooled variance - n
_{j}: The number of observations in group j - s
_{j}^{2}: The variance of group j

And where *c* is calculated as:

- c = 1 + (1/3(k-1))*(Σ(1/(n
_{j}-1)) – (1/(n-k))

This test statistic follows a Chi-Square distribution with k-1 degrees of freedom. That is, B ~ X^{2}(k-1).

If the p-value that corresponds to the test statistic is less than some significance level (like α = 0.05) then we can reject the null hypothesis and conclude that not all groups have the same variance.

**Example: Bartlett’s Test**

Suppose a professor wants to know if three different studying techniques lead to different average exam scores.

She randomly assigns 10 students to use each technique for one week, then makes each student take an exam of equal difficulty.

The exam scores of the 30 students are shown below:

The professor wants to conduct a one-way ANOVA to see if the three techniques lead to different average exam scores, but she first must conduct Bartlett’s Test to verify that the three groups have equal variances.

It’s cumbersome to perform Bartlett’s Test by hand, so we’ll enter the following data values into the Bartlett’s Test Calculator:

The test returns the following results:

- Test statistic
*B*:**3.30244** - P-value:
**0.19182**

Since the p-value is not less than 0.05, the professor will fail to reject the null hypothesis. In other words, she doesn’t have sufficient evidence to say that the three groups have different variances.

Thus, she can proceed to perform the one-way ANOVA.

**Additional Resources**

How to Perform Bartlett’s Test in R (Step-by-Step)

How to Perform Bartlett’s Test in Python (Step-by-Step)