| x | 2 | 3 | 4 | 5 |
|---|---|---|---|---|
| y | 8 | 9 | 7 | 16 |
Another way to reach the same $r^2$ is to work out how much of the variation the regression line actually explains, rather than starting from what it fails to explain.
Step 1: Find the total variation in y (SST). The y values are 8, 9, 7 and 16, with mean $\bar{y} = 40/4 = 10$. Squaring each deviation from this mean and adding them gives $SST = 4 + 1 + 9 + 36 = 50$.
Step 2: Find the explained variation (SSR) instead of starting from the error. The regression splits total variation into two parts: the part the line explains (SSR) and the part it misses (SSE, the residual sum of squares), so $SST = SSR + SSE$. Since $SSE = 25.8$: $SSR = SST - SSE = 50 - 25.8 = 24.2$.
Step 3: The coefficient of determination is the explained share of the total variation. $r^2 = SSR / SST = 24.2 / 50 = 0.484$.
Both routes must agree, because $1 - SSE/SST$ and $SSR/SST$ are just two ways of writing the same split of total variation into explained and unexplained parts.
Let's summarize:
So the coefficient of determination is 0.48.