The coefficient of determination is a statistic that compares the residual variation of fitted values with the total variation of observations
. Writing
for the arithmetic mean
of
,
...,
,
define
|
(1)
| |||
|
(2)
|
The coefficient of determination is then
|
(3)
|
For an in-sample linear least squares fitting with an intercept, , and
is the fraction of total sum of squares accounted for by
the fitted model. Without an intercept, or when predictions are evaluated on data
not used for fitting,
can be negative.
Adding predictors cannot decrease the in-sample . A commonly used penalty for this property is the adjusted
coefficient of determination
|
(4)
|
where
is the number of estimated parameters, including the intercept. In simple linear
regression with an intercept, the coefficient of determination is related to the
correlation coefficient and the two directional
regression coefficients by
|
(5)
|