defined as the ratio of two sums of squares:

where SSR is the sum of squares due to regression, SST is the total sum of squares. By “sum of squares” we mean the sum of squared deviations between actual values and the mean (SST), or between predicted values and the mean (SSR). The coefficient of determination takes on values between 0 and 1, with values closer to 1 implying a better fit.