Let’s consider the following regression model:
y = B0 + B1*x
- B0 — represents the intercept
- B1 — represents the coefficient
- x — represents the independent variable
- y — represents the output or the dependent variable
Mathematically, R-squared is calculated by dividing the sum of squares of residuals (SSres) by total sum of squares (SStot) and then subtract it from 1. In this case, SStot measures total variation. SSreg measures explained variation and SSres measures unexplained variation.
As $SSres + SSreg = SStot, R² = Explained variation / Total Variation$
Adjusted R-Squared can be calculated mathematically in terms of the sum of squares. The only difference between R-square and the Adjusted R-square equation is the degree of freedom.
In the above equation, dft is the degrees of freedom n– 1 of the estimate of the population variance of the dependent variable, and dfe is the degrees of freedom n – p – 1 of the estimate of the underlying population error variance.
Adjusted R-squared value can be calculated based on value of r-squared, number of independent variables (predictors), total sample size.
What happens when we introduce more variables to a linear regression model in terms of $R^2$ and adjusted $R^2$?
Will they increase, decrease or remain constant?