The F-test is a test for variance so why do we use F-test in ANOVA? To test the mean vector we use ANOVA, and to test two variances we use the F-test, but my question is in ANOVA why we do use the F-test ?
 A: Both the ratio test for equality of variances and the F test in ANOVA (analysis of variance) are actually taking the ratio of two estimates of variance.
In the ANOVA test, if the population means are the same, the group means will still vary due to random variation. We can actually estimate the variance about the common mean from the variation of the group means from their overall mean in that case -- the numerator of the F statistic is that estimate. The denominator is the more usual estimate of variance, one which applies whether the population means are equal or not.
So in the ANOVA test, you tend to more often get larger-than-typical values for F when the population means differ more, because the numerator will be larger than it should be if it's just an estimate of the variance in the data.
A: Our goal is to define an estimable quantity that will take on a known value (here 1 or close to 1) if the null hypothesis is true. By taking the ratio of sum of squares over degrees of freedom, we create an F distributed statistic. This is because given $$X_1 \sim \chi^2_{df1}, \,\,X_2 \sim \chi^2_{df2}$$
$$Y =\frac{X_1/df1}{X_2/df2}$$
Then $Y \sim F$.
A: The F-test can be used to test the equality of variance and/or to test the differences between means (as we see in ANOVA). 
In ANOVA, we use the F-test because we are testing for differences between means of 2 or more groups, meaning we want to see if there is variance between the groups. We do so because doing multiple t-tests can cause something to be significant, even if it isn't. This is where the F-test comes in. ANOVA separates the within group variance from the between group variance and the F-test is the ratio of the mean squared error between these two groups. 
