In statistical models, a residual is the difference between an observed quantity and the prediction given by the model.