How to perform an F Test in Excel – 2 Methods

The F test is used to determine if two sample groups have similar variances.

overview image of how to do f test in Excel


Download Practice Workbook
Download the workbook.


What Is F Test in Excel?

The F Test is a statistical analysis technique that assesses the equality of variances between two or more sets of data.

It checks if variations in different datasets are significantly different. It compares variance ratios to decide if differences are meaningful or random. This test is widely used in fields such as research, quality control, and experimental analysis to make informed decisions about the consistency and reliability of data.


Compare the performance of two different marketing strategies (Strategy A and Strategy B) based on the number of website visits they generate over a week. Test if there is a significant difference in the average website visits for these two strategies (Ha: alternative hypothesis) or if they are the same (Ho: null hypothesis).

dataset for testing hypothesis

Method 1 – Using the Data Analysis Toolpak

  • Go to the Data tab and select Data Analysis.
  • In the Data Analysis window, select F-test Two Sample for Variance and click OK.

navigating to data analysis toolpak in Excel

A new window will be displayed.

  • Enter data and it will automatically calculate the result.

Before selecting the variable range, calculate the variance for each dataset using the VAR.S function (Excel requires the highest variance to be designated as variable 1 range).

  • For Strategy A, use the following formula.
=VAR.S(C5:C11)

calculating variance using Excel function

  • Strategy A possesses the highest variance. So, input Strategy A as Variable 1 Range, and Strategy B as Variable 2 Range.
  • Check Labels.
  • Set the significance level (alpha) to 0.05.
  • There are three output options. Choose the output range $C$15.
  • Click OK to see the result.
NOTE: Set the data range with the highest variance as Variable 1 Range.

providing data in f test two sample for variances analysis

The Analysis ToolPak will display the outcome.

It provides the mean, variance, observation count, degrees of freedom (df), F value, F critical value, and P value.

To determine the P value for the F test, you need the F value and the F critical value. When the calculated P value exceeds the chosen significance level (alpha), accept the null hypothesis: there isn’t a significant difference between the strategies.

If the P value is lower than alpha, accept the alternative hypothesis: there is a distinction between the two strategies.

final output from using the data analysis toolpak

Since the P value is greater than the chosen significance level (0.05), you can conclude that the average website visits for the two strategies are statistically considered equal. There is no significant difference in the mean website visits between Strategy A and Strategy B.


Method 2 – Using the F.TEST Function

  • Select C13 and use the following formula.
=F.TEST(C5:C11,D5:D11)

using F.TEST function to conduct f test in Excel

The result is 0.21121.

Since the p-value (0.21121) exceeds the significance level (0.05), the result is not considered statistically significant. Therefore, we cannot reject the null hypothesis.

There is no substantial difference in the average number of website visits between Strategy A and Strategy B.

interpretation of result of f test in Excel

NOTE: The F.TEST function checks if the spreads are different, and the Two-Sample Variance F Test checks which class has wider or narrower spreads.

How to Activate the Data Analysis Toolpak Add-in in Excel

  • Click the File tab.
  • Select Options.
  • In the Excel Options window, choose Add-Ins.
  • In Manage, select Excel Add-ins.
  • Click Go… .

navigating to Excel add ins

  • In the Add-Ins window, check Analysis ToolPak.
  • Click OK.

Data Analysis is displayed in the Data tab on the ribbon.

activating analysis toolpak


Things to Remember

  • Set the Significance Level: Determine your significance level (commonly 0.05) before interpreting the p-value.

Frequently Asked Questions

Q1. What is the formula for the F-test?
The formula for the F-test depends on the context. To compare two variances (two-sample F-test), the formula is:
F = Variance1 / Variance2
In ANOVA, which compares multiple means, the formula involves calculating the ratio of group variance.

Q2. What is the difference between a one-sample and a two-sample F-test?
A one-sample F-test assesses the variance in a single sample with a fixed value, whereas a two-sample F-test evaluates the variances in two separate samples.


 

<< Go Back to Excel for Statistics | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Ishrak Khan
Ishrak Khan

Qayem Ishrak Khan, BURP, Urban and Regional Planning, Chittagong University of Engineering and Technology, Bangladesh, has been working with the ExcelDemy project for 1 year. He wrote over 40+ articles for ExcelDemy. He is an Excel and VBA Content Developer providing authentic solutions to different Excel-related problems and writing amazing content articles regularly. Data Visualization, DBMS, and Data Analysis are his main areas of interest. Besides, He has passions about learning and working with different features of Microsoft... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo