I am trying to understand in what sense, $R^2$ and $R_{adj}^2$ represent the "explained variance." I can't find any similar question that explores the connection in mathematical detail.

My current understanding is that "explained variance" is shorthand for the ratio of the variance of an estimator (e.g. the regression line) to the variance of the sample data. I've tried to lay out my thinking below but I get a contradiction and I don't understand which assumption I'm making is wrong.

Can anyone help me understand the mistake? I would appreciate any insight!

The standard regression model (not necessarily linear) is something like this:


where $\hat{y}$ is an unbiased estimator of $y$. The variance of $y$ is:


Assuming the estimator and error are uncorrelated, the covariance term is zero:


Rearranging in terms of the ratio I have in mind:


For discrete data, each variance term can be written in terms of the sum of squared errors, regressors, or totals:

$$V(\epsilon)=\frac{1}{DF_\epsilon}\sum (y_i-\hat{y}_i)^2=\frac{\text{SSE}}{DF_\epsilon}$$

$$V(y)=\frac{1}{DF_y}\sum (y_i-\bar{y}_i)^2=\frac{\text{SST}}{DF_y}$$

$$V(\hat{y})=\frac{1}{DF_\hat{y}}\sum (\hat{y}_i-\bar{\hat{y}}_i)^2=\frac{\text{SSR}}{DF_\hat{y}}$$

With $\bar{y}_i=\bar{\hat{y}}_i$. Substituting these definitions into the variance equation yields:


The degrees of freedom are related by:

$$DF_y=DF_\hat{y}+DF_\epsilon \rightarrow (n-1)=(k)+(n-k-1)$$

where n is the number of observations and k is the number of parameters. So the variance equation becomes:


where the RHS is the standard definition of ${R_{adj}^2}$.

If the variables ($x$'s) of the estimator $\hat{y}$ are all orthogonal and $\sum y =\sum \hat{y}$ (e.g. by minimizing SSR with respect to a constant parameter in $\hat{y}$) then:


Plugging this into the above yields:


But the LHS and RHS are clearly not equivalent expressions. Shouldn't this work even in an OLS case? Where is the mistake? Is only the RHS a valid expression? Does $R^2$ "explain the variance" only when k=0?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.