This guide will explain, step by step, how to perform a one-way ANOVA test in the SPSS statistical software by using an example. The guide will also explain how to perform post hoc tests to investigate significant results further.

## What is a one-way ANOVA test?

A one-way analysis of variance (ANOVA) test is a statistical tool to determine if there are any differences between the means of three or more continuous variables. This particular test assumes that the data in each group is normally distributed.

## How to perform a one-way ANOVA test in SPSS

I will use an example to explain how to perform a one-way ANOVA test. For instance, say we have measured the weights of different rats. There are three groups of rats:

- Controls: these have not received any physical exercise.
- Exercised: these have performed 6 weeks of physical exercise.
- Pill: these have been treated with a diet pill for 6 weeks.

We want to know if there are any differences between the weights of the rats after the 6 week period. We can now formulate two hypotheses.

Our null hypothesis would read:

**“There are no differences in the weights of the rats after the 6 week period.”**

Our alternative hypothesis would be:

**“There is a difference in weight between the three rat groups.”**

The one-way ANOVA test will be able to inform us if there is a significant difference between the three groups. However, it cannot directly state which group(s) are different from each other. So, if a one-way ANOVA test indiciates a significant result, further post hoc testing is required to investigate specifically which groups are significantly different.

### The dataset

In SPSS, I have created a file containing two data variables labelled** ‘Weight’** and ‘**Group**‘. The first contains all of the rat weights (measured in grams). In the ‘**Group**‘ column, I have assigned the numbers ‘**1**‘, ‘**2**‘, or ‘**3**‘ to indicate which experiment group the rats belong to.

Below is a snapshot of what part of the data looks like so you get the idea.

## Performing the one-way ANOVA test

Now we have the dataset, let’s perform the one-way ANOVA test in SPSS.

- Firstly, go to ‘
**Analyze > Compare Means > One-Way ANOVA…**‘.

2. A new window will open. Here you need to move the ‘**Weight**‘ data into the window called ‘**Dependent List**‘ and the ‘**Group**‘ variable into the box titled ‘**Factor**‘.

3. Since we do not know whether there are any differences in weights between our three groups, we should avoid performing post hoc test just yet. It is, however, worth getting further descriptive data at this point. To do this, click the ‘**Options…**‘ button. This will bring up a new window, here you should tick the ‘**Descriptive**‘ option under the ‘**Statistics**‘ heading and click the ‘**Continue**‘ button.

4. Finally, click the ‘**OK**‘ button to run the test.

## One-way ANOVA Output

The results are presented in the output window in SPSS. You should be presented with two boxes.

The first (‘**Descriptives**‘) contains a wealth of information including mean, standard deviation, standard error and 95% confidence intervals stratified by each group, as well as combined. We can clearly see large differences in mean weight values.

The next output box (‘**ANOVA**‘) contains all of the statistical information regarding the one-way ANOVA test. This includes the degrees of freedom (‘**df**‘), the F statistic (‘**F**‘) and the all important significance value (‘**Sig.**‘).

## One-Way ANOVA Interpretation

By looking at the table we can see that the significance (‘**Sig.**‘) value is ‘**.000**‘. This is considerably lower than our significance threshold of P<0.05. Therefore, we should reject the null hypothesis and accept the alternative hypothesis.

## One-Way ANOVA Reporting

At this point we can confirm that there is a significant difference in rat weights between the three groups. Thus we could summarise this, including the statistical output, in one simple sentence.

After a 6-week period, there was a significant difference in rat weights between the experimental groups (F(2,21) = 518.8, P = .000).

The reporting includes the degrees of freedom, both between and within groups, the F statistic and the P value. The layout for reporting one-way ANOVA results always follows the same format. Below is a breakdown of what each part of the report represents.

## Performing post hoc tests

Since the results of the one-way ANOVA test returned a significant result, it is now appropriate to carry out post-hoc tests. This is to determine which specific groups are significant from another.

- To perform post hoc tests in SPSS, firstly go back to the one-way ANOVA window by going to ‘
**Analyze > Compare Means > One-Way ANOVA…**‘ (as described in step 1 above). - Now, enter the same data into the appropriate windows again (as described in step 2 above).
- Click the ‘
**Post Hoc…**‘ button to open the ‘**Post Hoc Multiple Comparisons**‘ window. There are multiple options for post hoc testing, but for this example we will use the commonly adopted Tukey post hoc test. Tick the ‘**Tukey**‘ option under the ‘**Equal Variances Assumed**‘ heading.

Now click the ‘**Continue**‘ button.

4. To run the test, click the ‘**OK**‘ button.

## Post hoc (Tukey) Output

By going to the output window, you will now see a new section of results titled ‘**Post Hoc Tests**‘. The results that we are interested are presented in the ‘**Multiple Comparisons**‘ box.

The output compares each possible group. For example, the first row presents the results for the comparison between the ‘**Control**‘ and the ‘**Exercised**‘ groups, as well as that between the ‘**Control**‘ and ‘**Pill**‘ groups. The ‘**Mean Difference**‘ is also given, which is the average difference in weights between the groups in comparison. Additionally, the table contains the standard error (‘**Std. Error**‘) and 95% confidence intervals. The P values for each comparison can be found under the ‘**Sig.**‘ column.

## Post hoc (Tukey) Interpretation

By looking at the ‘**Sig.**‘ column, it can be seen that all comparisons are significant since the P values are all ‘**.000**‘. Thus, the weights for the three rat groups are significantly different from each other.

## Post hoc (Tukey) Reporting

Since we now know the comparisons between each group, we can add to our previous reporting with the additional post hoc results. I have provided an example for the full reporting below.

After a 6-week period, there was a significant difference in rat weights between the experimental groups (F(2,21) = 518.8, P = .000). Both treatment groups weighed less than the controls (P<0.000 for both). Additionally, those on the exercise protocol weighed significantly less than the pill treatment (P<0.000).

IBM SPSS version used: 23