One way ANOVA

This page offers all the basic information you need about one way ANOVA. It is part of Statkat’s wiki module, containing similarly structured info pages for many different statistical methods. The info pages give information about null and alternative hypotheses, assumptions, test statistics and confidence intervals, how to find p values, SPSS how-to’s and more.

To compare one way ANOVA with other statistical methods, go to Statkat's or practice with one way ANOVA at Statkat's

Contents

When to use?

Deciding which statistical method to use to analyze your data can be a challenging task. Whether a statistical method is appropriate for your data is partly determined by the measurement level of your variables. One way ANOVA requires the following variable types:

Variable types required for one way ANOVA :
Independent/grouping variable:
One categorical with $I$ independent groups ($I \geqslant 2$)
Dependent variable:
One quantitative of interval or ratio level

Note that theoretically, it is always possible to 'downgrade' the measurement level of a variable. For instance, a test that can be performed on a variable of ordinal measurement level can also be performed on a variable of interval measurement level, in which case the interval variable is downgraded to an ordinal variable. However, downgrading the measurement level of variables is generally a bad idea since it means you are throwing away important information in your data (an exception is the downgrade from ratio to interval level, which is generally irrelevant in data analysis).

If you are not sure which method you should use, you might like the assistance of our method selection tool or our method selection table.

Null hypothesis

One way ANOVA tests the following null hypothesis (H0):

ANOVA $F$ test: $t$ Test for contrast: $t$ Test multiple comparisons:
Alternative hypothesis

One way ANOVA tests the above null hypothesis against the following alternative hypothesis (H1 or Ha):

ANOVA $F$ test: $t$ Test for contrast: $t$ Test multiple comparisons:
Assumptions

Statistical tests always make assumptions about the sampling procedure that was used to obtain the sample data. So called parametric tests also make assumptions about how data are distributed in the population. Non-parametric tests are more 'robust' and make no or less strict assumptions about population distributions, but are generally less powerful. Violation of assumptions may render the outcome of statistical tests useless, although violation of some assumptions (e.g. independence assumptions) are generally more problematic than violation of other assumptions (e.g. normality assumptions in combination with large samples).

One way ANOVA makes the following assumptions:

Test statistic

One way ANOVA is based on the following test statistic:

ANOVA $F$ test: $t$ Test for contrast: $t$ Test multiple comparisons:
Pooled standard deviation

$ \begin{aligned} s_p &= \sqrt{\dfrac{(n_1 - 1) \times s^2_1 + (n_2 - 1) \times s^2_2 + \ldots + (n_I - 1) \times s^2_I}{N - I}}\\ &= \sqrt{\dfrac{\sum\nolimits_{subjects} (\mbox{subject's score} - \mbox{its group mean})^2}{N - I}}\\ &= \sqrt{\dfrac{\mbox{sum of squares error}}{\mbox{degrees of freedom error}}}\\ &= \sqrt{\mbox{mean square error}} \end{aligned} $

Here $s^2_i$ is the variance in group $i.$
Sampling distribution

Sampling distribution of $F$ and of $t$ if H0 were true:

Sampling distribution of $F$: Sampling distribution of $t$:
Significant?

This is how you find out if your test result is significant:

$F$ test:
$t$ Test for contrast two sided: $t$ Test for contrast right sided: $t$ Test for contrast left sided:
$t$ Test multiple comparisons two sided: $t$ Test multiple comparisons right sided $t$ Test multiple comparisons left sided
$C\%$ confidence interval for $\Psi$, for $\mu_g - \mu_h$, and for $\mu_i$

Confidence interval for $\Psi$ (contrast): Confidence interval for $\mu_g - \mu_h$ (multiple comparisons): Confidence interval for single population mean $\mu_i$:
Effect size

ANOVA table

This is how the entries of the ANOVA table are computed:

ANOVA table

Click the link for a step by step explanation of how to compute the sum of squares.
Equivalent to

One way ANOVA is equivalent to:

OLS regression with one categorical independent variable transformed into $I - 1$ code variables:
Example context

One way ANOVA could for instance be used to answer the question:

Is the average mental health score different between people from a low, moderate, and high economic class?
SPSS

How to perform a one way ANOVA in SPSS:

Analyze > Compare Means > One-Way ANOVA... or
Analyze > General Linear Model > Univariate...
Jamovi

How to perform a one way ANOVA in jamovi:

ANOVA > ANOVA