Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

One-way ANOVA tests whether three or more population means are equal using one categorical explanatory variable and one quantitative response variable. This cheat sheet walks students through the full procedure from hypotheses to decision. It is useful because ANOVA tables can look formula-heavy, but each row follows a clear pattern.

A step-by-step reference helps connect the calculations to the statistical conclusion.

The core idea is to compare variation between group means with variation within groups. The test statistic is F=MSbetweenMSwithinF = \frac{MS_{\text{between}}}{MS_{\text{within}}}, where larger values give stronger evidence that not all means are equal. The main calculations are sums of squares, degrees of freedom, mean squares, the FF statistic, and the p-value.

A valid one-way ANOVA also requires independence, approximate normality within groups, and similar group variances.

Key Facts

  • The null hypothesis for one-way ANOVA is H0:μ1=μ2==μkH_0: \mu_1 = \mu_2 = \cdots = \mu_k, meaning all group population means are equal.
  • The alternative hypothesis is Ha:H_a: at least one group mean is different, not that every mean is different.
  • The total sample size is N=n1+n2++nkN = n_1 + n_2 + \cdots + n_k, where kk is the number of groups.
  • The between-groups sum of squares is SSbetween=i=1kni(xˉixˉ)2SS_{\text{between}} = \sum_{i=1}^{k} n_i(\bar{x}_i - \bar{x})^2.
  • The within-groups sum of squares is SSwithin=i=1kj=1ni(xijxˉi)2SS_{\text{within}} = \sum_{i=1}^{k} \sum_{j=1}^{n_i}(x_{ij} - \bar{x}_i)^2.
  • The degrees of freedom are dfbetween=k1df_{\text{between}} = k - 1, dfwithin=Nkdf_{\text{within}} = N - k, and dftotal=N1df_{\text{total}} = N - 1.
  • The mean squares are MSbetween=SSbetweendfbetweenMS_{\text{between}} = \frac{SS_{\text{between}}}{df_{\text{between}}} and MSwithin=SSwithindfwithinMS_{\text{within}} = \frac{SS_{\text{within}}}{df_{\text{within}}}.
  • The ANOVA test statistic is F=MSbetweenMSwithinF = \frac{MS_{\text{between}}}{MS_{\text{within}}}, and a small p-value such as p<αp < \alpha leads to rejecting H0H_0.

Vocabulary

One-way ANOVA
A hypothesis test used to compare the means of kk independent groups based on one categorical factor.
Factor
The categorical explanatory variable that defines the groups being compared in a one-way ANOVA.
Treatment group
One level of the factor, with observations used to estimate that group mean μi\mu_i.
Sum of squares
A measure of variation found by adding squared deviations, such as SSbetweenSS_{\text{between}} or SSwithinSS_{\text{within}}.
Mean square
A variance estimate found by dividing a sum of squares by its degrees of freedom, such as MS=SSdfMS = \frac{SS}{df}.
F statistic
The ANOVA test statistic F=MSbetweenMSwithinF = \frac{MS_{\text{between}}}{MS_{\text{within}}} that compares between-group variation to within-group variation.

Common Mistakes to Avoid

  • Writing the alternative hypothesis as μ1μ2μ3\mu_1 \ne \mu_2 \ne \mu_3 is wrong because ANOVA only tests whether at least one mean differs.
  • Using N1N - 1 for every degrees of freedom value is wrong because ANOVA separates degrees of freedom into dfbetween=k1df_{\text{between}} = k - 1 and dfwithin=Nkdf_{\text{within}} = N - k.
  • Dividing SSbetweenSS_{\text{between}} by NkN - k is wrong because between-group variation must be divided by k1k - 1 to get MSbetweenMS_{\text{between}}.
  • Concluding which specific groups differ from a significant ANOVA alone is wrong because a significant FF test does not identify the pairs that differ.
  • Ignoring assumptions is wrong because nonindependent data, strong nonnormality, or very unequal variances can make the ANOVA p-value unreliable.

Practice Questions

  1. 1 A study compares k=4k = 4 teaching methods with N=48N = 48 students total. Find dfbetweendf_{\text{between}}, dfwithindf_{\text{within}}, and dftotaldf_{\text{total}}.
  2. 2 Given SSbetween=90SS_{\text{between}} = 90, SSwithin=180SS_{\text{within}} = 180, k=3k = 3, and N=30N = 30, compute MSbetweenMS_{\text{between}}, MSwithinMS_{\text{within}}, and FF.
  3. 3 An ANOVA table gives MSbetween=12.5MS_{\text{between}} = 12.5 and MSwithin=5.0MS_{\text{within}} = 5.0. Calculate the test statistic FF and state whether the between-group variation is larger than the within-group variation.
  4. 4 If a one-way ANOVA has p=0.018p = 0.018 at α=0.05\alpha = 0.05, what conclusion should you make, and why does this not tell you exactly which group means are different?

Understanding One-Way ANOVA Step-by-Step Walkthrough

ANOVA begins by finding one overall average for every observation in the study. It then asks how much each group average differs from that overall average. A group with many observations counts more in this comparison because its average is based on more data.

The remaining variation comes from individual observations differing from their own group average. These two sources account for all variation in the response values.

This is why the total sum of squares equals the between-groups sum of squares plus the within-groups sum of squares. Thinking of variation as being split this way makes the table less mechanical.

Degrees of freedom adjust each sum of squares for the amount of information used to calculate it. The between-groups part has one fewer degree of freedom than the number of groups because group averages are tied to the overall average. The within-groups part has the total number of observations minus the number of groups because each group average has been estimated from its data.

Dividing by degrees of freedom produces mean squares. The within-groups mean square is especially important.

It estimates the usual random spread of individual values inside groups. If the groups truly come from populations with the same mean, the between-groups mean square should usually be similar in size.

The F statistic compares those two mean squares. An F value near one is common when apparent group differences can be explained by ordinary within-group scatter. A much larger value means the group averages are farther apart than expected from that scatter.

The p-value is found from an F distribution that uses both degrees of freedom. It describes how unusual an F value at least this large would be if there were really no population mean differences. Statistical significance does not show which groups differ or how large the difference is.

After a significant result, students often use planned comparisons or a post-hoc method such as Tukey's procedure. These methods control the extra false positive risk created by making many pairwise comparisons.

ANOVA appears in studies of crop yields under several fertilizers, test scores after several teaching methods, or battery life for several phone settings. The grouping variable must place each observation in exactly one category. The response must be numerical, not a label or rating category treated carelessly as a number.

Independence depends on study design. Measurements from the same person, family, classroom, or machine can be related, which can make the result misleading. Check plots before trusting the output.

Side-by-side boxplots can reveal extreme outliers, unequal spreads, or unusual group shapes. Residual plots are useful because ANOVA assumes the errors around each group mean have similar spread.

With roughly similar group sizes, ANOVA can handle modest departures from normality. Strong skewness, major outliers, or very unequal variances need more caution and may call for a transformation, Welch ANOVA, or a nonparametric alternative.