F.TEST Function (LibreOffice Calc)

Math Advanced LibreOffice Calc LibreOffice 4.0

The F.TEST function in LibreOffice Calc performs an F-test to compare the variances of two datasets. This guide explains syntax, interpretation, examples, errors, and best practices.

The **F.TEST** function performs an **F-test for equality of variances** between two datasets. It returns the probability that the observed variance ratio could occur if the two populations truly had equal variances.

This guide provides syntax, interpretation rules, examples, common errors, and best practices, making it one of the most complete F.TEST references available for LibreOffice Calc.

What the F.TEST Function Does

  • Compares variances of two samples
  • Returns a p-value based on the F-distribution
  • Helps determine whether to use T.TEST type 2 or type 3
  • Works across sheets
  • Essential for inferential statistics and experimental analysis

F.TEST answers:

“If the two groups truly had equal variances, what is the probability of observing a variance ratio this extreme?”

Syntax

F.TEST(array1; array2)

Where:

  • array1 — first sample
  • array2 — second sample
F.TEST always returns a one-tailed probability.
For two-tailed variance tests, multiply the result by 2.

Interpretation of F.TEST Results

p-value Meaning
< 0.05 Variances are significantly different
> 0.05 No evidence of variance difference
Near 1 Variances extremely different in the opposite direction

If variances differ significantly → use T.TEST type 3
If variances do not differ → type 2 may be appropriate (rare in practice)

Basic Examples

Standard F-test

=F.TEST(A1:A30; B1:B30)

Two-tailed F-test

=2 * F.TEST(A1:A30; B1:B30)

Across sheets

=F.TEST(Sheet1.A1:A50; Sheet2.B1:B50)

Using named ranges

=F.TEST(GroupA; GroupB)

Advanced Examples

F-test ignoring errors

=F.TEST(IF(ISNUMBER(A1:A100); A1:A100); IF(ISNUMBER(B1:B100); B1:B100))

(Confirm with Ctrl+Shift+Enter in older Calc.)

F-test using filtered (visible) data only

Use SUBTOTAL helper column to filter values before passing to F.TEST.

F-test after removing outliers

=F.TEST(FILTER(A1:A100; A1:A100<1000); FILTER(B1:B100; B1:B100<1000))

F-test for experimental groups

=F.TEST(ControlGroup; TreatmentGroup)

F-test before choosing t-test type

=IF(F.TEST(A1:A30; B1:B30) < 0.05; "Use type 3"; "Use type 2")

F-test for log-transformed data

=F.TEST(LN(A1:A30); LN(B1:B30))

How F.TEST Calculates the p-value

  1. Compute sample variances:

[ s_1^2 = \text{VAR.S}(array1), \quad s_2^2 = \text{VAR.S}(array2) ]

  1. Compute F-statistic:

[ F = \frac{s_1^2}{s_2^2} ]

  1. Compute degrees of freedom:

[ df_1 = n_1 - 1, \quad df_2 = n_2 - 1 ]

  1. Compute p-value using the F-distribution CDF.

Common Errors and Fixes

Err:502 — Invalid argument

Occurs when:

  • Arrays contain no numeric values
  • Arrays contain fewer than 2 data points
  • Variance is zero in one sample

Err:504 — Parameter error

Occurs when:

  • Semicolons are incorrect
  • Range references malformed

F.TEST returns unexpected value

Possible causes:

  • Outliers inflating variance
  • Non-normal data (F-test assumes approximate normality)
  • Very small sample sizes
  • Variance ratio reversed (F.TEST handles this automatically)

Best Practices

  • Use F.TEST before choosing t-test type
  • Use two-tailed tests when comparing variances symmetrically
  • Remove outliers before testing
  • Use named ranges for cleaner formulas
  • Use log-transformed data when variances scale with magnitude
  • Use T.TEST for mean comparison after variance evaluation
F.TEST is the statistical “gatekeeper” — it tells you whether your two groups behave similarly enough to justify equal-variance assumptions. It’s the first step in rigorous hypothesis testing.