# Interpretation of $\int_{0}^{x} 1-F(t) dt$, in particular when F=Gamma/Erlang dist

I know that $\int_{0}^{\infty} 1-F(t) dt$ is the expectation of a random variable. But what happens when the upper limit is some finite number like so? \begin{align*} \int_{0}^{x} 1-F(t) dt \end{align*} where F is the CDF of a gamma distribution and $F(x)<1$. What's the interpretation? Are there any other, more intuitive, forms to represent this?

I tried to understand the meaning by calculating the above for Uniform[0,1] distribution over interval [0,1/2] which resulted in 1/8. But it still isn't intuitive.

For another form, I started doing similar derivation to the one here: Firefeather's answer to Find expected value using cdf, hoping that it would somehow simplify my integral but that led me to no better place. I end up with the following \begin{align*} \int_{0}^{x} 1-F(t) dt &= \int_{0}^{x} Pr(T>t) dt \\ &= \int_{0}^{x}\int_{t}^{\infty}f(y) dy dt \\ &= \int_{0}^{\infty}\int_{0}^{Min(y,x)}f(y) dt dy \\ &= \int_{0}^{\infty}Min(y,x)f(y) dy \\ & =\int_{0}^{x}yf(y) dy + \int_{x}^{\infty}xf(y) dy \\ \end{align*} There's still no intuition/interpretation.

Finally, in special case of Erlang distribution, since it results from adding a bunch of exponentially distributed random variables, I thought that maybe I need to look into renewal functions from stochastic processes to get a better understanding of the above integral but no success so far.

• Your can use the same argument (switching the integral) as Firefeather $\int_0^a 1-F(t) dt = \int_0^a x f_X(x) dx$. So the interpretation is like the expected value for a right censored distribution. Your uniform example needs to be normalized (divide by $\int_0^{1/2} f = 1/2$) and you get 1/4, the expectation of the values<0.5 in the uniform distribution – Sextus Empiricus Oct 10 '17 at 13:50
• @MartijnWeterings, I didn't normalize simply because I just want to evaluate the integral in question. I'm adding details of my attempt to evaluate for Gamma distribution because, somehow, I'm not getting the same result as the one you mentioned. – Houston Mooncat Oct 10 '17 at 14:15
• You are right you get this second integral as well. – Sextus Empiricus Oct 10 '17 at 14:48

You can still use the same argument as Firefeather Find expected value using cdf. In this answer I describe a more intuitive view of the integration while copying the proof for your case:

$$\begin{array}\\ \int_0^a 1-F(t) dt &= \int_0^a \int_t^\infty f_X(x) dx dt \\& = \int_0^a \int_0^x f_X(x) dt dx +\int_a^\infty \int_0^x f_X(a) dt dx \end{array}$$

The intuitive part is to look at the domain and see the integration as scanning

The $\int_0^a \int_t^a$ is an integration on the domain of a triangle and a rectangular.

See in the image how the integration is on a triangle and you can make triangle by either vertical strips with x from t to a or with horizonttal strips with t from 0 to x.

These horizontal strips $\int_0^x$ can be changed into $x f(x)\vert_0^x$. We should emphasize that the integrand f_X(x) changes in the vertical direction and not the horizontal direction so $\int f_X(x) dt = t f_X(x)$.

So $\int_0^a 1-F(t) dt = \int_0^a t f(t) dt + \int_a^\infty a f(t) dt = \int_0^a t f(t) dt + a (1-F(a))$ .

For an interpretation I am still lost.

• thank you. Your image makes the exchange of integrals clearer. Now, is there a way of solving this for an Erlang distribution's parameter n? That is, equal your result to some constant and solve for n like so: $\int_0^a t f(t) dt + a (1-F(a))=c$ where $f(t)=$ErlangDistribution[$n,\lambda$] – Houston Mooncat Oct 10 '17 at 16:22
• You have got $t f(n,t,\lambda) = \frac{n}{\lambda} f(n+1,t,\lambda)$. So you should be able to work out those integrals in terms of $F(n,t,\lambda)$ and $F(n+1,t,\lambda)$. Beyond this simplification or intuitive representation, I am a bit touching in the dark on what you want to do with this integral. – Sextus Empiricus Oct 10 '17 at 20:17
• Here you have another, very lean, proof of the expected value thing, using integration by parts: $$\int_a^b 1-F(t) dt = t(1-F(t))\vert_a^b + \int_a^b tf(t) dt$$ It adepts nicely to the case in which you do not have $\int$ from 0 to $\infty$ – Sextus Empiricus Oct 10 '17 at 20:37
• I appreciate the additional comments. I'll try using your suggestions and see where that takes me. I also edited the question to emphasize that I'm seeking intuition. – Houston Mooncat Oct 11 '17 at 16:49