What does R squared tell you
R², the coefficient of determination, tells you the proportion of variance in the dependent variable that is explained by the independent variables in a regression model. It ranges from 0 to 1, with higher values indicating a larger share of explained variation, though it does not guarantee predictive accuracy or imply causation.
Statistics · Regression
What R² Measures
R², also called the coefficient of determination, quantifies how much of the total variability in the response variable is captured by the regression model. It is defined as the ratio of the regression sum of squares (SSR) to the total sum of squares (SST), i.e., . An R² of 0.80 means that 80 % of the observed variation is explained by the predictors, while the remaining 20 % is due to other factors or random error. The metric is unit‑free, making it easy to compare model fit across different data sets.
Worked example: imagine five students with hours studied (X) and test scores (Y) as follows: (1, 65), (2, 70), (3, 78), (4, 85), (5, 90). The mean of Y is 73.6. Compute SST = Σ(Y‑)² = (65‑73.6)²+(70‑73.6)²+…+(90‑73.6)² = 560.8. Fit a simple linear regression and obtain predicted scores = 60 + 6X, giving SSR = Σ(‑)² = 448.6. Then , indicating that 80 % of the score variation is explained by hours studied, leaving 20 % unexplained.
Key points to remember about R²
- Ranges from 0 to 1 for ordinary least‑squares regression
- Higher values indicate a larger proportion of explained variance
- Does not imply causation or guarantee predictive power
- Can increase simply by adding more predictors, even irrelevant ones
Steps to compute R² from regression output
- 1Calculate the total sum of squares: SST = Σ(‑)²
- 2Calculate the regression sum of squares: SSR = Σ(_i‑)²
- 3Compute R² = SSR / SST
- 4Optionally compute unexplained proportion: 1‑R²
Sample data and resulting R²
| Hours Studied | Test Score |
|---|---|
| 1 | 65 |
| 2 | 70 |
| 3 | 78 |
| 4 | 85 |
| 5 | 90 |
Limitations of R²: a high value can arise from over‑fitting, especially when many predictors are included relative to the sample size. R² does not reflect bias in the predictions, nor does it assess whether residuals meet the assumptions of linear regression. For models with non‑linear relationships or categorical outcomes, adjusted R², AIC, BIC, or cross‑validated error provide more reliable assessments of model quality.
Check yourself
If a regression model has R² = 0.64, what percentage of the total variance in the response variable remains unexplained?
Get this as a lesson built for you
Describe what you are studying and Lernex writes the lesson and the questions around it. Free, and it takes about a minute.
Try itNo account needed to try it.
What people ask next
- How does adjusted R² differ from ordinary R²?
- Can R² ever be negative, and why?Ask
- What is the relationship between R² and the correlation coefficient?
- what is the difference between standard deviation and standard error
- what does a p-value actually mean
- when do you use a t-test instead of a z-test
- why do you divide by n-1 for sample variance
