# Mean residual life

If X is a nonnegative random variable representing the life of a component having distribution function F,the mean residual life is defined by

$$m(t) = E(X-t | X >t) = \frac{1}{\bar F(t)} \int_t^\infty (x-t) d\nu(x), t\geq 0$$ In papaer R. C. Gupta and D. M. Bradley (2003)" Representing the Mean Residual Life in Terms of the Failure Rate"mentioned that by writing $$x - t = \int_{t}^{x} du$$ and employing Tonelli's theorem yields the equivalent formula $$m(t) = \frac{1}{\bar F(t)}\int_t^\infty \int_t^x du d\nu(x) = \frac{1}{\bar F(t)}\int_t^\infty \int_u^\infty d\nu(x) du = \frac{1}{\bar F(t)}\int_t^\infty \bar{F}(u) du$$ How can we get this result by substituting the above integral and using Tonelli's theorem?

-
You have a nonnegative random variable $X\newcommand{\E}{\mathbb{E}}$ with distribution function $F$. The mean residual life is defined as $$m(t) = \E\left[X - t\mid X >t\right] = \frac{\E\left[ (X-t) I_{\{X>t\}}\right]}{P\{X>t\}} = \frac{1}{1-F(t)} \int_t^\infty (x-t)\,dF(x) \, ,$$ for $t>0$. But $$\int_t^\infty (x-t)\,dF(x) = \int_t^\infty \left(\int_t^x du\right)dF(x) \, . \quad (*)$$ Tonellis's Theorem says that you can change the order of integration in $(*)$, but you have to be careful about the integration limits. Look at the following figure.
The original domain of integration is interpreted like this: $x$ varies from $t$ to $\infty$. For some fixed $x$, $u$ varies from $t$ to $x$, determining the filled region in the figure. Now, reverse the order: $u$ varies from $t$ to $\infty$. For a fixed $u$, $x$ varies from $u$ to $\infty$. Hence, $$\int_t^\infty \left(\int_t^x du\right)dF(x) = \int_t^\infty \left(\int_u^\infty dF(x)\right)du$$ $$= \int_t^\infty P\{X > u\}\,du = \int_t^\infty \left(1 - F(u)\right)\,du \, .$$ Therefore, $$m(t) = \frac{1}{1-F(t)} \int_t^\infty \left(1 - F(u)\right)\,du \, .$$