A Statistical Study: Comparing Two Population Variances
- Benjamin Chen
- 2023年3月25日
- 讀畢需時 3 分鐘
已更新:2024年1月19日
For those who have studied the previous few stories on comparing two population parameters (proportion or mean), this story may come in handy as you've already learned why we sometimes have to compare two variances. When we compare two population mean, one vital condition that we have to check is whether the they have equal variance. This will determine whether we should use a pooled t-test or a non-pooled t-test. So here we go!
Two Population Variances
When we want to compare two variance, the hypothesis is typically formulated as follow:

The null hypothesis simply means that the two variances are equal, while the alternative hypothesis means otherwise. There is of course a right-tail test and left-tail tail test as well.

Types of Tests
There are three tests in which we can use to compare two variances.
The F-test
Bonnet's Test
Levene's Test
The F-test is the most commonly used and seen. It assumes the two samples come from population that are normally distributed (a parametric test). The other two tests, however, only assumes that the data is quantitative and has no assumption related to normality (non-parametric tests). When data values are not normal or have a small sample size, sometimes it's better to apply these non parametric tests.
In this story, we'll be putting our focus on the more commonly used F-test. Again, let's reclarify the assumptions for the F-test:
Samples must come from a normal distribution. Note that even if the sample size is large, we cannot assume that the population is normal. The central limit theorem only applies to the sample statistics (the sample mean in this case).
This normality assumption is very important since the F-test is sensitive to departures from the normal assumption. So, if you have doubts about the normality of the population distribution, it's best to use another test.
After the normality assumption is checked, the implementation for the F test is quite simple. The F test statistics is simply:

The convention is that the larger variance usually goes on top of the ratio as the numerator and the smaller variance goes on the bottom as the denominator. This is because we want to facilitate the comparison of the F statistics and the critical value. As you will see below in the F-table, the critical value will never fall below 1.0. So that means if we were to put the smaller variance as the numerator (F statistics always smaller than 1), our F statistics will always be smaller than the critical value. So this is something you have to be extremely careful about when you use the critical value approach.
Since we are dealing with two samples, we also have two degrees of freedom, each being n minus 1. The two degrees of freedom will help us find the critical values from the F-table.

Note: It's important that you're using the correct F-table! Different F-tables are available for difference confidence level and types of tests (two-tail or one-tail).
Like all hypothesis testing, we then compare the F test statistics to the critical value retrieved from the F table, and make a corresponding conclusion.
Example
Let's demonstrate the F-test with an example (retrieved from Penn State Online)
Two machines, one new and one old, are used for packaging. The time used by each machine to package 10 samples is recorded as follow:

We want to test and see if one the two variances is significantly higher than the other. In this case, we will perform a right-tailed test.
The sample mean and standard deviation are calculated as follow for the two machines.

We square the two standard deviations to derive their respective variances.

Then, we can calculate the F statistics. (Remember to put the bigger variance as the numerator)

Finally, we compare our F statistics to the critical value. Assuming a 95% confidence level (alpha = 0.05) and two degrees of freedom 9 (n1 - 1) and 9 (n2 - 1), respectively, we can find the critical value from the F-table for right-tailed tests.

The F statistics (1.208) is clearly smaller than the critical value (3.18), thus we do not reject our null hypothesis and conclude that there is no significant difference between the two variances.
Conclusion
Yes sir! We've made it through another statistical test. In this story, we discussed how we could compare two variance using the F-test. Again, it's important to be aware of the required assumptions as well as the little details if you are to calculate by hand using the critical value approach. Typically, computers are capable of calculating the p-value for you so you can easily compare it to your level of significance. In the next story, we'll be moving on to Chi-square tests!



留言