F Test

An F test is a comparison of variances.


Description

The F distribution is a ratio of normalized chi-squared distributed random variables. Correspondingly, there is a connection between F statistics and chi-squared statistics: as the denominator degrees of freedom get larger, the relationship converges to chi-squared = (numerator degrees of freedom) * F.

As the F distribution is strictly non-negative, F tests are always one-sided.


Usage

ANOVA Test

In the context of ANOVA, the F test compares the between-group variance and the within-group variance.

The following is appropriate for one-way ANOVA specifically. Let...

The between-group variance is calculated as:

between.svg

The within-group variance is calculated as:

within.svg

The F statistic is calculated as a simple ratio: F = between-group variance/within-group variance.

The null hypothesis is that all group means are equal. If the test statistic is greater than the critical value, the null hypothesis should be rejected.


Nested Model Test

An unrestricted (or full) linear regression model is designed and fit to a set of observations. Then a restricted (or reduced) model is designed by forcing some parameter in the unrestricted model to zero-out, and this is also fit to the observations. The sum of squared residuals is collected from both models. These are both chi-squared distributed random variables, so their ratio is itself a random variable that follows the F distribution.

Specifically, the test statistic is calculated as:

nested.svg

where R and F are notational shortcuts for 'reduced' and 'full', SS(i) represents the sum of squared residuals in model i, and dfi represents the degrees of freedom (n - k - 1) for model i. The null hypothesis is that the coefficients forced to zero are in fact zero. If the test statistic is greater than the critical value, the null hypothesis should be rejected.


Linear Regression Test

Just a special case of the above; the reduced model forces all coefficients to zero and fits an intercept model. The null hypothesis is that all parameters zero-out, and it should be rejected if the test statistic is greater than the critical value.


CategoryRicottone

Statistics/FTest (last edited 2026-09-02 01:39:26 by DominicRicottone)