# How should I treat F test if one of variances is equal 0?

I have two groups with 20 elements in each. In one group variance is equal 0. I want to do f-test. Can I? And how should I interpret results (in this case)?

• Why do you want to do an F test for a group with identical values? Also what do you want to test? stats.stackexchange.com/questions/30388/… – Konstantinos May 30 '15 at 0:44
• I wanted to compare two groups with t test and check if variance is the same. – Frozen May 30 '15 at 7:24

The F-test for variances takes the ratio of the sample variances: $$F = \frac{S_X^2}{S_Y^2}$$ So you see that if $Y$ is the one group with the identical values (low variance) it is not defined and if $X$ (zero=low variance) it is zero (test failure). So, by definition, the larger variance should be placed in the numerator. Hence, you get an F-statistic of infinity and you can claim that the variances are different.
• I think I rushed too much to answer the question. What if the population is like: $0,1,2,1,1,1,2,1,1,2,0,1,2,1,1,0,1,1,1,0,2,1,1$ and we just get a sample of 5 observations? It's highly probable to get 5 observations of just $1$. – Konstantinos May 30 '15 at 18:04