# ANOVA (Analysis Of Variance): Definition, Types, and Examples

By Julia Simkus, published Jan 26, 2022

## What is an ANOVA?

An ANOVA test is a type of statistical test used to determine if there is a statistically significant difference between two or more categorical groups by testing for differences of means using variance.

Another Key part of ANOVA is that it splits the independent variable into 2 or more groups. For example, one or more groups might be expected to influences the dependent variable while the other group is used as a control group, and is not expected to influence the dependent variable.

## Assumptions of ANOVA

The assumptions of the ANOVA test are the same as the general assumptions for any parametric test:

1. An ANOVA can only be conducted if there is no relationship between the subjects in each sample. This means that subjects in the first group cannot also be in the second group (e.g. independent samples/between-groups).
2. The different groups/levels must have equal sample sizes.
3. An ANOVA can only be conducted if the dependent variable is normally distributed, so that the middle scores are most frequent and extreme scores are least frequent.
4. Population variances must be equal (i.e. homoscedastic). Homogeneity of variance means that the deviation of scores (measured by the range or standard deviation for example) is similar between populations.

## Types of ANOVA Tests

There are different types of ANOVA tests. The two most common are a “One-Way” and a “Two-Way.”

The difference between these two types depends on the number of independent variables in your test.

### One-way ANOVA

A one-way ANOVA (analysis of variance) has one categorical independent variable (also known as a factor) and a normally distributed continuous (i.e., interval or ratio level) dependent variable.

The independent variable divides cases into two or more mutually exclusive levels, categories, or groups.

The one-way ANOVA test for differences in the means of the dependent variable is broken down by the levels of the independent variable.

An example of a one-way ANOVA includes testing a therapeutic intervention (CBT, medication, placebo) on the incidence of depression in a clinical sample.

Note: Both the One-Way ANOVA and the Independent Samples t-Test can compare the means for two groups. However, only the One-Way ANOVA can compare the means across three or more groups.

### Two-way (factorial) ANOVA

A two-way ANOVA (analysis of variance) has two or more categorical independent variables (also known as a factor), and a normally distributed continuous (i.e., interval or ratio level) dependent variable.

The independent variables divide cases into two or more mutually exclusive levels, categories, or groups. A two-way ANOVA is also called a factorial ANOVA.

An example of a factorial ANOVAs include testing the effects of social contact (high, medium, low), job status (employed, self-employed, unemployed, retired), and family history (no family history, some family history) on the incidence of depression in a population.

## What are “Groups” or “Levels”?

Levels are different groupings within the same independent variable.

For example, if the independent variable is “eggs” the levels might be Non-Organic, Organic, and Free Range Organic. The dependent variable could then be price per dozen eggs.

## Understanding the ANOVA F-value

The test statistic for an ANOVA is denoted as F. The formula for ANOVA is F = variance caused by treatment/variance due to random chance.

The ANOVA F value can tell you if there is a significant difference between the levels of the independent variable, when p < .05. So, a higher F value indicates that the treatment variables are significant.

Note that the ANOVA alone does not tell us specifically which means were different from one another. To determine that, we would need to follow up with multiple comparisons (or post-hoc) tests.

When the initial F test indicates that significant differences exist between group means, post hoc tests are useful for determining which specific means are significantly different when you do not have specific hypotheses that you wish to test.

Post hoc tests compare each pair of means (like t-tests), but unlike t-tests, they correct the significance estimate to account for the multiple comparisons.

## What Does “Replication” Mean?

Replication requires a study to be repeated with different subjects and experimenters. This would enable a statistical analyzer to confirm a prior study by testing the same hypothesis with a new sample.

## How to run an ANOVA?

For large datasets, it is best to run an ANOVA in statistical software such as R or Stata. Let’s refer to our Egg example above.

Non-Organic, Organic, and Free-Range Organic Eggs would be assigned quantitative values (1,2,3) and would serve as our independent treatment variable, while price per dozen eggs would serve as the dependent variable. Other erroneous variables may include “Brand Name” or “Laid Egg Date.”

Using data and the aov() command in R, we could then determine the impact Egg Type has on price per dozen eggs.

## What is the difference between an ANOVA and a t-test?

T-tests and ANOVA tests are both statistical techniques used to compare differences in means and spreads of the distributions across populations.

The t-test determines whether two populations are statistically different from each other, whereas ANOVA tests are used when an individual wants to test more than two levels within an independent variable.

Referring back to our egg example, testing Non-Organic vs Organic would require a t-test, while adding in Free Range as a third option demands ANOVA. Rather than generate a t-statistic, ANOVA results in an f-statistic to determine statistical significance.

##### About the Author

Julia Simkus is an undergraduate student at Princeton University, majoring in Psychology. She plans to pursue a PhD in Clinical Psychology upon graduation from Princeton in 2023. Julia has co-authored two journal articles, one titled “Substance Use Disorders and Behavioral Addictions During the COVID-19 Pandemic and COVID-19-Related Restrictions," which was published in Frontiers in Psychiatry in April 2021 and the other titled “Food Addiction: Latest Insights on the Clinical Implications," to be published in Handbook of Substance Misuse and Addictions: From Biology to Public Health in early 2022.

Simkus, J. (2022, Jan 26). What is ANOVA (Analysis Of Variance). Simply Psychology. www.simplypsychology.org/anova.html

#### Sources

ANOVA test: Definition & Uses (updated 2022). Qualtrics (n.d.). Retrieved from https://www.qualtrics.com/experience-management/research/anova/

ANOVA test: Definition, types, examples, SPSS. Statistics How To (2021). Retrieved from https://www.statisticshowto.com/probability-and-statistics/hypothesis-testing/anova/

Kenton, W. (2021). How analysis of variance (ANOVA) works. Investopedia (n.d.). Retrieved from https://www.investopedia.com/terms/a/anova.asp