the average value of a function of the residual index (A. Akbary, A. T. Felix) --