Coefficient of determination
In statistics, the coefficient of determination, denoted R or r and pronounced "R squared", is the proportion of the variation in the dependent variable that is predictable from the independent variable(s).

It is a statistic used in the context of statistical models whose main purpose is either the prediction of future outcomes or the testing of hypotheses, on the basis of other related information. It provides a measure of how well observed outcomes are replicated by the model, based on the proportion of total variation of outcomes explained by the model.

There are several definitions of R that are only sometimes equivalent. One class of such cases includes that of simple linear regression where r is used instead of R. When only an intercept is included, then r is simply the square of the sample correlation coefficient (i.e., r) between the observed outcomes and the observed predictor values. If additional regressors are included, R is the square of the coefficient of multiple correlation. In both such cases, the coefficient of determination normally ranges from 0 to 1.

There are cases where R can yield negative values. This can arise when the predictions that are being compared to the corresponding outcomes have not been derived from a model-fitting procedure using those data. Even if a model-fitting procedure has been used, R may still be negative, for example when linear regression is conducted without including an intercept, or when a non-linear function is used to fit the 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.

The coefficient of determination can be more intuitively informative than MAE, MAPE, MSE, and RMSE in regression analysis evaluation, as the former can be expressed as a percentage, whereas the latter measures have arbitrary ranges. It also proved more robust for poor fits compared to SMAPE on the test datasets in the article.

When evaluating the goodness-of-fit of simulated (Y) vs. measured (Y) values, it is not appropriate to base this on the R of the linear regression (i.e., Y = m · Y + b). The R quantifies the degree of any linear correlation between Y and Y, while for the goodness-of-fit evaluation only one specific linear correlation should be taken into consideration: Y = 1· Y + 0 (i.e., the 1:1 line).
startend:quotation, length_constraints:number_paragraphs[3]