Coefficient of Determination vs Residual
Both terms below come up in the same part of the course, and students mix them up. Here is each one defined on its own, side by side, so you can see where they part company.
Coefficient of determination (r²)
Regression and correlation
The coefficient of determination, r-squared, is the fraction of the variation in the response variable that the regression line explains, from 0 to 1.
The coefficient of determination reports the share of the response's total variation that the least-squares line accounts for, so higher means a better linear fit. It is the square of the correlation coefficient , and multiplying by 100 turns it into a percentage. For example, means 64% of the variation in the response is explained by the linear relationship with the explanatory variable, leaving 36% unexplained. Because it is a square, is never negative and never above 1.
Residual
Regression and correlation
A residual is the difference between an observed y-value and the value the regression line predicts for it: observed minus predicted.
A residual measures how far off the line is for a single point, so a positive residual sits above the line and a negative one below. It equals , the observed response minus the predicted response (read y-hat). For example, if the line predicts 72 but a student actually scored 80, the residual is . Least-squares regression chooses the line that makes the sum of the squared residuals as small as possible.