Calculating the r-squared
The r-squared is the coefficient of determination that was calculated earlier. It tells us the factor of separation between the Y value (miles per gallon) of the dataset (the blue dots) and Y' (miles per gallon calculated by the model – the gray line) from the average of Y (the red line) as an origin line. Consult the chart to understand this relationship.
This is the explained variation (SSR) divided by the total variation (SST):
Figure 9.26 – SST, SSR, and SSE
The coefficient of determination
The coefficient of determination is one of the indicators of the relationship strength between the variables:
r2 = Explained Variation Regression Sum of Squares SSR divided by Total Variation Sum of Squares SST
For our example, we calculated these variations:
Figure 9.27 – Calculations for SSE and SST – the sum of the SS errors is 227.18 and the sum for the SS total is 837...