Locked lesson.
About this lesson
Many of the hypothesis test approaches will change depending on whether the continuous data has equal variances or unequal variances between data sets. Therefore, the F Test or Bartlett's Test must be completed to determine if variances are equal.
Exercise files
Download this lesson’s related exercise files.
Variance Tests Exercise.xlsx11.5 KB Variance Tests Exercise Solution.docx
221.8 KB
Quick reference
Variance Tests
The variance of a data set is the standard deviation squared (σ2). The F Test and Bartlett’s test compare the variance between sample sets to determine if they are statistically different.
When to use
Two or more sample sets of data are often compared to determine if they are statistically equivalent. The answer to that question can help to identify cause and effect relationships in performance differences and to demonstrate before/after changes in performance. In order to test for similar means, a test for similar variances must first be done.
Instructions
Variance tests are normally coupled with a test of means to determine whether two or more samples are statistically different. There may be cases where the hypothesis test is limited to only the variance of the samples but that is infrequent.
The hypothesis statements for variance tests are:
H0: σ12 = σ22 = σ32
Ha: σ12 ≠ σ22 ≠ σ32
Of course, the F test is limited to only two datasets, but Bartletts may have three or more.
The variance, which is the standard deviation squared, is a measure of the width of the data distribution in the sample. Even though variances may not be equal, additional hypothesis tests for mean values are often used in Lean Six Sigma projects. However, the statistical algorithms for those tests will change depending on whether the variances are equal or not. For that reason, the primary use of this test is to set up the next tests, either T Tests or ANOVA.
The F Test is used when comparing two samples. The Bartlett’s test is used when comparing two or more samples. Normally the F Test is used as a precursor for the T Tests. The Bartlett’s Test is used as a precursor for the ANOVA.
- Excel is able to perform the F Test but not the Bartlett’s Test.
- Data Analysis Menu > F Test Two Sample for Variance
- Enter the range of each of the sample data sets.
- The calculation will provide a P Value for a one-tail analysis; reverse the order of the range of cells that are entered into the F Test dialog panel to check both tails.
- Minitab is able to perform the F Test.
- Stat > Basic Statistics > 2 Variances
- Select the format of the data and select the columns
- Select the option button to check the box for normal data and enter the relationship (equal to, greater than, or less than)
- Minitab is also able to perform the Bartlett’s Test.
- Stat > ANOVA > Test for Equal Variances
- Select the format of the data and select the columns
- Select the option button to check the box for normal data and enter the relationship (equal to, greater than, or less than)
Hints & tips
- Make sure you select the correct relationship of variances: equal to, greater than, or less than. Excel will only check “greater than” but the order of data sets you enter will determine which tail the test is checking.
- The F Test and Bartlett’s Test are used with normal data. We will use a different test for non-normal data.
- 00:04 Hi, I'm Ray Sheen.
- 00:06 While many of the hypothesis tests will focus on the mean of the data
- 00:10 sets being investigated, the variance can also be important.
- 00:14 Differences in variances can lead to a different hypothesis tests.
- 00:19 The test introduced in this lesson will analyze the variance when
- 00:23 using the data that is normal.
- 00:25 Once again, we start with the hypothesis test decision tree.
- 00:29 We have normal data and we have a combination of discrete and
- 00:32 continuous aspects of the data.
- 00:34 You can see that if there's more than one sample, the first thing we
- 00:38 want to do is to check the variance using the F Test or Bartlett's Test.
- 00:42 Let's spend a moment to discuss testing for variance.
- 00:46 When comparing data from different samples or sets of data,
- 00:49 there are normally two attributes we consider, the mean and the variance.
- 00:54 The mean is a measure of the average value.
- 00:56 Since we're talking about normal data,
- 00:59 it will be near the center of the distribution.
- 01:01 The variance is a measure of the spread or width of the data in the data sample.
- 01:06 The variance is clearly related to the standard deviation for that distribution.
- 01:11 In fact, the standard deviation is a square root of the variance.
- 01:15 Don't try to picture variance on the typical distribution plot like you would
- 01:20 picture a standard deviation.
- 01:21 Variance is in the units of standard deviation squared so
- 01:25 it really can't be placed on a single axis.
- 01:28 There are two tests used with normal data to check for variance.
- 01:31 The F test is commonly used when there are two sample sets of data.
- 01:35 And the Bartlett's test is when there are more than two sample sets.
- 01:40 The null hypothesis is that the variance of all the samples are the same.
- 01:44 There is nothing unique about any of the data.
- 01:46 The alternative hypothesis is that the variances are statistically different.
- 01:51 They are not equal.
- 01:53 Let's take a moment to consider equal and unequal variances.
- 01:57 Unequal variances may be a very good thing.
- 02:00 Depending upon your hypothesis, you may want to demonstrate unequal variances.
- 02:05 If you've put an improvement in a process that's supposed to reduce the variability
- 02:10 and uncertainty in the output, you would expect to see a reduction in variance,
- 02:14 although there may not be any impact on the mean or average value.
- 02:18 Unequal variance does not mean we can't continue on to test for
- 02:21 differences in the mean values of the data.
- 02:24 However, the two primary tests that we will be using, the T test and ANOVA,
- 02:28 require that we make an assumption about the equality and the variance because
- 02:33 the calculation is different depending upon whether the variances are equal.
- 02:38 This applies with both the XL and Minitab testing.
- 02:42 Generally speaking, we use the F-test when we will then go on to use the T-test for
- 02:46 the means.
- 02:47 And we use the Bartlett's test when we're going to be using the ANOVA test.
- 02:51 However, it's worth noting that Minitab will calculate both for you,
- 02:55 the result will be slightly different.
- 02:57 When in doubt, use a test for unequal variances.
- 03:01 Granted, the math is a little more difficult, but
- 03:03 it turns out the computer really isn't bothered by difficulty in algebra.
- 03:08 So let's start with the F test.
- 03:10 This test determines if the difference between the variance from two samples
- 03:14 are statistically significant.
- 03:15 The F statistic is the ratio of the two variances.
- 03:19 Excel does the F test by going to the Data Analysis menu on the data ribbon and
- 03:24 selecting the function F Test Two Sample for Variance.
- 03:28 Enter the data range for each of the two data sets.
- 03:31 You should enter the data range so that the sample that has the largest variance
- 03:36 is variable one, and the smaller variance is variable two.
- 03:40 Then compare the F ratio to the F critical value that is calculated based
- 03:45 upon the sample size.
- 03:46 If the F ratio is greater than F critical, then reject the null hypothesis.
- 03:51 This is similar to a P value of less than 0.05.
- 03:55 Minitab doesn't call the test the F test, rather,
- 03:58 it uses what it is doing for the title.
- 04:01 Go to the Stat pulldown menu, select Basic Statistics,
- 04:05 then select 2 variances which is about two-thirds way down the menu.
- 04:09 Select the format of your data in the data columns in the same manner that
- 04:13 we have been doing that with other tests.
- 04:15 Then use the Option button to bring up the second panel.
- 04:18 Ensure the hypothesis ratio is 1 and you can change your alternate
- 04:23 hypothesis to be greater than or less than instead of equal to.
- 04:27 Finally, check the box for normal data.
- 04:29 You'll get a P value and graphs that show the confidence interval for your variance.
- 04:34 Now let's consider the Bartlett's test.
- 04:37 Bartlett's test will compare the variance of two or
- 04:40 more sample data sets to determine if the variances are statistically different.
- 04:45 Excel does not perform the Bartlett's test, although you can do a similar
- 04:49 analysis by doing multiple F tests with each pair or combination of data sets.
- 04:54 So that if there are four data sets, you would do an F test with one and two,
- 04:59 one and three, one and four, then two and three, two and four, and
- 05:03 finally three and four.
- 05:04 The Bartlett's test in Minitab is very easy.
- 05:07 Select Stat, then ANOVA, and then select Test for Equal Variance.
- 05:13 Select the format of your data and
- 05:15 the data columns just as we had done on the other tests.
- 05:19 Again, use the option button to bring up the option form and check the box for
- 05:24 normal distribution.
- 05:25 The result is a p value and a plot showing the variance and the confidence interval.
- 05:33 In this example, the confidence interval for sample set three does not even come
- 05:37 close to overlapping with the other sample variances.
- 05:41 Therefore, the p value is zero and
- 05:44 we reject the null hypothesis of equal variances.
- 05:48 F test and Bartlett's test seldom provide the entire answer for hypothesis testing,
- 05:54 but they may be essential to know how best to complete the hypothesis testing.
Lesson notes are only available for subscribers.
PMI, PMP, CAPM and PMBOK are registered marks of the Project Management Institute, Inc.