Question: anova is used to compare?
Answer: For a comparison of more than two group means the one-way analysis of variance (ANOVA) is the appropriate method instead of the t test. ... The ANOVA method assesses the relative size of variance among group means (between group variance) compared to the average variance within groups (within group variance).