A residual is a difference between the observed value of a response (dependent) variable and the value that is fitted under the hypothesized model usually denoted by e. A residual (or fitting error) is an observable estimate of the unobservable statistical error. Each data point has one residual.

Residual = Observed value − Predicted value
e = y − ŷ

Note that the sum of the residuals within a random sample is necessarily zero, and thus the residuals are necessarily not independent.

R Frequently Asked Questions