INTERPRETATION GUIDE
R-squared vs correlation
Both R² and Pearson’s r describe how closely two variables move together, but they answer slightly different questions. This guide shows a worked example and explains when they diverge.
What each measure means
Pearson’s r is the correlation coefficient. It measures the strength and direction of the linear association between two variables. It ranges from −1 to +1.
R-squared (R²) is usually computed as 1 − SSE/SST for a fit. It reports the proportion of variation in the observed Y values that is explained by the fitted model.
For a simple linear regression with one X, R² equals r²: the square of the Pearson correlation between X and Y. In that narrow case, one is just a transformation of the other.
Worked example
Use the same five students:
| Study hours (X) | Exam score (Y) |
|---|---|
| 1 | 52 |
| 2 | 57 |
| 3 | 65 |
| 4 | 68 |
| 5 | 76 |
From the linear regression worked example:
- Sxx = 10.0
- Syy = 365.20
- Sxy = 59.0
Pearson’s r is:
r = Sxy / √(SxxSyy) = 59.0 / √(10.0 × 365.20) = 59.0 / 60.43 ≈ 0.976
R² for the regression of Y on X is:
R² = 1 − SSE/SST = 1 − 5.10 / 365.20 ≈ 0.986
Notice that 0.976² ≈ 0.953, which is not equal to 0.986 here because of rounding in the displayed intermediate values. With full precision, R² = r² exactly for simple linear regression with an intercept.
When they can differ
- Different questions: r describes association between X and Y; R² describes how well a specific model (such as a regression line) predicts Y.
- Multiple predictors: With more than one predictor, R² is no longer the square of a single correlation.
- Sign: r carries a sign; R² is always non-negative. A negative r can still produce a positive R².
- Non-linear relationships: r only measures linear association. Two variables can have a strong curved relationship and a low r.
Try it
Paste the data into either the Pearson correlation calculator or the linear regression calculator to reproduce the numbers.
Study hours,Exam score
1,52
2,57
3,65
4,68
5,76
Limitations
- A high r or R² does not imply causation.
- Both are dominated by the bulk of the data and can hide problems in small subgroups.
- R² can be negative when predictions are worse than simply predicting the mean.
- Neither measure says whether the relationship is linear, only how well a linear model fits these points.