# SPSS tutorials

BASICS REGRESSION T-TEST ANOVA CORRELATION

# SPSS One-Way ANOVA Tutorial

SPSS One-Way ANOVA tests if the means on a metric variable for three or more populations are all equal. ANOVA is short for “Analysis of Variance. This is a family of statistical procedures for testing whether means for groups of cases and/or variables are equal. “One-Way ANOVA” refers to the simplest scenario, involving one categorical group variable and one metric dependent variable. The populations are identified in the sample by a categorical variable.
For a very simple explanation of the basic idea, see ANOVA - What Is It?.

## SPSS One-Way ANOVA Example

A farmer wants to know if the weight of parsley plants is influenced by using a fertilizer. He selects 90 plants and randomly divides them into three groups of 30 plants each. He applies a biological fertilizer to the first group, a chemical fertilizer to the second group and no fertilizer at all to the third group. After a month he weighs all plants, resulting in parsley.sav. Can we conclude from these data that fertilizer affects weight? We'll open the data file by running the syntax below.

*1. Set default directory.

*2. Open data.

get file 'parsley.sav'.

## 1. Quick Data Check

We first want to get an idea of what our data basically look like. A nice option for the data at hand is a running a histogram of `weight` for each of the three groups separately. The screenshot below walks you through doing so.

Following these steps results in the syntax below. We'll run it and have a quick look at the figures we'll obtain.

* Run split histograms.

GRAPH
/HISTOGRAM=weight
/PANEL COLVAR=fertilizer COLOP=CROSS.

We don't see any very large or very small weights. The shapes of the frequency distributions are unremarkable. Since we don't see anything unexpected in the data, we can proceed our analysis with confidence.

## 2. Assumptions One-Way ANOVA

Results from statistical procedures can only be taken seriously insofar as relevant assumptions are met. For a One-Way ANOVA, these are

1. independent and identically distributed variables (or, less precisely, “independent observations”);
2. homoscedasticity: the dependent variable has the same variance within each population;
3. normality: the dependent variable is normally distributed within each population;

The first assumption is beyond the scope of this tutorial. For now, we'll assume it's at least reasonably met.
Homoscedasticity not holding is less serious insofar as the sample sizes are more equal. Since our example data holds three equally sized groups, there's no reason for concern here.
Violation of the normality assumption hardly affects test results for reasonable sample sizes (say, all N > 30). The latter condition roughly holds for our data. On top of that, the histograms we saw earlier looked reasonably normally distributed too. We thus consider this assumption satisfied.
If assumptions 2 and 3 seem seriously violated, consider a Kruskal-Wallis test instead of ANOVA.

## 3. Running SPSS One-Way ANOVA

We'll now run the actual One-Way ANOVA test. The screenshot below walks you through the steps.

Under Options Statistics we'll select Descriptive.
Clicking results in the syntax below.

*Run One-Way ANOVA.

ONEWAY weight BY fertilizer
/STATISTICS DESCRIPTIVES
/MISSING ANALYSIS.

## 4. SPSS One-Way ANOVA Output

After running the syntax, we'll first inspect the Descriptives table.
“N” in the first column refers to the number of cases used for calculating the descriptive statistics. These numbers being equal to our sample sizes tells us that there are no missing values on the dependent variable.
The mean weights are the core of our output. After all, our main research question is whether these differ for different fertilizers. On average, parsley plants weigh some 51 grams if no fertilizer was used. Biological fertilizer results in an average weight of some 54 grams whereas chemical fertilizer does best with a mean weight of 57 grams.

Next, we'll focus on the ANOVA table.
- The degrees of freedom (df) and F statistic are not immediately interesting but we'll need them later on for reporting our results correctly.
The p value (denoted by “Sig.”) is .028. This means that if the population mean weights are exactly equal, we only have a 2.8% chance of finding the differences that we observe in our sample. The null hypothesis is usually rejected if p < .05 so we conclude that the mean weights of the three groups of plants are not equal. The weights of parsley plants are affected by the fertilizer -if any- that's used.

## 5. Reporting a One-Way ANOVA

First and foremost, we'll report our descriptive statistics. The least we report, are the means, standard deviations and numbers of cases these are based on. Regarding the significance test, we report

• the F value;
• df1, the numerator degrees of freedom;
• df2, the denominator degrees of freedom;
• the p value

like so: “our three fertilizer conditions resulted in different mean weights for the parsley plants, F(2,87) = 3.7, p = .028.”

# Let me know what you think!

*Required field. Your comment will show up after approval from a moderator.

# This tutorial has 36 comments

• ### By Femi Keshinro on February 12th, 2017

Can we really say that this Repeated measures ANOVA should be taken as the parametric alternative to the Cochranâ€™s Q Test?

• ### By Ruben Geert van den Berg on September 29th, 2016

Hi Jenielle, thanks for the compliment. Try formulating your research question in more general terms. "Hypertension" is probably just "yes" or "no" so that'll be a dichotomous variable. Likewise, "educational level" is probably an ordinal variable. You'd like to know if they're related so you may try to refute that they're independent.

Under these assumptions, a chi-square independence test seems the most likely option. I'd add to that some CROSSTABS holding the hypertension percentages for each education level, see if they rise, fall or stay constant as education increases.

• ### By Jenielle Brown on September 28th, 2016

Excellent tutorial!.. But I have an unrelated question.. I suck at statistical tests so I just want to know what test is best if I want to determine the prevalence of Hypertension among subjects reporting primary,secondary and tertiary education as their highest educational level.. Thanks :)

• ### By k.s.vembu on May 7th, 2016

It is very useful for management students well explained all procedure and assumption.

• ### By imdad ullah khan on May 6th, 2016

i just want to say that i love you, you really solve my big problem, lot of best wishes for you..