# Expected value of a random variable by integrating $1-CDF$ when lower limit $a\neq 0$?

I have found several past answers on stack exchange (Find expected value using CDF) which explains why the expected value of a random variable as such: $$E(X)=\int_{0}^{\infty}(1−F_X(x))\,\mathrm dx$$ However, I am studying a partial-partial equilibrium in search theory where we have the following integral instead where a is a positive free variable: $$\int_{a}^{\infty}(1−F_X(x))\;\mathrm dx$$ What would be the interpretation of this integral? Would it be correct to interpret it as some sort of conditional expectation such as $$E(X | x \geq a)$$. However, it seems like it is not just a conditional expectation as the value of the integral with a would be smaller than if the lower limit is just 0. Perhaps it should be some scaled version of the conditional expectation but I am unsure. Thank you for any advice.

I would like to add a thing to the answer by @Thomas Lumley

One can come up with the following:

\begin{align} E[\max(X,a)]&=P(X\geq a)\cdot E[\max(X,a)|X\geq a]+P(X

Combining this with the previous answer, we get:

$$\int_a^\infty(1-F(x))dx=E[\max(X,a)]-a=E[\max(X-a,0)]$$

Edit: As @Ben added in his comment, it's with noting that in the special case $$a=0$$, you recover the usual expected value rule for non-negative random variables:

$$\int_0^\infty(1-F(x))dx=E[\max(X,0)]=E[X]$$

• Great answer (+1). It might be worth adding one last line noting the special case where $X$ is non-negative and $a=0$. (In other words, the rule you state is a generalisation of the standard expectation result for non-negative random variables.) – Ben Sep 14 '20 at 7:28
• @Ben I hadn't noticed this, thanks! I edited my answer – PedroSebe Sep 14 '20 at 16:33

There's a connection to the conditional expectation. I'll write $$S_X(x)=1=F_X(x)$$ for the survival function. The conditional survival function conditional on $$X\geq a$$ is $$S_{a}(x)= \frac{P(X>a \cap X>x)}{P(X>a)}$$ which is 1 for $$x and $$S_X(x)/S_x(a)$$ for $$x\geq a$$. So the conditional expectation is $$E[X|X\geq a]=\int_0^\infty S_a(x)\,dx = \int_0^a\,dx + \frac{1}{S_x(a)}\int_a^{\infty} S_X(x)\,dx.$$

Rearranging, $$\int_a^{\infty} S_X(x)\,dx = (E[X|X\geq a]-a)P[X>a]$$

For simplicity, consider the case where $$X$$ is continuous with density function $$f_X$$. The standard expectation rule for non-negative random variables is derived by using integration by parts to alter the standard moment integral. We will use the same technique here. Using integration by parts and L'Hôpital's rule we have:

\begin{align} \int \limits_{a}^\infty (1-F_X(x)) \ dx &= \Bigg[ x (1-F_X(x)) \Bigg]_{x=a}^{x \rightarrow \infty} + \int \limits_{a}^\infty x f_X(x) \ dx \\[6pt] &= -a(1-F_X(a)) + \int \limits_{a}^\infty x f_X(x) \ dx \\[6pt] &= -a + a F_X(a) + \int \limits_{a}^\infty x f_X(x) \ dx. \\[6pt] \end{align}

We therefore have the general rule:

\begin{align} \mathbb{E}[\max(X-a,0)] &= \int \limits_\mathbb{R} \max(x-a,0) f_X(x) \ dx \\[6pt] &= -a + \int \limits_\mathbb{R} \max(x,a) f_X(x) \ dx \\[6pt] &= -a + a F_X(a) + \int \limits_{a}^\infty x f_X(x) \ dx \\[6pt] &= \int \limits_{a}^\infty (1-F_X(x)) \ dx. \\[6pt] \end{align}

In the special case where $$X$$ is a non-negative random variable and $$a=0$$ this equation reduces to the standard rule for the expectation of a non-negative random variable. Thus, the present formula generalises that rule.