Calculates the coefficient of determination (denoted R-squared or R2) for the current set of data.
the coefficient of determination for the current set of data considered.
This statistics will always take a value within the interval [0,1],
and is used to evaluated to what degree the given data can be fit to a linear regression line. That is,
this statistic is a goodness of fit measure for the regression line which can be evaluated using
LeastSquaresRegressionLineY.
The coefficient of determination is purely the following ratio:
R2 = SSR/SST,
where,
SSR = sum of squares due to regression (i.e. the sum of the squares in the 2nd coordinates of the difference
between the data points and the corresponding point of the regression line.
SST = total sum of squares (i.e. the sum of the squares in the 2nd coordinate of the difference between the
mean of the data points and each of the points on the regression line correspond to each of the data points.
Intuitively the coefficient of determination is the amount of variation in the second
variable (i.e. Y) which is explained by the regression line of the second
variable Y on the first variable X, divided by the total amount
of variation of the second variable (i.e. Y).
CorrelationStateful Class | WebCab.Libraries.Statistics.Correlation Namespace