Skip to content
Log in
← Glossary

coefficient of determination (R²)

The share of the outcome's variance explained by the model, from 0 to 1.

Example

Common mistakes

  • "High R² = good model." A high R² can come from a shared trend, from overfitting or from a fit that's only good inside the data range. Check residuals and out-of-sample error.
  • Stuffing the model to push R² up. Every extra predictor raises R² on the training data. Compare models by adjusted R² or by error on a holdout sample.
  • Comparing R² across different outcomes or datasets. An R² of 0.6 for daily orders and 0.3 for individual basket size aren't comparable; the outcomes have different amounts of natural noise.
  • Throwing out a model because R² is low. For noisy individual-level behaviour, a modest R² can sit alongside a precise, valuable coefficient.
  • Reading R² as causation or as "share of results caused by X". It measures fit, not cause.

Learn it in the course

  • Simple linear regression · Simple linear regression: predicting one metric from another with a line of best fit, and checking the fit with R squared.