The coefficient of determination, written R², tells how well a statistical model explains the variation in a response variable. In simple linear regression, it measures how closely the data points fit around the regression line. A larger R² means the model accounts for more of the observed spread in the data.
This makes R² useful for judging whether a linear model gives a strong or weak summary of a relationship.
R² is based on comparing the total variation in the data to the variation left over after fitting the model. If the predictions are close to the actual values, the unexplained variation is small and R² is high. If the predictions are not much better than using the mean, R² is low.
For simple linear regression with one explanatory variable, R² is equal to r², where r is the correlation coefficient.
Key Facts
- R² = explained variation / total variation
- R² = 1 - SSE / SST, where SSE is the sum of squared residuals and SST is the total sum of squares
- 0 ≤ R² ≤ 1 for standard linear regression with an intercept
- R² = 0 means the model explains none of the variation in the response beyond the mean
- R² = 1 means the model explains all the variation and every data point lies on the regression line
- For simple linear regression, R² = r², so r = 0.80 gives R² = 0.64
Vocabulary
- Coefficient of determination
- The statistic R² that measures the proportion of variation in the response variable explained by a model.
- Regression line
- The best fit line used to predict the response variable from the explanatory variable in a linear model.
- Residual
- The difference between an observed value and the value predicted by the model.
- Total variation
- The overall spread of the response values around their mean before using a model.
- Correlation coefficient
- The statistic r that measures the direction and strength of a linear relationship between two quantitative variables.
Common Mistakes to Avoid
- Saying R² is the percent of data points on the regression line. R² describes variation explained, not the fraction of points that lie exactly on the line.
- Using R² to decide whether the slope is positive or negative. R² is never negative and does not show direction, so you need the slope or r to know the direction.
- Assuming a high R² proves causation. A strong fit can occur because of lurking variables, coincidence, or common trends, so the study design matters.
- Comparing R² values without checking the model type and data context. A higher R² is not automatically better if the model is inappropriate, overfit, or based on a different response variable.
Practice Questions
- 1 A regression model has SST = 250 and SSE = 40. Calculate R² and interpret the result as a percentage of variation explained.
- 2 In a simple linear regression, the correlation coefficient is r = -0.70. Find R² and explain what the negative sign of r does and does not tell you.
- 3 Two scatterplots both have R² = 0.81. One shows a clear curved pattern around the regression line, while the other shows random scatter around the line. Which model is more appropriate for linear regression, and why?