I have encountered a simple problem in probability where I would not have expected to find conditional convergence lurking about, but there it is. So I wonder:

- Is any insight about probability to be drawn from the fact that infinity minus infinity appears here?
- In particular, do the two separate terms that evaluate to infinity have some probabilistic interpretation?
- Is any insight about analysis or anything else to be found here?
- Generally in what situations does one write $\displaystyle \int_{x\,:=\,0}^{x\,:=\,1} u\,dv = \Big[ uv \Big]_{x\,:=\,0}^{x\,:=\,1} - \int_{x\,:=\,0}^{x\,:=\,1} v\,du$ and find that those last two terms are both infinite even though the first one converges absolutely?
- In particular, are any instances of this particularly notable or worth knowing about?

**The probability problem**

Suppose $X_1,\ldots,X_6$ are independent random variables each having the same exponential distribution with expected value $\mu,$ so that $$ \Pr( X_1 > x) = e^{-x/\mu} \quad\text{for } x\ge0. $$ It is desired to find this expected value $$ \operatorname E(\max\{\,X_1,\ldots,X_6\,\}) = \mu\left( 1 + \frac 1 2 + \frac 13 + \frac 1 4 + \frac 1 5 + \frac 1 6 \right) = 2.45\mu. \tag 1 $$ One fairly routine way to show this goes like this: $$ \Pr(\min\{\,X_1,\ldots,X_6\,\} > x) = \big( \Pr(X_1>x) \big)^6 = e^{-6x/\mu}\quad \text{for }x\ge0, $$ and therefore $$ \operatorname E(\min) = \frac \mu 6. $$ Let $X_{(1)}, \ldots, X_{(6)}$ be the order statistics, i.e. $X_1,\ldots,X_6$ sorted into increasing order. Then we have $$ \operatorname E(X_{(1)}) = \frac \mu 6, \quad\text{and } \operatorname E(X_{(2)} - X_{(1)}) = \frac \mu 5 $$ because that difference is the minimum of five exponentially distributed random variables. And so on through the last one.

No conditional convergence appears above.

**But suppose instead we just reduce it to evaluation of an integral.**

\begin{align} & \Pr(\max \le x) = \Pr(X_{(6)} \le x) = \Pr( \text{all of }X_1,\ldots,X_6 \text{ are} \le x) = \left( 1 - e^{-x/\mu} \right)^6 \text{ for } x\ge0. \\[10pt] & \text{Hence for measurable sets $A\subseteq[0,+\infty)$ we have } \Pr(\max\in A) = \int_A f(x)\, dx \\[10pt] & \text{where } f(x) = \frac d {dx} \left( 1 - e^{-x/\mu} \right)^6 = 6\left( 1- e^{-x/\mu} \right)^5 ( e^{-x/\mu}) \frac 1 \mu. \end{align}

So here's our integral: $$ \operatorname E(\max) = \int_0^\infty xf(x)\, dx. $$ No suggestion of conditional convergence, right?

\begin{align} \operatorname E(\max) = \int_0^\infty xf(x)\, dx & = \int_0^\infty x 6\left( 1- e^{-x/\mu} \right)^5 ( e^{-x/\mu}) \, \frac {dx} \mu \\[10pt] & = \mu \int_0^\infty s 6( 1-e^{-s})^5 e^{-s} \, ds \\[10pt] & = \mu \int s\, dt = \mu st - \mu\int t\,ds \\[10pt] & = \mu s(1-e^{-s})^6 - \mu \int (1-e^{-s})^6 \, ds. \end{align} Now a substitution: \begin{align} r & = 1-e^{-s} \\[6pt] s & = -\log(1-r) \\[6pt] ds & = \frac{dr}{1-r} \end{align} Our integral becomes \begin{align} & \mu ( - r^6 \log(1-r) ) - \mu \int \frac{r^6}{1-r} \, dr \\[10pt] = {} & \mu ( - r^6 \log(1-r) ) - \mu \int \left( -r^5 - r^4 - r^3 - r^2 - r - 1 + \frac 1 {1-r} \right) \, dr \end{align} Now the temptation is to write $$ \require{cancel} \xcancel{\left[ \mu \left( -r^6 \log_e(1-r) \right) \vphantom{\frac11} \right]_0^1} - \xcancel{\mu \int_0^1 \left( -r^5-r^4-r^3-r^2 - r -1 + \frac 1 {1-r} \right) \, dr }. $$ The problem is that this is infinity minus infinity, so we have conditional convergence. So suppose we write it like this: \begin{align} & \left[ \mu \left( -r^6 \log(1-r) \right) - \mu \int \left( -r^5-r^4-r^3-r^2 - r -1 + \frac 1 {1-r} \right) \, dr \right]_0^1 \\ & \text{(The above is not standard notation, as far as I know.)} \\[10pt] = {} & \mu \left[ (1-r^6) \log_e (1-r) + \left( \frac{r^6} 6 + \frac{r^5} 5 + \frac{r^4} 4 + \frac {r^3} 3 + \frac{r^2} 2 + r \right) \right]_0^1 \end{align} After we use L'Hopital's rule to evaluate the first term, this ends up being just what we see in $(1).$

Maybe I'll post my own answer if I am so inspired, but other answers may provide valuable alternative points of view. (I don't have an answer to post yet.)

**Postscript:**

Where I've seen something similar before is in attempts to prove that if $\Pr(X\ge0) = 1$ and $f$ is the p.d.f. and $F$ the c.d.f. of $X$, then

$$ \int_0^\infty xf(x)\, dx = \int_0^\infty (1-F(x))\,dx. $$

If you write

$$ \int(1-F(x))\,dx = \int u\,dx = xu - \int x\, du = \text{etc.,} $$

then you get infinity minus infinity. But you can do this:

\begin{align} & \int_0^\infty xf(x)\, dx = \int_0^\infty \left( \int_0^x f(x)\,dy \right) \, dx \\[10pt] = {} & \int_0^\infty \left( \int_y^\infty f(x) \,dx\right) \, dy \\[10pt] = {} & \int_0^\infty (1-F(y))\,dy. \end{align}

Tonelli's theorem is applicable since the function being integrated is everywhere non-negative, so that justifies the change in the order of integration.