WebCab Probability and Statistics for Delphi (.NET) v3.6

CorrelationStateful.CoefficientOfDetermination Method 

Calculates the coefficient of determination (denoted R-squared or R2) for the current set of data.

public double CoefficientOfDetermination();

Return Value

the coefficient of determination for the current set of data considered.

Remarks

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.

Explanation of the Coefficient of Determination

The coefficient of determination is purely the following ratio:

R2 = SSR/SST,

where,

  1. 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.
  2. 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).

See Also

CorrelationStateful Class | WebCab.Libraries.Statistics.Correlation Namespace