Install free

Guides

F-test for two variances in Google Sheets

The F-test checks whether two groups have the same spread. It is often run before a two-sample t-test to choose between the equal and unequal variance versions. Example: fill volumes (ml) of 500 ml bottles from two machines.

AB
1Machine 1Machine 2
2502.1500.4
3498.7499.6
4503.4501.1
5497.2500.2
6500.9499.1
7504500.8
8496.5499.9
9501.8500.6
10499.3501.3
11503.1

Run the F-test

  1. Open Extensions, StatPak, Data Analysis and choose F-Test Two-Sample for Variances.
  2. Variable 1 range: A1:A11. Variable 2 range: B1:B10. The groups can have different sizes.
  3. Tick Labels in first row, leave Alpha at 0.05 and click Run.
F-Test Two-Sample for Variances
Machine 1Machine 2
Mean500.7500.3333
Variance70.51
Observations109
df98
F13.72549
P(F<=f) one-tail0.0005780868
F Critical one-tail3.38813

How to read the output

Put the group with the larger variance in Variable 1 so that F is above 1. If F is below 1, the tool (like Excel) reports the left tail and a critical value below 1, which is easy to misread.

F.TEST gives a two-tailed p-value

=F.TEST(A2:A11, B2:B10) returns the two-tailed p-value, which here is twice the tool's one-tail value: 0.001156174. Use the two-tailed value when you only ask "are the variances different?" and the one-tail value when you predicted which group varies more. You can rebuild the tool's numbers with =VAR.S(A2:A11)/VAR.S(B2:B10) for F, =F.DIST.RT(F, 9, 8) for the one-tail p-value and =F.INV.RT(0.05, 9, 8) for the critical value.

What to do next

With variances this different, compare the mean fill volumes with t-Test: Two-Sample Assuming Unequal Variances; see the t-test guide. The F-test is sensitive to non-normal data, so treat a borderline result with care.

Related guides