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.
R², the coefficient of determination, is the share of the variation in an outcome that a model explains, compared with the laziest possible model: always predicting the average.
R2=1−SStotSSres=1−∑(yi−yˉ)2∑(yi−y^i)2
SStot measures how much the outcome varies around its mean; SSres is what's left over in the residuals after the model's predictions. R² = 0 means the model does no better than the mean; R² = 1 means it fits every point exactly. In simple linear regression, R² is the square of Pearson's correlation r.
What R² tells you: how tightly the data cluster around the fitted line or surface, in this dataset. What it doesn't: whether the model is correct, causal, or any good at forecasting. A high R² is not the same thing as a good model:
two metrics that both grow over time (ad spend and orders during a growth year) can give a high R² with no causal link;
adding predictors never lowers R² on the data the model was fitted on, even if they're pure noise, so a stuffed multiple regression looks great and forecasts badly. Use adjusted R² and a holdout sample;
a line can have a high R² and still be the wrong shape, which you only spot in a residual plot.
A low R² isn't automatically bad either. Individual customer behaviour is noisy, so a model of single orders might have R² = 0.15 and still reveal a reliable, valuable effect. For decisions, look at residual plots, out-of-sample error and the confidence intervals of the coefficients, not R² alone.
Ten weeks of CatChow data: weekly ad spend from $200 to $700 and orders from ads between 20 and 48 (mean 34.2).
Total variation: SStot=∑(yi−34.2)2=749.6.
The least-squares line is orders≈8.85+0.0539×spend. Its residuals add up to SSres≈77.5.
R2=1−749.677.5≈1−0.103=0.897≈0.90.
What this supports: the line accounts for about 90% of the week-to-week swings in orders, and each extra $100 of spend goes with about 5.4 more orders.
What it doesn't support:
"A $900 week will bring 57 orders" (8.85+0.0539×900≈57.4). $900 lies outside the $200–$700 range the line was fitted on, and a high R² inside the range says nothing about the shape beyond it.
"Ads cause 90% of our orders." R² describes how well the line fits, not how many orders ads cause. If CatChow tended to spend more during holiday weeks, the season could be doing part of the work.