0:00 / 0:00

Coefficient of Determination (R Squared)

The coefficient of determination (also known as R Squared) r2\colorFour {r^2} measures how close the data are to the regression model. Loosely, it is also called the "goodness of fit" as it measures how well the regression model fits the data points in a scatterplot.

Example: A low r2r^2 (poor fit):

PAGE BREAK
Example: A high r2r^2 (good fit):

Watch Out!
r2r^2 measures how close the data are to the fitted regression model but sometimes a linear model is not the best model! If r2r^2 is low as a linear model, it just means a linear model is a poor fit. Other models include quadratic, cubic model, and multiple regression model.

Portions of information contained in this publication/book are printed with permission of Minitab, LLC. All such material remains the exclusive property and copyright of Minitab, LLC. All rights reserved.
PAGE BREAK

Interpretation of R Squared


r2r^2= coefficient of determination, where 0r210\le r^2\le1
r2=(SSxy)2(SSxx)(SSyy)\boxed{r^2=\frac{(SS_{xy})^2}{\left(SS_{xx}\right)(SS_{yy})}}


r2 =r^{2\ }= “____% variation of yy is explained by xx”, where
x: predictor/explanatory/independent variable
y: response/dependent variable



Example

If r2=0.78r^2=0.78, that means the explanatory variable explains 78% of the variation in the response variable.
  • Where is the remaining 22%? It is left unexplained by this explanatory variable and may be attributed by random errors or could be explained by other explanatory variables.



Watch Out!
r2r^2 (coefficient of determination) may be used to measures fit for any type of regression model - not just linear.
rr (correlation) may be used to measure the direction and strength of the association between X and Y in linear models only!

Watch Out!
r2r^2 is aways positive unless it is 0, and it cannot be negative. Correlation rr could be negative, positive, or 0. If r=0r=0 then r2=0r^2=0.



Portions of information contained in this publication/book are printed with permission of Minitab, LLC. All such material remains the exclusive property and copyright of Minitab, LLC. All rights reserved.

0:00 / 0:00

Assessing Goodness of Fit

The coefficient of determination r2\colorFour{r^2} could be used to assess "goodness of fit" because it measures of how close the data are to the fitted regression model.
  • Keep in mind that not all regression models are linear.
  • If a linear model is unable to fit the specific curve that these data follow, then we will obtain a low r2\colorFive{r^2} value.

Linear vs. Quadratic

Notice that we are not properly estimating demand, given the data set.

A quadratic model provides a better fit:

We notice two things when we use a quadratic regression function:

  1. The r2r^2 drastically improved. This means we have a better estimate of demand at all price levels (within the data range).
  2. When the price is high, its effect of price on quantity is strong but its effect is diminishing as it does down. (The effect of price on quantity is constant if linear.)
PAGE BREAK

More on Coefficient of Determination

Does a low r2r^2 mean the regression model is bad?

Not always! One explanatory variable in a regression model can only explain so much of the response variable. It doesn't mean that one explanatory variable is insignificant.

You can add more explanatory variables to the regression model, entailing a multiple regression model, which can increase r2r^2. (Imagine one hockey player trying his best alone in the rink - it doesn't mean he's a bad player; he just needs more help.)


Wize Concept
Inference for Linear Regression and Multiple Regression are typically topics covered in higher level statistics courses.


Does a high r2r^2 mean the regression model is good?

Alas, not always. You still need to look at its residual plot to check for unwanted patterns like unequal spread, skewness, etc. Your regression model should be unbiased.


Wize Concept
See : Residual Plots

Practice: Coefficient of Determination (R Squared)

True or false?
(i) If the coefficient of determination r2r^2 is very strong, then xx and yy have a linear relationship with good fit.
Extra Practice