To calculate the coefficient of determination (\(R^2\)):
\[ R^2 = 1 - \left( \frac{RSS}{TSS} \right) \]
Where:
The sum of squares of residuals (RSS) represents the variation in the dataset that is not explained by the model. It’s a measure of the discrepancy between the data points and the model’s predicted values.
Let's assume the following values:
Using the formula:
\[ R^2 = 1 - \left( \frac{50}{200} \right) = 1 - 0.25 = 0.75 \]
The coefficient of determination is 0.75.
Let's assume the following values:
Using the formula:
\[ R^2 = 1 - \left( \frac{30}{150} \right) = 1 - 0.20 = 0.80 \]
The coefficient of determination is 0.80.