Glossary · Regression
R-Squared
Also called: R² · coefficient of determination
The share of the variation in an outcome that a regression model explains, from 0 to 1.
Definition
R-squared compares the model's squared prediction errors with the total variation of the outcome around its mean; a value of 0.70 means the predictors account for 70% of that variation. It never decreases when predictors are added, so adjusted R-squared is preferred for comparing models of different size. A high R-squared does not mean the coefficients are causal or the model is correctly specified, and a low R-squared can still go with precise, useful coefficients in noisy settings such as individual customer behavior. In time series with trends, very high R-squared values are common and can be misleading.
Formula
TeX source
R^2 = 1 - \frac{\sum_i (y_i - \hat{y}_i)^2}{\sum_i (y_i - \bar{y})^2}Worked example
Try it in a tool
Related terms
- Adjusted R-Squared: R-squared corrected for the number of predictors, so adding a variable that explains little lowers it instead of always raising it.
- Linear Regression: A statistical method that models an outcome as a linear combination of predictors, choosing coefficients that minimize the sum of squared errors.
- Correlation Coefficient: A number from −1 to +1 measuring the strength and direction of the linear relationship between two variables.
- Overfitting: When a model learns the noise and quirks of its training data so closely that it performs poorly on new data.