# Complete Guide: How to Interpret ANOVA Results in SAS

one-way ANOVA is used to determine whether or not there is a statistically significant difference between the means of three or more independent groups.

The following example shows how to interpret the results of a one-way ANOVA in SAS.

## Example: Interpret ANOVA Results in SAS

Suppose a researcher recruits 30 students to participate in a study. The students are randomly assigned to use one of three studying methods to prepare for an exam.

The exam results for each student are shown below:

We can use the following code to create this dataset in SAS:

```/*create dataset*/
data my_data;
input Method \$ Score;
datalines;
A 78
A 81
A 82
A 82
A 85
A 88
A 88
A 90
B 81
B 83
B 83
B 85
B 86
B 88
B 90
B 91
C 84
C 88
C 88
C 89
C 90
C 93
C 95
C 98
;
run;
```

Next, we’ll use proc ANOVA to perform the one-way ANOVA:

```/*perform one-way ANOVA*/
proc ANOVA data=my_data;
class Method;
model Score = Method;
means Method / tukey cldiff;
run;```

Note: We used the means statement along with the tukey and cldiff options to specify that a Tukey post-hoc test should be performed (with confidence intervals) if the overall p-value of the one-way ANOVA is statistically significant.

First, we’ll look at the ANOVA table in the output:

Here is how to interpret every value in the output:

DF Model: The degrees of freedom for the variable method. This is calculated as #groups -1. In this case, there were 3 different studying methods, so this value is: 3-1 = 2.

DF Error: The degrees of freedom for the residuals. This is calculated as #total observations – # groups. In this case, there were 24 observations and 3 groups, so this value is: 24-3 = 21.

Corrected Total: The sum of DF Model and DF Error. This value is 2 + 21 = 23.

Sum of Squares Model: The sum of squares associated with the variable method. This value is 175.583.

Sum of Squares Error: The sum of squares associated with the residuals or “errors.” This value is 350.25.

Sum of Squares Corrected Total: The sum of SS Model and SS Error. This value is 525.833.

Mean Square Model: The mean sum of squares associated with method. This is calculated as SS Model / DF Model, which is175.583 / 2 = 87.79.

Mean Square Error: The mean sum of squares associated with the residuals. This is calculated as SS Error / DF Error, which is 350.25 / 21 = 16.68.

F Value: The overall F-statistic of the ANOVA model. This is calculated as Mean Square Model / Mean Square Error, which is 87.79 / 16.68 = 5.26.

Pr >F: The p-value associated with the F-statistic with numerator df = 2 and denominator df = 21. In this case, the p-value is 0.0140.

The most important value in the entire output is the p-value because this tells us whether there is a significant difference in the mean values between the three groups.

Recall that a one-way ANOVA uses the following null and alternative hypotheses:

• H0 (null hypothesis): All group means are equal.
• HA (alternative hypothesis): At least one group mean is different from the rest.

Since the p-value in our ANOVA table (0.0140) is less than .05, we reject the null hypothesis.

This means we have sufficient evidence to say that the mean exam score is not equal between the three studying methods.

To determine exactly which group means are different, we must refer to the final table in the output that shows the results of the Tukey post-hoc tests:

To tell which group means are different, we must look at which pairwise comparisons have stars (***) next to them.

From the table we can see there is a statistically significant difference in mean exam scores between group A and group C.

Specifically, the mean difference in exam scores between group C and group A is 6.375.

The 95% confidence interval for the mean difference is [1.228, 11.522].

There are no statistically significant differences between any other group means.