In statistics, the residual sum of squares (RSS) is the sum of squares of residuals. It is the discrepancy between the data and our estimation model. As smaller this discrepancy is, better our estimation will be.
- <math>RSS = \sum_{i=1}^n (y_i - f(x_i))^2. </math>
In a standard regression model <math>y_i = a+bx_i+\varepsilon_i\,</math>, where a and b are coefficients, y and x are the regressand and the regressor, respectively, and ε is the "error term." The sum of squares of residuals is the sum of squares of estimates of εi, that is
- <math>RSS = \sum_{i=1}^n (y_i - (a+bx_i))^2. </math>
In general: total sum of squares = explained sum of squares + residual sum of squares.


