A one-way ANOVA (“analysis of variance”) compares the means of three or more independent groups to determine if there is a statistically significant difference between the corresponding population means.

This tutorial explains how to perform a one-way ANOVA by hand.

**Example: One-Way ANOVA by Hand**

Suppose we want to know whether or not three different exam prep programs lead to different mean scores on a certain exam. To test this, we recruit 30 students to participate in a study and split them into three groups.

The students in each group are randomly assigned to use one of the three exam prep programs for the next three weeks to prepare for an exam. At the end of the three weeks, all of the students take the same exam.

The exam scores for each group are shown below:

Use the following steps to perform a one-way ANOVA by hand to determine if the mean exam score is different between the three groups:

**Step 1: Calculate the group means and the overall mean.**

First, we will calculate the mean for all three groups along with the overall mean:

**Step 2: Calculate SSR.**

Next, we will calculate the regression sum of squares (SSR) using the following formula:

nΣ(X_{j} – X..)^{2}

where:

**n**: the sample size of group j**Σ**: a greek symbol that means “sum”**X**: the mean of group j_{j}**X..**: the overall mean

In our example, we calculate that SSR = 10(83.4-85.8)^{2} + 10(89.3-85.8)^{2} + 10(84.7-85.8)^{2} = **192.2**

**Step 3: Calculate SSE.**

Next, we will calculate the error sum of squares (SSE) using the following formula:

Σ(X_{ij} – X_{j})^{2}

where:

**Σ**: a greek symbol that means “sum”**X**: the i_{ij}^{th}observation in group j**X**: the mean of group j_{j}

In our example, we calculate SSE as follows:

**Group 1: **(85-83.4)^{2} + (86-83.4)^{2 }+** **(88-83.4)^{2 }+** **(75-83.4)^{2 }+** **(78-83.4)^{2 }+** **(94-83.4)^{2 }+** **(98-83.4)^{2 }+ ** **(79-83.4)^{2 }+** **(71-83.4)^{2 }+** **(80-83.4)^{2 }= **640.4**

**Group 2: **(91-89.3)^{2} + (92-89.3)^{2 }+** **(93-89.3)^{2 }+** **(85-89.3)^{2 }+** **(87-89.3)^{2 }+** **(84-89.3)^{2 }+** **(82-89.3)^{2 }+ ** **(88-89.3)^{2 }+** **(95-89.3)^{2 }+** **(96-89.3)^{2 }= **208.1**

**Group 3: **(79-84.7)^{2} + (78-84.7)^{2 }+** **(88-84.7)^{2 }+** **(94-84.7)^{2 }+** **(92-84.7)^{2 }+** **(85-84.7)^{2 }+** **(83-84.7)^{2 }+ ** **(85-84.7)^{2 }+** **(82-84.7)^{2 }+** **(81-84.7)^{2 }= **252.1**

**SSE: **640.4 + 208.1 + 252.1 = **1100.6**

**Step 4: Calculate SST.**

Next, we will calculate the total sum of squares (SST) using the following formula:

SST = SSR + SSE

In our example, SST = 192.2 + 1100.6 = **1292.8**

**Step 5: Fill in the ANOVA table.**

Now that we have SSR, SSE, and SST, we can fill in the ANOVA table:

Source |
Sum of Squares (SS) |
df |
Mean Squares (MS) |
F |
---|---|---|---|---|

Treatment |
192.2 | 2 | 96.1 | 2.358 |

Error |
1100.6 | 27 | 40.8 | |

Total |
1292.8 | 29 |

Here is how we calculated the various numbers in the table:

**df treatment:**k-1 = 3-1 = 2**df error:**n-k = 30-3 = 27**df total:**n-1 = 30-1 = 29**MS treatment:**SST / df treatment = 192.2 / 2 = 96.1**MS error:**SSE / df error = 1100.6 / 27 = 40.8**F:**MS treatment / MS error = 96.1 / 40.8 = 2.358

**Note: **n = total observations, k = number of groups

**Step 6: Interpret the results.**

The F test statistic for this one-way ANOVA is **2.358**. To determine if this is a statistically significant result, we must compare this to the F critical value found in the F distribution table with the following values:

- α (significance level) = 0.05
- DF1 (numerator degrees of freedom) = df treatment = 2
- DF2 (denominator degrees of freedom) = df error = 27

We find that the F critical value is **3.3541**.

Since the F test statistic in the ANOVA table is less than the F critical value in the F distribution table, we fail to reject the null hypothesis. This means we don’t have sufficient evidence to say that there is a statistically significant difference between the mean exam scores of the three groups.

**Bonus Resource:** Use this One-Way ANOVA Calculator to automatically perform a one-way ANOVA for up to five samples.

Thank you Zack, well done. I am going to use your example for a graduate student struggling to understanding the concept of ANOVA….

John Padgett PhD

Very helpful for me to learn as a student

thankyou for the lesson. I’ve learned a lot

what is the IV and the DV in this example?

Thanks Zach. This was very helpful.

Think there is an issue with how you are calculating the F statistic. You say that to calculate MS treatment: SST / df treatment = 192.2 / 2 = 96.1. However you are plugging in 192.2 and not the 1292.8 that you calculated for SST. This effects the final result.

MS treatment: SST / df treatment = 192.2 / 2 = 96.1

Should be:

MS treatment: SSR / df treatment = 192.2 / 2 = 96.1

THANK YOU VERY MUCH. I REALLY UNDRESTOOD THIS STEPWISE EXPLANATION

The question in my mind was solved by your explanation in this section.

I am glad to say thank you!

Good afternoon

I’ve got an assignment regards One way analysis of variance& I’m struggling with it

Please assist me

Wow, this is so much informative. The concepts and steps are clearly explained and it is generally easier to understand

Is the formula for SSR correct? Some sources say it’s not multiplied by n.

NVM, I double-checked with Walpole. It’s the same.

This has been more than resourceful to me , I can’t express my applause by word of mouth

I like this presentation of calculation of O e Way ANOVA by hand or manually.

I can easily teach my students taking up research.

Thank you so much.

I need help with my psych2 class. ANOVA-Quiz. Can you take this 12 question quiz for a fee

how did you come up with that f critical value of 3.3541? Where is that coming from?

This Write up made me remember what I had forgotten, even my lecturer, having done my coursework in 2007.

Thanks, this is good work.

Well simplified for easier understanding of the complex subject.

This was truly amazing. Super easy to follow and super easy to understand and apply to our own data. You really saved my math IA. Thank you so much!

clear and understandable