The formula to calculate the R-squared value is:
R2=1−(SSRSST)
Where:
R-squared, also known as the coefficient of determination, is a statistical measure that represents the proportion of the variance for a dependent variable that’s explained by an independent variable or variables in a regression model. It provides a measure of how well observed outcomes are replicated by the model, based on the proportion of total variation of outcomes explained by the model. R-squared values range from 0 to 1, where a higher value generally indicates a better fit of the model.
Example 1:
Step 1: Calculate the R-squared value:
R2=1−(50200)=1−0.25=0.75
Example 2:
Step 1: Calculate the R-squared value:
R2=1−(30150)=1−0.2=0.8