\( R^2 \) & Model Fit
Understand how the coefficient of determination measures the proportion of variance explained by a regression model: from interpretation to common pitfalls.
What Is \( R^2 \)?
The coefficient of determination, \( R^2 \), tells us the proportion of variance in the response variable \( y \) that is explained by the predictor variable(s) \( x \) in a regression model.
Three Types of Variation
\( \text{SST} = \sum (y_i - \bar{y})^2 \)
\( \text{SSR} = \sum (\hat{y}_i - \bar{y})^2 \)
\( \text{SSE} = \sum (y_i - \hat{y}_i)^2 \)
Visualizing Variation
For any point, the total deviation from the mean is split into two parts: the deviation explained by the model, and the unexplained residual. \( R^2 \) measures the proportion of total variance that is explained variance.
The \( R^2 \) Formula
Both forms are algebraically equivalent because \( \text{SST} = \text{SSR} + \text{SSE} \). Form 2 is more commonly used in software output.
\( R^2 \) vs. the Correlation \( r \)
| \( R^2 \) | \( r \) | |
|---|---|---|
| Full name | Coefficient of determination | Pearson correlation coefficient |
| Range | \( 0 \leq R^2 \leq 1 \) | \( -1 \leq r \leq 1 \) |
| Sign | Always non-negative | Positive or negative |
| Interpretation | % of variance explained | Strength & direction of linear association |
| Relationship | In simple linear regression: \( R^2 = r^2 \) | |
Interpreting \( R^2 \) Values
There is no universal "good" value for \( R^2 \): it depends on the field. In controlled lab experiments, \( R^2 > 0.90 \) is expected. In social sciences, \( R^2 \approx 0.30 \) may be excellent.
High vs. Low \( R^2 \)
When \( R^2 \) is high, points cluster tightly around the regression line. When \( R^2 \) is low, points scatter widely: the line explains little of the variability.
\( R^2 \) Does Not Imply Causation
A high \( R^2 \) means the model describes the data well, but it does not prove that changes in \( x \) cause changes in \( y \). Two variables can be strongly correlated due to lurking variables or coincidence.
How to Compute \( R^2 \)
Example 1: Simple Computation
A dataset has \( \text{SST} = 200 \) and \( \text{SSE} = 50 \). Find \( R^2 \) and interpret.
Example 2: From Correlation to \( R^2 \)
A simple linear regression of hours of video games played per week (\( x \)) vs. GPA (\( y \)) yields a correlation of \( r = -0.80 \). Find \( R^2 \) and interpret.
Example 3: Comparing Two Models
Two regression models are fit to predict house price. Model A uses only square footage; Model B adds number of bedrooms. Which fits better?
| Model A | Model B | |
|---|---|---|
| Predictors | Sq. footage | Sq. footage + bedrooms |
| \( R^2 \) | 0.72 | 0.78 |
| Variance explained | 72% | 78% |
Adjusted \( R^2 \): The Penalty Term
Common Mistakes
Summary: Key Concepts
| Concept | Key Point |
|---|---|
| \( R^2 \) | Proportion of variance in \( y \) explained by the model; range \( [0, 1] \) |
| Formula | \( R^2 = 1 - \frac{\text{SSE}}{\text{SST}} \) |
| \( R^2 \) vs. \( r \) | In simple regression: \( R^2 = r^2 \); \( r \) has sign, \( R^2 \) does not |
| Adjusted \( R^2 \) | Penalizes extra predictors; use for model comparison |
| Limitations | Does not prove causation; inflated by overfitting; context-dependent |
Question 1 of 5
A regression model has \( \text{SST} = 400 \) and \( \text{SSE} = 100 \). What is \( R^2 \)?
Question 2 of 5
If the Pearson correlation between hours of exercise and resting heart rate is \( r = -0.90 \), what is \( R^2 \)?
Question 3 of 5
A researcher reports \( R^2 = 0.64 \) for a model predicting test scores from study time. Which statement is the best interpretation?
Question 4 of 5
Model A has \( R^2 = 0.82 \) with 2 predictors. Model B has \( R^2 = 0.83 \) with 8 predictors. Which should you prefer, and why?
Question 5 of 5
A scatterplot shows a clear U-shaped curve, yet a simple linear regression yields \( R^2 = 0.02 \). What is the best conclusion?