# Brown–Forsythe test

In statistics, when a usual one-way ANOVA is performed, it is assumed that the group variances are statistically equal. If this assumption is not valid, then the resulting F-test is invalid. The Brown–Forsythe test is a statistical test for the equality of group variances based on performing an ANOVA on a transformation of the response variable. The Brown–Forsythe test statistic is the F statistic resulting from an ordinary one-way analysis of variance on the absolute deviations from the median.

## Transformation

The transformed response variable is constructed to measure the spread in each group. Let

${\displaystyle z_{ij}=\left\vert y_{ij}-{\tilde {y}}_{j}\right\vert }$

where ${\displaystyle {\tilde {y}}_{j}}$ is the median of group j. The Brown–Forsythe test statistic is the model F statistic from a one way ANOVA on zij:

${\displaystyle F={\frac {(N-p)}{(p-1)}}{\frac {\sum _{j=1}^{p}n_{j}({\tilde {z}}_{\cdot j}-{\tilde {z}}_{\cdot \cdot })^{2}}{\sum _{j=1}^{p}\sum _{i=1}^{n_{j}}(z_{ij}-{\tilde {z}}_{\cdot j})^{2}}}}$

where p is the number of groups, nj is the number of observations in group j, and N is the total number of observations. Also ${\displaystyle {\tilde {z}}_{\cdot j}}$ are the group means of the ${\displaystyle z_{ij}}$ and ${\displaystyle {\tilde {z}}_{\cdot \cdot }}$ is the overall mean of the ${\displaystyle z_{ij}}$.

If the variances are indeed heterogeneous, techniques that allow for this (such as the Welch one-way ANOVA) may be used instead of the usual ANOVA.

Good [1994,2005], noting that the deviations are linearly dependent, has modified the test so as to drop the redundant deviations.

## Comparison with Levene's test

Levene's test uses the mean instead of the median. Although the optimal choice depends on the underlying distribution, the definition based on the median is recommended as the choice that provides good robustness against many types of non-normal data while retaining good statistical power. If one has knowledge of the underlying distribution of the data, this may indicate using one of the other choices. Brown and Forsythe performed Monte Carlo studies that indicated that using the trimmed mean performed best when the underlying data followed a Cauchy distribution (a heavy-tailed distribution) and the median performed best when the underlying data followed a χ2 distribution with four degrees of freedom (a sharply skewed distribution). Using the mean provided the best power for symmetric, moderate-tailed, distributions.