Coefficient of Determination (R2) represents the proportion of the variance of a
dependent variable that is explained by the predictor(s).
The sum of squared deviations,
∑(yi − ȳ)2 (SStot), is an unscaled, or unadjusted measure
of dispersion or variability. When scaled for the number of degrees of freedom, it becomes the variance.
Partitioning of the sum of squared deviations, allows the overall variability in the
data to be ascribed to that explained by the regression (SSreg), and that not explained by
the regression, i.e., the residual sum of squares, (SSres).
$$ SS_{tot} = SS_{reg} + SS_{res} $$
$$ \text{Total SS = Explained SS + Residual SS} $$
$$ \sum(y_i - \bar y)^2=\sum(\hat y_i - \bar y)^2 + \sum (y_i - \hat y_i )^2 $$
SStot: Total sum of squared deviations.
SSreg: Explained sum of squared deviation.
SSres: Residual (error) sum of squares.
Coefficient of Determination (R2) is the proportion of the variance in the
dependent variable that is predictable from the independent variables:
$$R^2=\frac{SS_{reg}}{SS_{tot}}$$
This is a commonly used statistic to evaluate model fit; it is an indicator of how
well the model explains the movement in the data. For instance, an R2 of 0.8 means that
the regression model explains 80% of the variability in the data.