3.2.2 Coefficient of Determination (\(R^2\))
Coefficient of determination \(R^2\) is a statistic that calculates the proportion of variance of the data explained by a model. Ideally, a model with a perfect fit of the data completely captures the variance of the data and would have an \(R^2\) of 1. Another interpretation of \(R^2\) is how well the model does relative to a constant model with the value of the data mean. A negative value of \(R^2\) signifies that the model studies is worse than a model a constant model with the value of the data mean through out the whole domain. The formula for \(R^2\) is presented below.
\[R^{2}=\ 1-\frac{\sum_{i=1}^{t}\left(p_{i}-\hat{p_{i}}\right)}{\sum_{i=1}^{t}\left(p_{i}-\bar{p_i}\right)}\ \ ,\ \bar{p_i}\ =\frac{1}{t}\sum_{i=1}^{t}p_{i}\nonumber \\\]