1

Let $X$ be a continuous non-negative random variable on $(0,a)$. Prove that $$E(X) = \int_{0}^{a} (1-F_X(x))\,dx$$ where $F_X(x)$ is the CDF for $X$.

I know that by definition: $$F_X(x) = P(X \leq x) => 1 - F_X(x) = P(X>x)$$ So i can easily go to the next step. But what should I do in this case?

$$ \mathbb{P}(0 < X < a) = \int_0^a f_X(x)dx $$

Thank you

3 Answers3

4

\begin{align} E(X) & = \int_0^\infty x f(x) \ dx \\ & = \int_0^\infty \int_0^x f(x) \ dy dx \\ & = \int_0^\infty \int_y^\infty f(x) \ dx dy \\ & = \int_0^\infty [1-F(y)] \ dy. \end{align}

Gregory
  • 3,641
3

To prove $\mathbb{E}(X) = \int_0^\infty \mathbb{P}(X\geq x)\,\mathrm{d}x$, we proceed as follows: $$\mathbb{E}(X) = \mathbb{E}\left(\int_0^\infty \mathbf{1}_{X>x}\, \mathrm{d}x \right) = \int_0^\infty \mathbb{E}\left(\mathbf{1}_{X>x}\right) \, \mathrm{d}x = \int_0^\infty \mathbb{P}(X\geq x)\,\mathrm{d}x.$$

Fei Cao
  • 2,830
  • Notice that $\infty$ can be replaced by any $a>0$, and the argument stills the same (i.e., using Fubini's theorem to interchange the order of $\mathbb{E}$ and the integration). – Fei Cao Apr 26 '21 at 17:27
2

By definition,

$$ \begin{aligned} \text{E}\left(X\right) &= \int_{-\infty}^{+\infty} x f_X(x)dx = \int_{0}^{a} x f_X(x)dx = \int_{0}^{a} x F'_X(x)dx = \\ &= (\text{applying integration by parts}) = \\ &= \int_{0}^{a} \underbrace{x}_{u} \underbrace{dF_X(x)}_{dv} = \left.\underbrace{x}_{u}\underbrace{F_X(x)}_{v}\right|_0^a - \int_{0}^{a} \underbrace{F_X(x)}_v\underbrace{dx}_{du} = \\ &= a\cdot \underbrace{F_X(a)}_{= 1} - 0\cdot \underbrace{F_X(0)}_{= 0} - \int_{0}^{a} F_X(x)dx = a\cdot 1 - \int_{0}^{a} F_X(x)dx = \\ &= \left(\text{now, notice that }\int_0^adx = a\right) = \\ &= \int_0^adx - \int_{0}^{a} F_X(x)dx = \\ &= \int_{0}^{a}\left(1- F_X(x)\right)dx \end{aligned} $$

Eugene
  • 1,738
  • 1
    Though the OP did not ask for it, I would note that this proof is a little unwieldy if $a\to\infty$. – Gregory Apr 26 '21 at 19:03