# What Is Analysis of Variance (ANOVA)?

How to use this statistical analysis tool

> **Definition**
>
> Analysis of variance (ANOVA) is a statistical method for determining whether differences in group means are statistically significant or likely due to random variation.

## What Is Analysis of Variance (ANOVA)?

Analysis of variance (ANOVA) is a statistical test used to assess the difference between the means of more than two groups. At its core, ANOVA allows you to compare [arithmetic means](https://www.investopedia.com/terms/a/arithmeticmean.asp) across groups simultaneously. You can determine whether the differences observed are due to random chance or if they reflect genuine, meaningful differences.

A one-way ANOVA uses one independent variable. A two-way ANOVA uses two independent variables. Analysts use the ANOVA test to determine the influence of independent variables on the dependent variable in a regression study.

While this can sound arcane to those new to statistics, the applications of ANOVA are as diverse as they are profound. From medical researchers investigating the efficacy of new treatments to marketers analyzing [consumer preferences](https://www.investopedia.com/terms/r/revealed-preference.asp), ANOVA has become an indispensable tool for understanding complex systems and making data-driven decisions.

### Key Takeaways

*   ANOVA is a statistical method that simultaneously compares means across several groups to determine if observed differences are due to chance or reflect genuine distinctions.
*   A one-way ANOVA uses one independent variable. A two-way ANOVA uses two independent variables.
*   By partitioning total variance into components, ANOVA unravels relationships between variables and identifies true sources of variation.
*   ANOVA can handle multiple factors and their interactions, providing a robust way to better understand intricate relationships.

![Analysis of variance concept illustration with labeled text and a chart showing data distribution variability](https://www.investopedia.com/thmb/DtBF1qar0c5euf4cbG5VqHQ4dZg=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/Analysis-of-Variance-046c809d7efa49d98ea53c4b232a86e8.jpg)

*— Xiaojie Liu / Investopedia*

## How ANOVA Works

An ANOVA test can be applied when data needs to be experimental. Analysis of variance is employed if there is no access to statistical software, and ANOVA must be calculated by hand. It's simple to use and best suited for small samples involving subjects, test groups, and between and within groups.

ANOVA is like several two-sample [t-tests](https://www.investopedia.com/terms/t/t-test.asp). However, it results in fewer Type I errors. ANOVA groups differences by comparing each group's means and includes spreading the variance into diverse sources.

Analysts use a one-way ANOVA with collected data about one independent variable and one dependent variable. A two-way ANOVA uses two independent variables. The independent variable should have at least three different groups or categories. ANOVA determines if the dependent variable changes according to the level of the independent variable. 

Researchers might test students from several colleges to see if students from one of them consistently outperform those from other schools. In a business application, a research and development researcher might test two ways of creating a product to see if one is better than the other in cost efficiency.

ANOVA's versatility and ability to handle multiple variables make it a valuable tool for researchers and analysts across various fields. By comparing means and partitioning variance, ANOVA provides a robust way to understand the relationships between variables and identify significant differences among groups.

### ANOVA Formula

  

$\begin{aligned} &\text{F} = \frac{ \text{MST} }{ \text{MSE} } \\ &\textbf{where:} \\ &\text{F} = \text{ANOVA coefficient} \\ &\text{MST} = \text{Mean sum of squares due to treatment} \\ &\text{MSE} = \text{Mean sum of squares due to error} \\ \end{aligned}$

## History of ANOVA

The t- and [z-test methods](https://www.investopedia.com/terms/z/z-test.asp), developed in the 20th century, were used for statistical analysis. In 1918, Ronald Fisher created the analysis of variance method.

For this reason, ANOVA is also called the Fisher analysis of variance, and it's an extension of the t- and z-tests. The term became well-known in 1925 after appearing in Fisher's book, "Statistical Methods for Research Workers." It was first employed in experimental psychology and later expanded to other subjects.

The ANOVA test is the first step in analyzing factors that affect a given data set. Once the test is finished, an analyst performs further testing on the factors that measurably might be contributing to the data's inconsistency. The analyst utilizes the ANOVA test results in an F-test to generate further data that aligns with the proposed [regression](https://www.investopedia.com/terms/r/regression.asp) models.

If you need reminders on these terms, here's a cheat sheet for many of the major statistical tests found in finance studies:

## What ANOVA Can Tell You

ANOVA splits the observed aggregate variability within a dataset into two parts: systematic factors and random factors. The systematic factors influence the given data set, while the random factors do not.

The ANOVA test lets you compare more than two groups simultaneously to determine whether a relationship exists between them. The result of the ANOVA formula, the F statistic or F-ratio, allows you to analyze several data groups to assess the variability between samples and within samples.

If no real difference exists between the tested groups, called the [null hypothesis](https://www.investopedia.com/terms/n/null_hypothesis.asp), the result of the ANOVA's F-ratio statistic will be close to one. The distribution of all possible values of the F statistic is the F-distribution. This is a group of distribution functions with two characteristic numbers, called the numerator [degrees of freedom](https://www.investopedia.com/terms/d/degrees-of-freedom.asp) and the denominator degrees of freedom.

## One-Way vs. Two-Way ANOVA

One-Way ANOVA

*   Uses one independent variable or factor
    
*   Assesses the impact of a single categorical variable on a continuous dependent variable, identifying significant differences among group means  
    
*   Does not account for interactions
    

Two-Way ANOVA

*   Uses two independent variables or factors
    
*   Used to not only understand the individual effects of two different factors but also how the combination of these two factors influences the outcome  
    
*   Can test for interactions between factors
    

A one-way ANOVA evaluates the impact of a single factor on a single response variable. It determines whether all the samples are the same. The one-way ANOVA is used to determine whether there are any statistically significant differences between the means of three or more independent groups.

A two-way ANOVA is an extension of the one-way ANOVA. With a one-way design, one independent variable affects a dependent variable.

With a two-way ANOVA, there are two independent variables. For example, a two-way ANOVA allows a company to compare worker productivity based on two independent variables, such as [salary](https://www.investopedia.com/articles/personal-finance/031115/salary-vs-hourly-how-benefits-laws-differ.asp) and skill set. It's utilized to see the interaction between the two factors and test the effect of the two factors simultaneously.

## Example of ANOVA

Suppose you want to assess the performance of different investment portfolios across various market conditions. The goal is to determine which portfolio strategy performs best under what conditions.

You have three [portfolio strategies](https://www.investopedia.com/articles/basics/13/portfolio-growth-strategies.asp):

1.  Technology portfolio (tech stocks): High-risk, high-return
2.  Balanced portfolio (stocks and bonds): Moderate-risk, moderate return
3.  Fixed-income portfolio (bonds and money market instruments): Low-risk, low return

You also want to check against two market conditions:

1.  A bull market
2.  A bear market

A one-way ANOVA could give a broad overview of portfolio strategy performance, while a two-way ANOVA adds a deeper understanding by including the varying market conditions.

### One-Way ANOVA

A one-way ANOVA could be used to initially analyze the performance differences among the three different portfolios without considering the impact of market conditions. The independent variable would be the type of investment portfolio, and the dependent variable would be the returns generated.

You would group the returns of the technology, balanced, and fixed-income portfolios for a preset period and compare the mean returns of the three portfolios to determine if there are statistically significant differences. This would help determine whether different investment strategies result in different returns, but it would not account for how different [market conditions](https://www.investopedia.com/articles/technical/03/060303.asp) might influence these returns.

### Two-Way ANOVA

Meanwhile, a two-way ANOVA would be more appropriate for analyzing both the effects of the investment portfolio and the market conditions, as well as any interaction between these two factors on the returns.

> **Important**
>
> MANOVA (multivariate ANOVA) differs from ANOVA as it tests for several dependent variables simultaneously, while ANOVA assesses only one dependent variable at a time.

You would first need to group each portfolio's returns under both bull and bear market conditions. Next, you would compare the mean returns across both factors to determine the effect of the investment strategy on returns, the effect of market conditions on returns, and whether the effectiveness of a particular investment strategy depends on the market conditions.

Suppose the technology portfolio performs significantly better in bull markets but underperforms in bear markets, while the fixed-income portfolio provides stable returns regardless of the market. Looking at these interactions could help you see when it's best to advise using a technology portfolio and when a bear market means it's soundest to turn to a [fixed-income](https://www.investopedia.com/terms/f/fixedincome.asp) portfolio.

## How Does ANOVA Differ From a T-Test?

ANOVA differs from t-tests in that ANOVA can compare three or more groups, while t-tests are only useful for comparing two groups at a time.

## What Is Analysis of Covariance (ANCOVA)?

Analysis of covariance combines ANOVA and regression. It can be useful for understanding the within-group variance that ANOVA tests do not explain.

## Does ANOVA Rely on Any Assumptions?

Yes, ANOVA tests assume that the data is normally distributed and that variance levels in each group are roughly equal. Finally, it assumes that all observations are made independently. If these assumptions are inaccurate, ANOVA may not be useful for comparing groups.

## The Bottom Line

ANOVA is a robust statistical tool that allows researchers and analysts to simultaneously compare arithmetic means across multiple groups.

By dividing variance into different sources, ANOVA helps identify significant differences and uncover meaningful relationships between variables. Its versatility and ability to handle various factors make it an essential tool for many fields that use statistics, including finance and investing.

Understanding ANOVA's principles, forms, and applications is crucial for leveraging this technique effectively. Whether using a one-way or two-way ANOVA, researchers can gain greater clarity about complex systems to make data-driven decisions.

As with any statistical method, it's essential to interpret the results carefully and consider the context and limitations of the analysis.

> **Article Sources**
>
> 1.  Genetic Epidemiology, Translational Neurogenomics, Psychiatric Genetics and Statistical Genetics-QIMR Berghofer Medical Research Institute. "[The Correlation Between Relatives on the Supposition of Mendelian Inheritance](https://genepi.qimr.edu.au/contents/p/staff/1966Moran&SmithCommentaryFisher1918X.pdf)."
>     
> 2.  Ronald Fisher. "[Statistical Methods for Research Workers](https://link.springer.com/chapter/10.1007/978-1-4612-4380-9_6)." Springer-Verlag New York, 1992.