In statistics, a one-way ANOVA is used to compare the means of three or more independent groups to determine if there is a statistically significant difference between the corresponding population means.
One metric we always calculate when using an ANOVA is the grand mean, which represents the mean value for all observations in the dataset.
It is calculated as:
Grand Mean = Σxi / n
- xi: The ith observation in the dataset
- n: The total number of observations in the dataset
The grand mean is important because it’s used in the formula to calculate the total sum of squares, which is an important value that ends up in the final ANOVA table.
The following example shows how to calculate the grand mean for an ANOVA in practice.
Example: Calculating the Grand Mean in ANOVA
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 a month to prepare for an exam. At the end of the month, all of the students take the same exam.
The exam scores for each group are shown below:
To calculate the grand mean for this dataset, we simply add up all of the observations and then divide by the total number of observations:
Grand Mean: (85 + 86 + 88 + 75 + 78 + 94 + 98 + 79 + 71 + 80 + 91 + 92 + 93 + 85 + 87 + 84 + 82 + 88 + 95 + 96 + 79 + 78 + 88 + 94 + 92 + 85 + 83 + 85 + 82 + 81) / 30 = 85.8.
The grand mean is 85.8. This represents the average exam score for all 30 students.
Note that this value won’t necessarily match the individual group means.
For example, if we calculate the mean for each group of students, we’ll find that none of the group means actually match the grand mean (or “overall” mean):
This grand mean is then used in the formula to calculate the total sum of squares, which is calculated as the sum of the squared deviations between each individual observation and the grand mean:
Total Sum of Squares: (85 – 85.8)2 + (86 – 85.8)2 + (88 – 85.8)2 + . . . + (82 – 85.8)2 + (81 – 85.8)2 = 1292.8.
This value is then eventually used in the final ANOVA table:
|Source||Sum of Squares (SS)||df||Mean Squares (MS)||F|
The good news is that you will rarely have to calculate the grand mean for an ANOVA by hand since most statistical software can do it for you.
However, it’s good to know how the grand mean is calculated and how it’s actually used in the ANOVA table.
The following tutorials explain how to perform a one-way ANOVA in practice: