According to wikipedia, the coefficient of determination is

$$ R^2 = 1 - \sum_i{\frac{(y_i - f_i)^2}{(y_i - \bar{y})^2}} $$

where $y_i$ is the $i^{th}$ sample value, $f_i$ is the model predicted value and $\bar{y}$ is the mean value.

I can imagine a simple case with two sample points where the coefficient of determination will be negative. Basically, the problem comes when the regression line is really bad, predicting the regression line as negative of the correlation. But in the places I've read about it, they say that it's range is [0,1]. Can anyone explain?

enter image description here

  • 1
    $\begingroup$ Note that the wikipedia page doesn't actually say that $R^2$ is always in [0, 1], just that it's in it in a particular type of case. In the "interpretation" section, it clearly says that values <0 and >1 are possible. $\endgroup$
    – naught101
    Apr 21, 2013 at 13:23
  • $\begingroup$ Removed irrelevant tag for coefficient of variation and added R-squared tag. $\endgroup$
    – Nick Cox
    Jan 8, 2018 at 12:19

2 Answers 2


"they say that it's range is [0,1]" and they are wrong as it can indeed be negative although to be significantly negative the model has to be intentionally bad and the max is indeed 1.0.


Negative values of $R^2$ may occur when fitting non-linear functions to data.

In cases where negative values arise, the mean of the data provides a better fit to the outcomes than do the fitted function values, according to this particular criterion.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.