Course contentsShow
← Mathematics
Lesson 3065 of 3,12160. Statistics — ModelingFree lesson

The Coefficient of Determination (R²)

Learn how R² measures the proportion of variance in the response explained by the predictor.

The Coefficient of Determination (R²)

What you'll learn: How R² quantifies the proportion of variance in the response variable that your regression model explains.

What Is R²?

After fitting a simple linear regression, you naturally ask: How well does my predictor actually explain the response? The coefficient of determination, denoted R², answers precisely this question.

R² measures the proportion of total variance in the response variable (y) that is "accounted for" by the linear relationship with the predictor (x). It ranges from 0 to 1:

  • R² = 1: The regression line perfectly predicts every observation. All variance is explained.
  • R² = 0: The predictor explains none of the variance; the regression line does no better than simply using the mean of y.
  • R² = 0.75: The model explains 75% of the variance in y; 25% remains unexplained (residual variance).

Intuition

Think of the total variability in your data as a budget of "spread." Without any predictor, all that spread is just noise around the mean. When you add a predictor and fit a regression line, some of that spread gets "explained" by the relationship. R² tells you what fraction of the original spread your model has successfully captured.

The Formula

Mathematically:

R² = 1 − (Sum of Squared Residuals) / (Total Sum of Squares)

  • Sum of Squared Residuals (SSR): Variability left over after fitting the model.
  • Total Sum of Squares (SST): Total variability in y around its mean.

So R² = 1 − (unexplained variance) / (total variance).

Key Takeaway: R² quantifies how much of the response's variance is explained by the predictor, giving you a single number (0 to 1) to judge model fit.