3.21 FAQ-247 Why is R-Square greatly different when intercept is fixed in linear fit?

Last Update: 12/26/2018

Why is R-Square greatly different when intercept is fixed in linear fit?

It is because the R-Square is calculated with equation below:

R^2=\frac{SSR}{TSS}=1-\frac{RSS}{TSS} \,\!

where SSR is the sum of squares due to regression, TSS is the total sum of squares, and RSS is the residual sum of squares. For TSS:

  • TSS=\sum_{i=1}^n(y_i-\overline{y})^2 \,\!, when intercept is not fixed
  • TSS=\sum_{i=1}^n y_i^2 \,\!, when intercept is fixed

Please look at the detailed explanation below why we use uncorrected sum of squares for TSS calculation when intercept is fixed.

When intercept is fixed

When intercept is fixed in linear fit, it follows the relation below:

\sum_{i=1}^n y_i^2 = \sum_{i=1}^n (y_i-f(x_i))^2 + \sum_{i=1}^n (f(x_i))^2

Then TSS and SSR need be redefined, and RSS is unchanged.

TSS = \sum_{i=1}^n y_i^2
SSR = \sum_{i=1}^n (f(x_i))^2

And the coefficient of determination (R-Square) is redefined as follows:

R^2=\frac{SSR}{TSS}=1-\frac{RSS}{TSS}=1-\frac{\displaystyle \sum_{i=1}^n (y_i-f(x_i))^2}{\displaystyle \sum_{i=1}^n y_i^2}


Please refer to Additional Information of R-square chapter for more information.


Keywords:linear fit, R-Square, intercept, fixed