What Is Analysis of Variance (ANOVA)?

Written by Coursera Staff • Updated on

Learn what an ANOVA is, why professionals across industries choose it for statistical analysis, and how to determine when it’s the proper test for your research question.

[Featured Image] Two coworkers review an analysis of variance (ANOVA) on a laptop while discussing their findings.

Analysis of variance (ANOVA) is a statistical test that lets you compare whether several groups differ significantly across an independent variable (or two). By effectively harnessing statistical methods, such as ANOVA, you can make more informed decisions, track progress and performance, and answer research questions that arise.  Explore the ins and outs of ANOVAs, including different types, when to choose it for your analysis, and example research questions that benefit from this method.

What is ANOVA?

ANOVA is a statistical test you can use to assess the significance of how the means of three or more groups differ. It helps assess whether observed variations are due to actual differences or simply due to random chance. The groups you are comparing are generally spread across different levels of an independent factor. A factor could be a category (such as low, medium, or high), a type (such as brand of soda), a treatment (such as no treatment, low treatment, high treatment), and so on. 

Example of how ANOVA can be used

Imagine you are a farmer and want to know whether the fertilizer you use affects mean crop growth. You spray a different fertilizer on four of your fields and then measure your crop yield over the next year. Regardless of whether the fertilizer affected your crop growth, the mean yield of each field is not likely to be precisely the same as the others. An ANOVA test helps you compare these means statistically to determine whether the fertilizer made a difference in crop yield or whether the differences were likely due to chance.

Placeholder

Something to note is that an ANOVA tells you whether at least one of your group means differs from the others, but it does not indicate which one. To determine which of your group pairs are statistically different, you must complete follow-up statistical testing, known as post-hoc tests.

One-way ANOVA

A one-way ANOVA compares the mean of at least three groups across one independent variable or factor. It’s useful when you want to determine if a single variable has a significant impact on the outcome variable. For example, you could perform a one-way ANOVA to test whether:

  • Social media use (low, medium, high) affects mean sleep duration

  • Brand of battery affects how long your lightbulb lasts

  • Study location affects mean test score

  • Location affects mean rainfall per year

  • Height (short, average, tall) affects the mean baskets scored per basketball game

Two-way ANOVA

A two-way ANOVA extends the one-way model by simultaneously evaluating the impact of two independent variables (or factors) and their interaction. The interaction means how one of the factors affects the other. 

For example, if you were exploring how exercise frequency (none, one to three times per week, and more than three times per week) and diet (poor, average, good) affect mean mile time, a two-way ANOVA would allow you to consider how exercise and diet might interact. Those who exercise at least once per week might be more likely to have a good diet than someone who exercises zero times per week.

If you extend the previous one-way ANOVA examples to a two-way ANOVA, your research question might be similar to one of the following:

  • Whether social media use (low, medium, high) and caffeine intake (none, low, high) affect mean sleep duration

  • Whether the brand of battery and age of battery (new, average, old) affect how long your lightbulb lasts

  • Whether study location and sleep hours (low, average, high) affect mean test score

  • Whether location and time of year affect mean rainfall per year

  • Whether height (short, average, tall) and age (<10, 10-15, 15+) affect the mean baskets scored per basketball game 

Repeated measures ANOVA

A repeated measures ANOVA is the same as a one-way ANOVA, except it measures the same subjects at different times under different conditions. It accounts for the way participant measures at different time points correlate to one another. 

A repeated measures ANOVA might appear similar to the following example:

You want to understand how a cognitive training program affects participant memory over time. You assess memory performance at three time points:

  • Before the participant begins the training program

  • Right after they complete the training program

  • One week after finishing the training program

This is a repeated measures design because you are testing the same group of participants at the three time points. 

ANOVA variability measures

ANOVA tests examine variability in two ways: within-group variability and between-group variability. These are often represented at SSW and SSB in the ANOVA formula, respectively.

To measure variability within each group, you might use the sum of squares within (SSW or the within-group variation). This will examine variations due to participant differences within each group rather than how each group differs from one another. 

The sum of squares between (SSB or the between-group variation) measures the variability of the group means compared with the mean of all of the data. It captures how much of the variation in your data represents differences between the groups rather than within them. 

ANOVA compares the between-group variability (SSB) and within-group variability (SSW) using the F-statistic. If the SSB is much larger than the SSW, the F-statistic will be large, indicating that at least one of your group's means is significantly different than the others.

When to use ANOVA in your analysis

When appropriate, an ANOVA is a great statistical tool for assessing the differences between several group means. However, in other cases, another statistical tool might be better suited for your analysis. 

Use an ANOVA test when:

  • You have multiple groups and want to compare means across them

  • You have one or more categorical independent variables

  • You have a continuous dependent variable

  • Your data is normally distributed

  • Your data has equal variances among groups

Choose another statistical test when:

  • You have only two groups (a t-test may be more accurate)

  • You have non-normal data (opt for a non-parametric test)

  • You have unequal variances between groups 

  • You have a non-continuous dependent variable (a chi-square test might fit)

Who uses ANOVA?

You can use an ANOVA test in any industry that benefits from statistics, including medicine, business, data analytics, and research. For example, as a researcher or analyst, you might apply ANOVA in experimental and observational studies where you must compare multiple groups or treatments. If you work in health care, you might use ANOVA to compare the effects of different medications on patient outcomes. Or, as a businessperson, you might use an ANOVA to consider how different demographic patterns affect the purchasing behavior of your target market.

Continue learning about analysis of variance (ANOVA) on Coursera

ANOVAs are a useful statistical technique for comparing the means of three or more groups across an independent variable or variable. If you want to learn more about this technique and other powerful statistical tools, consider completing courses or Specializations on Coursera. 

As a beginner, you can build foundational statistical skills alongside practical applications with the Statistics and Applied Data Analysis Specialization by the University of Colorado Boulder. This program covers data analysis with Excel and R. Or consider the Google Data Analytics Professional Certificate, also available on Coursera, where you'll learn in-demand skills from Google experts.

Updated on
Written by:

Editorial Team

Coursera’s editorial team is comprised of highly experienced professional editors, writers, and fact...

This content has been made available for informational purposes only. Learners are advised to conduct additional research to ensure that courses and other credentials pursued meet their personal, professional, and financial goals.