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
- 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*_{1} = the number of elements in R1 – 1, *df*_{2 }= the number of elements in R2 – 1 and *x = var*1 / *var*2 where *var*1 is the variance of the data in range R1 and *var*2 = 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 _{2}, df_{1}*), i.e. the sum of the right tail starting from

*x*and the left tail starting from 1/

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

*x, df*

_{2}

*, df*

_{1}) = 1 − FDIST(

*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 = *α*

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. The critical value for F is calculated based on *α* = .05.

WHY IS THE LARGER VARIANCE IN NUMERATOR

It is really just convention. You could adjust all the tests to put the larger variance in the denominator.

Charles

Oh, look there, 3.09>1.85. Amazing! I’ll just reject my null hypothesis then. I have no idea what those numbers mean. Thanks for explaining.

I just want to now why the large value must be put on the Numerator while computing the F test statistic.

I do understand F>0 since S^2 is always positive, however the above is unclear. Kindly clarify

You don’t have to do this. It just makes the analysis more consistent.

Charles

I am trying to compare 2 variables to see if they are equal. I am using the F-test in the Data Analysis Toolpack to determine the correct T-test to use (equal or unequal variances). However, when I enter the range 1 (Method 1), and range 2 (Method 2), I get one F and F Critical ouput FF Crit (dont’ reject Ho). How should the data be entered into the ranges, and does it matter? This giving me 2 decisions, to reject and the other to not reject Ho. Could you explain why this would happen and which output I should go with? Am I missing something?

Brad,

Are you saying that based on comparing F with alpha you get a different result from that of comparing F with F crit?

In any case, when in doubt use the t test with unequal variances. If the variances are equal, the result of this test will be very similar to the t test with equal variances.

Charles

Sir I want to know that I am calculating F.inv.Rt for right tail for alpha 0.02 and it is coming exact equal to f.inv(which calculates left tail ) for 0.98 why ?

Perhaps I don’t understand your question, but in general =F.INV.RT(alpha,df1,df2) yields the same value as =F.INV(1-alpha,df1,df2).

Charles

Two tailed F-testing for differences in population variances. Why not put the ratio of the highest variance in the nominator and do a right one tailed testing?

Actually, the same question can be linked to differences in the population means: why not take the subtraction of the smallest from the highest sample mean and further with a one tailed t-testing?

You can do these things. Typically, the left tail is tested.

Charles

Hello Charles,

Do you know how I should report this F value in APA style?

I’m currently using

F(n1-1,n2-1) = ___, p = ___

but I’m not sure if this is correct.

Maybe I should use the ANOVA way of reporting (i.e. F(k-1,N-k) = ___, p = ___; with k being the number of groups)? Or use something entirely different (like F = x, p(f>x) = __)?

The APA manual and Google aren’t very helpful thus far, so I hope you know what to do.

Lotte

Lotte,

Sorry, but I am not sure of the response, but I would use the ANOVA way of reporting, but with the correct values for the comparison of variances (as described on the referenced webpage).

Charles

Hi Charles, I think you meant FDIST(1/x, df2, df1) + FDIST(x, df1, df2) = 1 and not FDIST(1/x, df2, df1) = FDIST(x, df1, df2).

Kristian,

Yes. Thanks for catching this error. I have now revised the referenced webpage.

Charles

Will you please solve this problem??

“For a random sample of 10 pigs fade on diet A the increase in weights in a certain periods was: 10, 6, 16, 17, 13, 12, 8, 14, 15 and 9. For another random sample of 12 pigs fade on diet B, the increase in the same period were 7, 13, 22, 15, 12, 14, 18, 8, 21, 23, 10, 17. Show that the estimate of the population variance from sample does not differ significantly.”

The procedure to use is the one explained on the referenced webpage.

Charles

Charles,

Can you explain the notation P(F<=f) one-tail? I understand that this is the area under curve in the upper tail, but the value doesn't change when I re-run the test with different alphas for the same two populations (F-crit, however, does change).

Norm

Norm,

If you are referring to Figure 2 then it is important to note that Excel’s data analysis tool only uses an alpha value of .05.

If you are referring to Figure 1, then you are correct that the p-value does not depend on alpha, whereas F-crit does depend on alpha. In any case alpha enters into the picture since you are typically testing whether p-value < alpha (or equivalently whether F > F-crit).

See Hypothesis Testing for more details about this.

Charles

Charles,

Thank you. It’s curious that the F-test for two population variances in the Analysis Pak allows you to enter other alpha values in the dialogue box when it only calculates at .05. Thank you for that tip. I’m still confused about the notation for the p-value – “P(F<=f) one-tail."

Is "f" the value that you calculate based on the d.f., sample variance, and hypothesized variance? If that's true, does it mean the p-value for when "f" is less than or equal to Fcrit? It's not explained in any literature on Excel's F-test.

Thanks again,

Norm

Norm,

Sorry, but I gave you the wrong information. Excel’s data analysis tool does take the value you enter for alpha into account. In the term P(F < f), you need to interpret F as the random variable and f as the value of that random variable. Essentially, P(F < f) is the one-tailed p-value. To get the two-tailed p-value you need to double the value presented. This is not the p-value for when "f" is less than or equal to Fcrit. That value is alpha (or alpha/2 for the two-tailed test). For more information as to the meaning of the p-value, see Hypothesis Testing.

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

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

Well explained. You really help me to understand Excel.

Thank you.

Rosalina, thanks very much for your comment. Charles