# How to Perform a One-Way ANOVA by Hand

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Σ(XjX..)2

where:

• n: the sample size of group j
• Σ: a greek symbol that means “sum”
• Xj: the mean of group 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:

Σ(XijXj)2

where:

• Σ: a greek symbol that means “sum”
• Xij: the ith observation in group j
• Xj: the mean of group j

In our example, we calculate SSE as follows:

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

Group 2: (91-89.3)2 + (92-89.3)+ (93-89.3)+ (85-89.3)+ (87-89.3)+ (84-89.3)+ (82-89.3)+  (88-89.3)+ (95-89.3)+ (96-89.3)208.1

Group 3: (79-84.7)2 + (78-84.7)+ (88-84.7)+ (94-84.7)+ (92-84.7)+ (85-84.7)+ (83-84.7)+  (85-84.7)+ (82-84.7)+ (81-84.7)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.

May 29, 2024
May 13, 2024
April 25, 2024

## 21 Replies to “How to Perform a One-Way ANOVA by Hand”

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

2. France Jacob Punay says:

Very helpful for me to learn as a student

thankyou for the lesson. I’ve learned a lot

4. omi says:

what is the IV and the DV in this example?

5. Manish says:

Thanks Zach. This was very helpful.

6. Edwin says:

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.

7. Soenhay says:

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

Should be:

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

8. Lucy says:

THANK YOU VERY MUCH. I REALLY UNDRESTOOD THIS STEPWISE EXPLANATION

9. Birhanu Takele says:

The question in my mind was solved by your explanation in this section.
I am glad to say thank you!

10. Morateng says:

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

11. simon says:

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

12. giga says:

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

13. giga says:

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

14. Acaye Phillips says:

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

15. Rogelio J. Bahian says:

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.

16. Susie Diaz says:

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

17. Alfred Lopez says:

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

18. George Mbega says:

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

19. ROBERT NELSON RWEBANGIRA says:

Well simplified for easier understanding of the complex subject.

20. Ryan says:

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!

21. osogo victor says:

clear and understandable