What is the definition, formula, and example of One-Way ANOVA?

One-Way ANOVA (Analysis of Variance) is a statistical method used to compare the means of three or more groups. It is typically used when there is one independent variable (or factor) and one dependent variable. The formula for One-Way ANOVA is F = (between-group variance / within-group variance), where F is the ratio of the variance between the groups to the variance within the groups. This test produces an F-statistic and a corresponding p-value, which is used to determine whether there is a significant difference between the means of the groups. An example of One-Way ANOVA would be comparing the average test scores of students in three different schools to see if there is a significant difference in academic performance.

One-Way ANOVA: Definition, Formula, and Example


A one-way ANOVA (“analysis of variance”) compares the means of three or more independent groups to determine if there is a statistically significant difference between the corresponding population means.

This tutorial explains the following:

  • The motivation for performing a one-way ANOVA.
  • The assumptions that should be met to perform a one-way ANOVA.
  • The process to perform a one-way ANOVA.
  • An example of how to perform a one-way ANOVA.

One-Way ANOVA: Motivation

Suppose we want to know whether or not three different exam prep programs lead to different mean scores on a college entrance exam. Since there are millions of high school students around the country, it would be too time-consuming and costly to go around to each student and let them use one of the exam prep programs.

Instead, we might select three  of 100 students from the population and allow each sample to use one of the three test prep programs to prepare for the exam. Then, we could record the scores for each student once they take the exam.

Selecting samples from a population

However, it’s virtually guaranteed that the mean exam score between the three samples will be at least a little different. The question is whether or not this difference is statistically significant. Fortunately, a one-way ANOVA allows us to answer this question.

One-Way ANOVA: Assumptions

For the results of a one-way ANOVA to be valid, the following assumptions should be met:

1. Normality – Each sample was drawn from a normally distributed population.

2. Equal Variances – The variances of the populations that the samples come from are equal. You can use to verify this assumption.

3. Independence – The observations in each group are independent of each other and the observations within groups were obtained by a random sample.

Read for in-depth details on how to check these assumptions.

One-Way ANOVA: The Process

A one-way ANOVA uses the following null and alternative hypotheses:

  • H0 (null hypothesis): μ1 = μ2 = μ= … = μ(all the population means are equal)
  • H(alternative hypothesis): at least one population mean is different from the rest

No matter which software you use, you will receive the following table as output:

Source Sum of Squares (SS) df Mean Squares (MS) F p
Treatment SSR dfr MSR MSR/MSE Fdfr, dfe
Error SSE dfe MSE    
Total SST dft      

where:

  • SSR: regression sum of squares
  • SSE: error sum of squares
  • SST: total sum of squares (SST = SSR + SSE)
  • dfr: regression degrees of freedom (df= k-1)
  • dfe: error degrees of freedom (df= n-k)
  • dft: total degrees of freedom (df= n-1)
    • k: total number of groups
    • n: total observations
  • MSR: regression mean square (MSR = SSR/dfr)
  • MSE: error mean square (MSE = SSE/dfe)
  • F: The F test statistic (F = MSR/MSE)
  • p: The p-value that corresponds to Fdfr, dfe

If the p-value is less than your chosen significance level (e.g. 0.05), then you can reject the null hypothesis and conclude that at least one of the population means is different from the others.

Note: If you reject the null hypothesis, this indicates that at least one of the population means is different from the others, but the ANOVA table doesn’t specify which population means are different. To determine this, you need to perform , also known as “multiple comparisons” tests.

One-Way ANOVA: Example

Suppose we want to know whether or not three different exam prep programs lead to different mean scores on a certain exam. To test this, we recruit 30 students to participate in a study and split them into three groups.

The students in each group are to use one of the three exam prep programs for the next three weeks to prepare for an exam. At the end of the three weeks, all of the students take the same exam. 

The exam scores for each group are shown below:

Example one-way ANOVA data

To perform a one-way ANOVA on this data, we will use the Statology with the following input:

One-way ANOVA calculation example

From the output table we see that the F test statistic is 2.358 and the corresponding p-value is 0.11385.

ANOVA output table interpretation

Since this p-value is not less than 0.05, we fail to reject the null hypothesis.

This means we don’t have sufficient evidence to say that there is a statistically significant difference between the mean exam scores of the three groups.

Additional Resources

The following articles explain how to perform a one-way ANOVA using different statistical softwares:

How to Perform a One-Way ANOVA in SPSS

x