One-way ANOVA tests whether the average of a numeric outcome differs across three or more groups. This guide explains what ANOVA is, how it relates to regression, when to use it, how to read the results, and how to run it in AnalyZ Solutions.
Analysis of variance, shortened to ANOVA, is a family of tests for whether the average of a numeric outcome differs between groups. The name looks odd, since the aim is to compare means, but the method works by analysing variation. It asks whether the groups differ from each other by more than people differ within each group.
Picture exam scores in three schools. If the school averages sit far apart and the scores inside each school are tightly bunched, the schools clearly differ. If the averages are close and the scores inside each school are widely spread, the schools overlap so much that the gaps could easily be chance. ANOVA turns this picture into a number. It splits the total variation in the outcome into variation between groups, which reflects how far each group average sits from the overall average, and variation within groups, which reflects how much individuals differ from their own group average. The ratio of the two is the F statistic. A large F means the groups differ more than the spread within them would lead you to expect.
The null hypothesis is that all group averages are equal. The test asks how surprising your data would be if that were true, and reports the answer as a significance level.
With three groups you could run three t-tests, one for each pair. Each test carries its own chance of a false alarm, and those chances add up. With five groups there are ten pairs, and at the 5% level the chance of at least one false finding is roughly 40%. ANOVA avoids this by asking one question first: is there any difference among the group averages at all? Only if the answer is yes does it make sense to look at which pairs differ.
One-way ANOVA has a single grouping variable and is the subject of this guide. Two-way ANOVA has two grouping variables and tests whether their effects depend on each other. Repeated-measures ANOVA is for the same people measured several times. Kruskal-Wallis is the rank-based partner for skewed or ordinal outcomes. All of them rest on the same idea of splitting variation.
A significant ANOVA says that at least one group differs from at least one other. It does not say which, so a follow-up comparison of pairs is part of the routine.
ANOVA and linear regression look like separate tools, and they are taught separately, but they are close relatives. Both are special cases of one general linear model, in which the outcome is a prediction based on the predictors plus unexplained error. A one-way ANOVA is a regression with one categorical predictor. If you code the groups, run a linear regression on the same outcome, and read the overall F test, you get the same F and the same significance level. The regression R-squared equals the ANOVA eta-squared. The regression intercept is the average of the reference group, and each coefficient is the gap between another group and that reference.
What differs is the question each one is built to answer and the output it puts first.
| Feature | ANOVA | Linear regression |
|---|---|---|
| Main question | Do the group averages differ at all? | How does the outcome change with each predictor? |
| Predictors | Categorical groups, called factors | Categorical, numeric, or a mix |
| Headline output | F test, eta-squared, group averages, pairwise differences | Coefficients with confidence intervals, R-squared, adjusted R-squared |
| Comparisons | Every group against every other group | Each category against a chosen reference category |
| Adjusting for other variables | Not in one-way ANOVA | Yes, holding other predictors constant |
| Prediction | Not the aim | Yes, for any combination of predictors |
| Typical setting | Designed comparisons with a few groups, such as treatment arms or teaching methods | Observational data where many factors act at once |
Put simply, ANOVA asks whether groups differ, and regression asks by how much, and with what else held constant. When the only question is whether three or more groups differ on an outcome, either gives the same overall answer, and ANOVA presents it in the way most readers expect. Once you need to adjust for other variables, include a numeric predictor such as age, compare each group with a chosen reference, or predict the outcome, use regression.
Use one-way ANOVA when all of these hold:
Typical examples are test scores across three teaching methods, customer satisfaction across four branches, crop yield under three fertilisers, or recovery time across the arms of a trial.
Choose a different method when your situation changes:
Independent observations. Each person appears once and is unrelated to the others in the data.
Roughly normal outcomes in each group. ANOVA is fairly tolerant of this when groups are moderately large.
Similar spread across groups. ANOVA is most reliable when group standard deviations are close. As a quick check, compare the standard deviations in the descriptives table. If the largest is more than about twice the smallest, and group sizes differ a lot, be cautious with the result.
The table splits the variation into between-group and within-group sources, each with a sum of squares, degrees of freedom, and mean square. The F statistic and its significance level tell you whether the group averages differ by more than chance would suggest. A significant F means at least one group differs from the others. It does not say which.
Eta-squared is the share of the total variation in the outcome that the grouping variable accounts for. Under 6% is small, 6% to 14% medium, and over 14% large. If school explains 8% of the variation in exam scores, the effect is medium: school matters, but most of the variation is still between individual students.
When the F test is significant, the follow-up table compares every pair of groups, giving the difference in averages and its significance. This is where you find out which groups differ.
Open Inferential Analysis, choose Compare Means, then One-way ANOVA.
Running one-way ANOVA in AnalyZ Solutions.
You can export as CSV, Excel, or Word, send the finding to Sense Making, or add a bar chart with the group averages to a Data Canvas slide.
The figures below are invented to show the steps, and they follow the results tables in AnalyZ Solutions, with a few columns left out to save space. Suppose exam scores were collected from 30 students in each of three schools.
| Group | N | Mean | SD |
|---|---|---|---|
| School A | 30 | 68.2 | 9.0 |
| School B | 30 | 70.9 | 9.0 |
| School C | 30 | 75.6 | 9.0 |
| Source | SS | df | MS | F | p-value | Sig | η² |
|---|---|---|---|---|---|---|---|
| Between groups | 841.4 | 2 | 420.7 | 5.1938 | 0.0074 | ** | 0.107 |
| Within groups | 7047.0 | 87 | 81.0 |
| Group 1 | Group 2 | Mean diff | p-value | Sig |
|---|---|---|---|---|
| School A | School B | -2.7 | 0.2500 | ns |
| School A | School C | -7.4 | 0.0023 | ** |
| School B | School C | -4.7 | 0.0477 | * |
Exam scores differed across the three schools, and the differences were medium in size and significant at the 1% level. School C scored clearly higher than School A. School B fell between them and was not clearly different from either, apart from a borderline gap with School C. The test shows that schools differ, and it does not explain why.
Running several t-tests instead. This inflates the chance of false findings. Use ANOVA first, then pairwise follow-ups.
Stopping at the F test. A significant result says something differs. The reader needs to know what.
Including tiny groups. A group of three or four people has an unstable average that can distort comparisons. Consider merging sparse categories where it makes conceptual sense.
Reading eta-squared as causation. The grouping variable may be associated with the outcome through other factors that differ between groups.
Open Compare Means in AnalyZ Solutions. Free to sign up, free to analyze.
Get started