Partitioning Sums of Squares
This section discusses the sums of squares, including partitioning sum of squares into sums of squares predicted and sum of squares error.
Partitioning the Sums of Squares
- Compute the sum of squares
- Convert raw scores to deviation scores
- Compute predicted scores from a regression equation
- Partition sum of squares into sum of squares predicted and sum of squares error
- Define in terms of sum of squares explained and sum of squares
One useful aspect of regression is that it can divide the variation ininto two parts: the variation of the predicted scores and the variation of the errors of prediction. The variation of is called the sum of squares and is defined as the sum of the squared deviations of from the mean of . In the population, the formula is
whereis the sum of squares , is an individual value of , and is the mean of . A simple example is given in Table 1. The mean of is 2.06 and is the sum of the values in the third column and is equal to 4.597.
Table 1. Example of.
When computed in a sample,ou should use the sample mean, , in place of the population mean:
It is sometimes convenient to use formulas that
scores rather than raw
scores. Deviation scores are simply deviations from the mean.
By convention, small letters rather than capitals are used for
deviation scores. Therefore the score
Table 2. Example ofusing Deviation Scores.
The data in Table 3 are reproduced from the introductory
section. The column
Table 3. Example data. The last row contains column sums.
The fourth column, , is simply the square of the column. The column ' contains the predicted values of . In the introductory section, it was shown that the equation for the regression line for these data is
The values of' were computed according to this equation. The column ' contains deviations of from the mean of and is the square of this column. The next-to-last column, , contains the actual scores (Y) minus the predicted scores (Y'). The last column contains the squares of these errors of prediction.
We are now in a position to see how theis partitioned. Recall that is the sum of the squared deviations from the mean. It is therefore the sum of the column and is equal to 4.597. can be partitioned into two parts: the sum of squares predicted ( ) and the sum of squares error ( ). The sum of squares predicted is the sum of the squared deviations of the predicted scores from the mean predicted score. In other words, it is the sum of the column and is equal to 1.806. The sum of squares error is the sum of the squared errors of prediction. It is therefore the sum of the column and is equal to 2.791. This can be summed up as:
4.597 = 1.806 + 2.791
There are several other notable features about Table 3. First, notice that the sum ofand the sum of are both zero. This will always be the case because these variables were created by subtracting their respective means from each value. Also, notice that the mean of is 0. This indicates that although some values are higher than their respective predicted values and some are lower, the average difference is zero.
The SSY is the total variation, the SSY' is the variation explained, and the SSE is the variation unexplained. Therefore, the proportion of variation explained can be computed as:
Similarly, the proportion not explained is:
There is an important relationship between the proportion of variation explained and Pearson's correlation:is the proportion of variation explained. Therefore, if , then, naturally, the proportion of variation explained is 1; if , then the proportion explained is 0. One last example: for , the proportion of variation explained is 0.16.
Since the variance is computed by dividing the variation by(for a population) or (for a sample), the relationships spelled out above in terms of variation also hold for variance. For example,
where the first term is the variance total, the second term is the variance of, and the last term is the variance of the errors of prediction . Similarly, is the proportion of variance explained as well as the proportion of variation explained].
It is often convenient to summarize the partitioning of the data in a table. The degrees
of freedom column (
Table 4. Summary Table for Example Data.
|Source||Sum of Squares||Mean Square|
Source: David M. Lane , https://onlinestatbook.com/2/regression/partitioning.html
This work is in the Public Domain.