##### How to compute the sum of squares in one way ANOVA: method 1

Sum of squares computed as sum of squared deviations

Example data:
Group mean 1 = $(23 + 25 + 18) / 3 = 22$ Group mean 2 = $(29 + 19 + 21) / 3 = 23$ Group mean 3 = $(35 + 17) / 2 = 26$ Grand mean = $(23 + 25 + 18 + 29 + 19 + 21 + 35 + 17) / 8 = 23.375$ - For each subject, compute the difference between its score and its group mean. You thus have to compute each of the group means, and compute the difference between each of the scores and the group mean to which that score belongs
- Square all these differences
- Sum the squared differences
Sum of squares between (SSB): *For each subject*, compute the difference between its group mean and the grand mean. The grand mean is the mean of all $N$ scores (just sum all scores and divide by the total sample size $N$)- Square all these differences
- Sum the squared differences
Sum of squares total (SST): - For each subject, compute the difference between its score and the grand mean
- Square all these differences
- Sum the squared differences
If you have computed two of the three sums of squares, you can easily computed the third one by using the fact that SST = SSW + SSB. |

##### How to compute the sum of squares in one way ANOVA: method 2

Sum of squares computed as differences between sums of squares

Example data:
Group mean 1 = $(23 + 25 + 18) / 3 = 22$ Group mean 2 = $(29 + 19 + 21) / 3 = 23$ Group mean 3 = $(35 + 17) / 2 = 26$ Grand mean = $(23 + 25 + 18 + 29 + 19 + 21 + 35 + 17) / 8 = 23.375$ [Y] = - Square each score
- Sum all the squared scores
[A] = - Square each group mean
- Multiply each squared group mean by the number of subjects in that group
- Sum all these products
[T] = - Square the grand mean
- Multiply the squared grand mean by the total sample size
Sum of squares within (SSW) = [Y] - [A] SSW example data = 4635 - 4391 = 244 Sum of squares between (SSB) = [A] - [T] SSB example data = 4391 - 4371.125 = 19.875 Sum of squares total (SST) = [Y] - [T] SST example data = 4635 - 4371.125 = 263.875 If you have computed two of the three sums of squares, you can easily computed the third one by using the fact that SST = SSW + SSB. |