Theorem 1 of F Distribution can be used to test whether the variances of two populations are equal, using the Excel functions and tools which follows. In order to deal exclusively with the right tail of the distribution, when taking ratios of sample variances from the theorem we should put the larger variance in the numerator of

In order to use this test, the following must hold:

- Both populations are normally distributed with a common variance
- Both samples are drawn independently from each other.
- Within each sample, the observations are sampled randomly and independently of each other.

**Excel Functions**: The following Excel function can be used to carry out this test:

**FTEST**(R1, R2) = two-tailed F-test comparing the variances of the samples in ranges R1 and R2 = the two-tailed probability that the variance of the data in ranges R1 and R2 are not significantly different.

Thus FTEST(R1, R2) = 2 ∙ FDIST(*x, df _{1}, df_{2}*) where

*df*= the number of elements in R1 – 1,

_{1}*df*

_{2 }= the number of elements in R2 – 1 and

*x = var1*/

*var2*where

*var1*is the variance of the data in range R1 and

*var2*= the variance of the data in range R2. FTEST is a two-tail test, while FDIST and FINV are one-tailed.

Also FTEST(R1, R2) = FDIST(*x, df _{1}, df_{2}*) + FDIST(1/

*x, df*), i.e. the sum of the right tail starting from

_{2}, df_{1}*x*and the left tail starting from 1/

*x*. This is true since FDIST(1/

*x, df*) = FDIST(

_{2}, df_{1}*x, df*).

_{1}, df_{2}This function ignores all empty and non-numeric cells.

Excel 2010/2013 also provide a new function F.TEST which is equivalent to FTEST (see Built-in Statistical Functions).

In addition Excel provides an **F-Test Two-Sample for Variances** data analysis tool which automates the process of comparing two variances.

**Example 1**: A company is comparing methods for producing pipes and wants to choose the method with the least variability. It has taken a sample of the lengths of the pipes using both methods as shown on the left side of Figure 1.

We test the following null hypothesis:

H_{0}: *σ _{1} – σ_{2}* = 0 (equivalently:

*σ*; i.e. both methods have the same variability)

_{1}= σ_{2}and use the statistic with 11, 14 degrees of freedom, as described on the right side of Figure 1. Since this is a two-tail test, we note that

p-value = 2 * FDIST(*F, df _{1}, df_{2}*) = 2 * FDIST(1.85, 11, 14) = 0.279 > 0.05 =

*α*

*F*-crit = FINV(α/2, df_{1}, df_{2}) = FINV(.025, 11, 14) = 3.09 > 1.85 = *F*

Either of the above tests shows there is no significant difference in the variance between the two methods with 95% confidence. Note that we needed to double the value for FDIST or halve α since this is a two-tail test.

Alternatively we can use FTEST which is a two-tail test:

FTEST(A4:A18, B4:B18) = .279 > 0.05 = *α*

.279 represents the sum of the area under the curve in the interval (-∞, 1/*F*), i.e. the left tail, plus the area under the curve in the interval (*F*, ∞), i.e. the right tail.

We can also use the **F-Test Two-Sample for Variances** data analysis tool:

**Figure 2 – Comparing variances using Excel’s data analysis tool**

This tool only performs a one-tail test, and so the p-value (0.1393) needs to be doubled to get 0.279, which is the same value we calculated in Figure 1.

Well explained. You really help me to understand Excel.

Thank you.

Rosalina, thanks very much for your comment. Charles

dose % structural aberrations

negative control 2

negative control 2

solvent control-1 5

solvent control-1 6

what test can be applied to this data

I’m afraid that you need to provide additional information before I can provide an answer.

Charles

Dear Dr. Zaiontz,

thanks for your valuable contributions to understand different statistical methods and your information on how to use them in Excel.

I’m not quite sure about the interpretation of the results of the F test. As you state, Excel functions FTest or F.Test give “the two-tailed probability that the variance of the data in ranges R1 and R2 are not significantly different”. On the other hand, in example 1, it is said that a p value = 0.279 > alpha, among others, “shows there is no significant difference in the variance between the two methods with 95% confidence”. To my understanding, according to the first statement, there is only a 27.9% probability that the variances are not significantly different.

I would like to confirm equality of variances as a precondition to do a two sample t test. Now, is it sufficient to check whether p value (of F test) > alpha?

Dear Felix,

That p-value = .279 > alpha does not mean that there is only a 27.9% probability that the variances are not significantly different. See http://www.real-statistics.com/hypothesis-testing/null-hypothesis/, especially the last observation.

You can use the F test to check whether the two variances are equal as a precondition to using the two sample t test, but you should note that there is a version of the two sample t test which you cab use even when the variances are unequal. See http://www.real-statistics.com/students-t-distribution/two-sample-t-test-uequal-variances/

Charles