Coefficient of determination
The better the
linear regression \(f\)
fits the data in comparison to the
average \(\bar{y}\)
, the closer \(R^2\) is to 1.
Squared residuals with respect to
\(\bar{y}\)
Squared residuals with respect to
\(f\)
\(\color{red}{SS_\text{tot}}=\sum_i (y_i - \color{darkgreen}{\bar{y}})^2\)
\(\color{blue}{SS_\text{res}}=\sum_i (y_i - \color{darkorange}{f_i})^2\)