In simple linear regression
some sums of squares are as follow
for regression sum of squares (SSR),
for error sum of squares (SSE), and
for total sum of squares (SST), where
is the predicted value using the model and is observed values. Then, the coefficient of determination is defined as
since
where value of is between and . If , all of the data points fall perfectly on the regression line, but if the estimated regression line is perfectly horizontal. In the former case the predictor accounts for all variation in , while in the later it accounts for none.
- John Haubrick, “The Coefficient of Determination, r-squared”, STAT 462 Applied Regression Analysis, Lesson 2, Chapter 2.5, Pennsylvania State University, 2022, url https://online.stat.psu.edu/stat462/node/95/ [20221125].