Course contentsShow
← Data Science
Lesson 613 of 2,14516. Multiple Linear RegressionFree lesson

The Adjusted R-Squared Formula

Learn how adjusted R-squared penalizes model complexity by accounting for the number of predictors.

The Adjusted R-Squared Formula

What you'll learn: How adjusted R-squared corrects for model complexity by penalizing the addition of predictors that don't meaningfully improve fit.


Why We Need Adjusted R-Squared

You've learned that R-squared can be misleading in multiple regression because it always increases when you add more predictors—even if those predictors add nothing meaningful. Adjusted R-squared solves this by applying a penalty based on the number of predictors in your model.

The Formula

The adjusted R-squared formula is:

R²_adj = 1 - [(1 - R²) × (n - 1) / (n - p - 1)]

Where:

  • R² = the regular R-squared value
  • n = number of observations (data points)
  • p = number of predictors (independent variables)

How It Works

The formula penalizes you for adding predictors by adjusting the ratio (n - 1) / (n - p - 1). As p increases (more predictors), this ratio gets larger, which reduces the adjusted R-squared unless the new predictor genuinely improves the model enough to compensate.

Analogy: Think of it like a cost-benefit analysis. Regular R-squared only counts benefits (explained variance), while adjusted R-squared subtracts costs (model complexity). Only predictors that "pay their way" improve the adjusted value.

Key Behavior

  • Adjusted R-squared can decrease when you add unhelpful predictors
  • It can even be negative for very poor models
  • It's always ≤ regular R-squared
  • The penalty grows as you add more predictors relative to sample size

Key Takeaway: Adjusted R-squared penalizes model complexity by accounting for the number of predictors, making it a better metric than R-squared for comparing models with different numbers of variables.