# Multiple Regression and $R^2$

I’m estimating a bivariate OLS model and I want to deepen my understanding of $R^2$. Therefore I’m trying to visualize it by plotting my predicted values vs. actual values of the DV.

I expected the correlation (i.e., $R^2$) of a linear trend line through these points would be equal to the $R^2$ for the overall bivariate model.

However that’s not happening. Does $R^2$ measure the ability of the model (predicted values in this case) to explain the variation in the observed values?

EDIT:

I’ve created a model to help with this. The model uses the price of oil to predict raw material cost. It’s very a very biased model, but I don’t think that should matter for the purposes of understanding R^2 here. Am I wrong?

This is where my confusion is:

EDIT 2:

Output from Regression:

• The squared correlation between observed and predicted responses should equal the R-squared of the regression. – Michael M Oct 17 '16 at 4:04
• Can you show the output from the regression as well? – mdewey Oct 17 '16 at 16:49
• Here is the data: docs.google.com/spreadsheets/d/… – Paul Oct 17 '16 at 20:10
• Something wrong with your regression output with N/A intercept figures. When I plugged your data to excel the R2 matched 24.7. I think you chose the "constant is 0" option, where you shouldn't have. – Cagdas Ozgenc Oct 17 '16 at 20:19
• Cagdas - That did it, and lesson learned. THANK YOU!! – Paul Oct 17 '16 at 20:40

Yes, I would say that something appears "off" about your the output, which does indicate that R^2 for the model is around .9, while the graphical output indicates that it is .248.

The graph itself is consistent with the value (e.g. the scatterplot looks like a correlation of SQRT(.25), or approx .5).

Are you sure they come from the same data set?

• Here is the data that is throwing the high r squared: docs.google.com/spreadsheets/d/… – Paul Oct 17 '16 at 19:57
• Yeah, the correlation in this data is r = .49, r^2 = .25... Not sure what your output is indicating... You also have pretty heteroscedastic data which if this were a "real" regression analysis would require some thought. – Marina_ANOVA Oct 17 '16 at 20:45
• Hi Marina - it turns out the model automatically was setting the constant at zero, which is inappropriate here. When I removed the constant, the world made sense again. Thanks so much for your time! – Paul Oct 17 '16 at 21:01

You are on the right path - the $R^2$ measures the proportion of the variance in the dependent variable that is predictable from the independent variable.
It basically tells you how good your observed values are reproduced by the model, based on the proportion of total variation of outcomes explained by the model.
It is $1-$ the fraction of the variance left unexplained (so fraction of "variance explained" by your model). hth.

• Thanks for the response! See my EDIT, and please let me know if you have any additional thoughts. Regards, Paul. – Paul Oct 17 '16 at 16:34
• Ok - I see Marina and Cagdas got you to the end of this. I guess the moral of the story is to always keep in mind the intercept term of regression. – davidski Oct 24 '16 at 9:29