I am reading this note.

On page 2, it states:

"How much of the variance in the data is explained by a given regression model?"

"Regression interpretation is about the mean of the coefficients; inference is about their variance."

I have read about such statements numerous times, why would we care about "how much of the variance in the data is explained by the given regression model?"... more specifically, why "variance"?

  • $\begingroup$ "[V]ariance" as opposed to what, the standard deviation? What is it that you think we ought to care about in regression? What are your typical goals in building a regression model? $\endgroup$ Commented Jul 21, 2012 at 16:20
  • $\begingroup$ The variance has different units than the quantity being modeled, so I've always found it hard to interpret the "proportion of variance explained by the model". $\endgroup$
    – flies
    Commented Nov 21, 2016 at 23:14

2 Answers 2


why would we care about "how much of the variance in the data is explained by the given regression model?"

To answer this it is useful to think about exactly what it means for a certain percentage of the variance to be explained by the regression model.

Let $Y_{1}, ..., Y_{n}$ be the outcome variable. The usual sample variance of the dependent variable in a regression model is $$ \frac{1}{n-1} \sum_{i=1}^{n} (Y_i - \overline{Y})^2 $$ Now let $\widehat{Y}_i \equiv \widehat{f}({\boldsymbol X}_i)$ be the prediction of $Y_i$ based on a least squares linear regression model with predictor values ${\boldsymbol X}_i$. As proven here, this variance above can be partitioned as:
$$ \frac{1}{n-1} \sum_{i=1}^{n} (Y_i - \overline{Y})^2 = \underbrace{\frac{1}{n-1} \sum_{i=1}^{n} (Y_i - \widehat{Y}_i)^2}_{{\rm residual \ variance}} + \underbrace{\frac{1}{n-1} \sum_{i=1}^{n} (\widehat{Y}_i - \overline{Y})^2}_{{\rm explained \ variance}} $$

In least squares regression, the average of the predicted values is $\overline{Y}$, therefore the total variance is equal to the averaged squared difference between the observed and the predicted values (residual variance) plus the sample variance of the predictions themselves (explained variance), which are only a function of the ${\boldsymbol X}$s. Therefore the "explained" variance may be thought of as the variance in $Y_i$ that is attributable to variation in ${\boldsymbol X}_i$. The proportion of the variance in $Y_i$ that is "explained" (i.e. the proportion of variation in $Y_i$ that is attributable to variation in ${\boldsymbol X}_i$) is sometimes referred to as $R^2$.

Now we use two extreme examples make it clear why this variance decomposition is important:

  • (1) The predictors have nothing to do with the responses. In that case, the best unbiased predictor (in the least squares sense) for $Y_i$ is $\widehat{Y}_i = \overline{Y}$. Therefore the total variance in $Y_i$ is just equal to the residual variance and is unrelated to the variance in the predictors ${\boldsymbol X}_i$.

  • (2) The predictors are perfectly linearly related to the predictors. In that case, the predictions are exactly correct and $\widehat{Y}_i = Y_i$. Therefore there is no residual variance and all of the variance in the outcome is the variance in the predictions themselves, which are only a function of the predictors. Therefore all of the variance in the outcome is simply due to variance in the predictors ${\boldsymbol X}_i$.

Situations with real data will often lie between the two extremes, as will the proportion of variance that can be attributed to these two sources. The more "explained variance" there is - i.e. the more of the variation in $Y_i$ that is due to variation in ${\boldsymbol X}_i$ - the better the predictions $\widehat{Y}_{i}$ are performing (i.e. the smaller the "residual variance" is), which is another way of saying that the least squares model fits well.

  • $\begingroup$ This is like my answer but perhaps a little bit better explained. Also I see a possible critque that could have been mention is that I should have written the variation relative to the mean of Y. $\endgroup$ Commented Jul 7, 2012 at 5:32
  • 1
    $\begingroup$ @MichaelChernick, yes but in least squares regression (which I think the OP is talking about based on the linked slides), the mean of the predicted values equals the mean of the $Y$s, so you can just call it the sample variance of the predictions. $\endgroup$
    – Macro
    Commented Jul 7, 2012 at 5:34
  • $\begingroup$ I made the edit to my answer because Yb is needed for the variance decomposition to work properly. $\endgroup$ Commented Jul 7, 2012 at 5:40
  • $\begingroup$ Yes it was clear to me that she was referring to least squares regression. Still a lot of what you wrote is just repeating what I said slightly differently. I still gave you a +1. $\endgroup$ Commented Jul 7, 2012 at 5:47
  • 1
    $\begingroup$ Macro, my point was that this decomposition occurs only if $\langle \mathbf y - \hat {\mathbf y}, \hat{\mathbf{y}} - \bar{y} \mathbf{1} \rangle = 0$ and so the "regression" inherently involves an orthogonal projection onto a space containing the constant vector. Note that we can easily "break" this decomposition by simply removing the constant vector from our model, which seems in conflict with your most recent comment. $\endgroup$
    – cardinal
    Commented Jul 7, 2012 at 14:29

I can't run with the big dogs of statistics who have answered before me, and perhaps my thinking is naive, but I look at it this way...

Imagine you're in a car and you're going down the road and turning the wheel left and right and pressing the gas pedal and the brakes frantically. Yet the car is moving along smoothly, unaffected by your actions. You'd immediately suspect that you weren't in a real car, and perhaps if we looked closely we'd determine that you're on a ride in Disney World. (If you were in a real car, you would be in mortal danger, but let's not go there.)

On the other hand, if you were driving down the road in a car and turning the wheel just slightly left or right immediately resulted in the car moving, taping the brakes resulted in a strong deceleration, while pressing the gas pedal threw you back into the seat. You might suspect that you were in a high-performance sports car.

In general, you probably experience something between those two extremes. The degree to which your inputs (steering, brakes, gas) directly affect the car's motion gives you a clue as to the quality of the car. That is, the more of your car's variance in motion that is related to your actions the better the car, and the more that the car moves independently of your control the worse the car is.

In a similar manner, you're talking about creating a model for some data (let's call this data $y$), based on some other sets of data (let's call them $x_1, x_2, ..., x_i$). If $y$ doesn't vary, it's like a car that's not moving and there's really no point in discussing if the car (model) works well or not, so we'll assume $y$ does vary.

Just like the car, a good-quality model will have a good relationship between the results $y$ varying and the inputs $x_i$ varying. Unlike a car, the $x_i$ do not necessarily cause $y$ to change, but if the model is going to be useful the $x_i$ need to change in a close relationship to $y$. In other words, the $x_i$ explain much of the variance in $y$.

P.S. I wasn't able to come up with a Winnie The Pooh analogy, but I tried.

P.P.S. [EDIT:] Note that I'm addressing this particular question. Don't be confused into thinking that if you account for 100% of the variance your model will perform wonderfully. You also need to think about over-fitting, where your model is so flexible that it fits the training data very closely -- including its random quirks and oddities. To use the analogy, you want a car that has good steering and brakes, but you want it to work well out on the road, not just in the test track you're using.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.