Misconception · Statistics Library

Misconception: a high R-squared means the model will predict accurately on new data

R-squared measures how well a model fits the data it was TRAINED on; it does not measure how well the model will predict on new, unseen data, which is a separate question that only cross-validation or a held-out test set can answer.

Topic indexA reference reading outside the guided chapter sequence

Understand the idea

R-squared answers 'how much of the pattern in THIS data did the model capture?'. That is a useful but limited question: it says nothing directly about how the model will do on a NEW batch of data it has never seen, which is usually the thing you actually care about.

A model with too many predictors relative to its sample size can fit the training data almost perfectly (a very high R-squared) purely by matching random noise in that specific sample, and then perform far worse on new data; this is overfitting, and it is exactly the pattern a high training R-squared alone cannot distinguish from genuine predictive skill.

The only reliable way to know how a model will perform on new data is to actually test it on data it was not fit to: a held-out test set, or better, cross-validation across several such splits. R-squared computed on the training data is not a substitute for this, no matter how high it is.

R-squared measures in-sample fit, like training accuracy: how well the model matches the data it was built on, not how well it will do at out-of-sample prediction on new data. Treating a high in-sample R-squared as proof of predictive power is sometimes called the overfitting fallacy.

Practitioner explanation

R-squared is a strictly IN-SAMPLE fit statistic and is mechanically non-decreasing as predictors are added, regardless of whether they are genuinely predictive, which is exactly the property that makes a high training R-squared uninformative, on its own, about generalization. Adjusted R-squared corrects the in-sample INFLATION from added predictors but remains an in-sample statistic; it still does not measure out-of-sample predictive accuracy.

The gap between training R-squared and cross-validated R-squared IS the diagnostic for overfitting: a small gap indicates the model generalizes about as well as it fits; a large gap (high training R-squared, much lower CV R-squared) is the signature of a model that has partly memorized its training sample's noise rather than its signal.

KernelStats' Cross-Validated Model Comparison reports the cross-validated metric and its standard error specifically as the genuine estimate of predictive performance, distinct from and reported alongside the regression card's in-sample R-squared/adjusted R-squared, so the two questions ('how well does it fit' and 'how well will it predict') are never collapsed into one number.

Worked example

Scenario

A model with 40 predictors fit to 45 rows achieves training R-squared = 0.97.

Result

5-fold cross-validation on the same data gives a mean out-of-sample R-squared of 0.31.

Interpretation

The huge gap between 0.97 (training) and 0.31 (cross-validated) is the signature of overfitting: the model has largely memorized the specific 45 rows rather than learning a pattern that generalizes. The cross-validated figure, not the training R-squared, is the honest estimate of how this model will perform on new data.

Common misconceptions

Misconception

A model with R-squared = 0.95 will predict new data with 95% accuracy.

Correction

R-squared measures fit to the TRAINING data, not predictive accuracy on new data, and the two can diverge sharply for an overfit model. Cross-validated performance, not the training R-squared, estimates how the model will do on new data.

References

  1. NIST/SEMATECH e-Handbook of Statistical Methods, §4.4.3.7 Model validation, NIST/SEMATECH (2012), §4.4.3.7.