Is it possible to get a negative F-statistic (e.g. in ANOVA)?

If so, why? If not, why not?

I'm thinking of an ANOVA context, but if the answer changes depending on context I would also be interested to know why that is.

• F-statistics is always positive, since $F(m,n)\sim\frac{X_1^2(m)/m}{X_2^2(n)/n}$, which is always positive. May 5 '14 at 15:28
• @Zhang You are correct about the $F$ distribution, but a statistic is computed from data: it is not a distribution. For instance, to help clarify the distinction, we all know that a (squared) correlation coefficient is described by a non-negative distribution when certain assumptions hold, but nevertheless the $R^2$ statistic can be negative. I wonder whether the present question might be of a similar nature.
– whuber
May 5 '14 at 18:06
• There are negative F-statistics: dorak.info/genetics/popgen.html (look about a third of the way down the page). They are, however, not the same as the F-statistics of ANOVA; about all they share is the name.
– whuber
May 5 '14 at 21:19
• Assuming we're talking F in ANOVA - it depends on how the numerator and denominator are calculated; not every calculation is 100% guaranteed to yield a non-negative value for a notionally non-negative quantity. May 5 '14 at 23:23

Updated to account for the "F statistic" in population genetics that @whuber links to above.

It depends on what you mean by "F-statistic" and "context". In statistics, the $F$-statistic is a ratio of variances. As long as the "context" refers to this F-statistic, whether it comes from an ANOVA or a simple linear regression model will not matter. Evidently however, there is something unrelated called an "F statistic" in population genetics. Here is a quote from the linked page:

F statistics: The F statistics in population genetics has [sic] nothing to do the F statistics evaluating differences in variances. Here F stands for fixation index, fixation being increased homozygosity resulting from inbreeding. ...

...The value of FIS ranges between -1 and +1. Negative FIS values indicate heterozygote excess (outbreeding) and positive values indicate heterozygote deficiency (inbreeding) compared with HWE expectations.

On the other hand, it is not possible to get a negative $F$-statistic of the type that occurs in statistics. Think about what an $F$-statistic is. All $F$-statistics are of the form:
$$F = \frac{MS_{\rm effect}}{MS_{\rm residual}}$$ So it could only be negative if (only) one of those values were negative. But all mean squares are of the form:
$$MS = \frac{SS}{df}$$ So it, in turn, could only be negative if (only) one of those values were negative. Now consider the form these must take:
$$SS = \Sigma_i(x_i - \bar x)^2 \\ \text{and} \\ df = N - \text{number of parameters estimated}$$ Squaring any value yields a positive value. I suppose you could say that if you were estimating more parameters than you had data, then you would get a negative df, and thus ultimately a negative $F$, but such a model would be unidentifiable, so this could not be done. Thus, any $F$-statistic will always be non-negative. For a given sample, it is possible to get $0$ if all conditional means are identical, or undefined if all data exactly equal the conditional means, but these are extremely unlikely to happen in practice even if the null hypothesis is completely true.

• +1 However, all this seems to assume that the computer is able to compute with perfect accuracy, and that we always choose formulas that allow it to calculate with the best possible accuracy. The first is never true and the second only occasionally true at best. If we very carefully set up our code it should be possible to always avoid negative numerator and denominator in the F ratio ... but in practice it's quite clear that some programs have not been so carefully set up. This is less a problem now than it was 25 or 30 years ago, but it's still sometimes an issue... ctd May 5 '14 at 23:29
• ctd ... It's not very many years ago that Excel still used the unstable form of the one-pass formula for variance! May 5 '14 at 23:30