I'm having trouble knowing when to use the ANOVA method for analysing variances. For example this question:
$1.$ In an investigation of the effect of large amounts of lime on marigolds, the numbers of plants per pot were:
Control: $140$, $142$, $36$, $129$, $49$, $37$, $114$, $125$.
Treated: $117$, $137$, $137$, $143$, $130$, $112$, $130$, $121$.
Is there a significant difference in the variances?
This is apparently analysed using the $F$ test with $$F=\frac{{s_x}^2}{{s_y}^2}\;\; ,\; {s_x}^2\geq {s_y}^2$$ However a second question:
$2.$ The quantity of dissolved oxygen was measured at four different locations in a river, with five samples taken from three locations but only four from the fourth. The results were as follows:
Location
$1$ $\;\;\;\;\;5.8\;\; 6.2\;\; 7.1\;\; 6.0 \;\;6.1$
$2$ $\;\;\;\;\;6.4\;\; 5.8\;\; 6.5\;\; 6.6\;\; 6.3$
$3$ $\;\;\;\;\;5.9\;\; 5.4\;\; 5.1\;\; 5.8\;\; 5.2$
$4$ $\;\;\;\;\;6.0\;\; 6.3\;\; 6.2\;\; 5.9$
On the basis of these data, is there a difference in oxygen content among the locations?
This question is solved by using ANOVA, i.e. the $F$ test with $$F=\frac{M_{SS_{\text{group}}}}{M_{SS_{\text{error}}}}$$
Is there an explanation for why I can't use ANOVA on the first question? The only logical reasoning I've come up with is that for the first question the samples come from altogether different 'groups of plants' whereas all the samples from the second come from the same river, albeit from different parts of it. Therefore we can assume the samples from the river have the same overall mean and hence ANOVA can be used. Is this correct?
ANOVA should only be run on homoscedastic data. The first test you reference above is a test for heteroscedasticity. The test should be run prior to the ANOVA, which tests for a difference in means.
Since the first test is a prerequisite to the second test, they do not fall in the same category. Prior to running the second ANOVA, you should also test for heteroscedasticity, using Bartlett's or other test.
You should also run a normality test, which is another assumption of ANOVA.
In summary:
Test for heteroscedacticity/normality. For two levels this is the F-test for equal variance.
If conditions hold run ANOVA. For two levels this is the t-test