Sums of squares
In the model with no terms for the blocks or factor, the 'residual sum of squares' is the sum of squared differences of values from the overall mean and is what we call have called the total sum of squares, SSTotal.
Adding a term for the blocks reduces the residual sum of squares by SSBlocks and adding a term for the factor reduces it by a further SSFactor. What is left is the residual sum of squares for the full model, SSResid.
From these definitions,
SSTotal = SSBlocks + SSFactor + SSResid
The block and treatment sums of squares are variation that is explained by the randomised block model whereas the residual sum of squares is unexplained.
Formula for sum of squares explained by blocks
If the block mean for block b is denoted by b, the block sum of squares is:
![]() |
The sum of squares between blocks measures the variability of the block means. |
This summation is over all observations in the data set, so the contribution from each block is repeated for every experimental unit within the block.
Formula for sum of squares explained by the factor
Similarly, if the mean response for factor level g is denoted by g, the sum of squares explained by the factor is:
![]() |
The sum of squares between treatments measures the variability of the treatment means. |
This summation is again over all observations in the data set.
Acupuncture and Codeine for dental pain relief
An anaesthetist conducted an experiment to assess the effects of codeine and acupuncture for relieving dental pain. The experiment used 32 subjects who were grouped into blocks of 4 according to an initial assessment of their tolerance to pain.
The horizontal coloured lines initially show the differences between the treatment mean and overall mean for each observation. Their sum of squares is the treatment sum of squares.
Select Block sum of squares from the pop-up menu. The coloured lines now show the difference between each observation's block mean and the overall mean. Their sum of squares is the block sum of squares.