X is for continuous random variable and it's nonnegative. Then this is the formula.
$$E(X)=\int_0^\infty(1-F(x))dx$$
Does anyone know the proof? I appreciate any help.
X is for continuous random variable and it's nonnegative. Then this is the formula.
$$E(X)=\int_0^\infty(1-F(x))dx$$
Does anyone know the proof? I appreciate any help.
Hint:
Write RHS as $$\int_0^{\infty}\int_0^{\infty}1_{(x,\infty)}(y)dF(y)dx$$ and switch the order of integration.
Provided there is a density function, you can do this:
$$\int_0^\infty (1-F(x)) \mathrm{d} x = \int_0^\infty \int_x^\infty f(y)\mathrm{d} y \mathrm{d} x = \int_0^\infty \int_0^y f(y) \mathrm{d}x\mathrm{d}y = \int_0^\infty y f(y)\mathrm{d}y = \mathrm{E}(X) $$
Otherwise look at drhab's answer.