I am studying for the first actuarial exam (Exam P) and came across a formula in my ACTEX prep manual that I had never seen before:
$$E[X] = a + \int_{a}^{b}{[1-F(x)]dx}$$
And the text said this was true as long as $x$ was continuously defined on the interval, and as long as $b\lt \infty$. True for continuous and discrete! I tried it out with a few different, very straightforward functions and could not get it to equal an expected value answer I found in the typical manner. Am I missing something in the application? Has anyone seen this before?
Any help is appreciated!
Let $F(x)=\int_a^x f(x) dx$ where $f$ is probability density function of $X$. Then by integrating by parts
$$E[x]=\int_{a}^{b} xf(x) dx = \int_a^b xd(F(x)) = [xF(x)]_a^b -\int_a^bF(x)dx $$
$$= bF(b)-aF(a)- \int_a^b F(x)dx = b- \int_a^b F(x)dx$$ which is equal to the RHS of your formula because $$a + \int_{a}^{b}(1-F(x))dx=a + \int_{a}^{b}dx-\int_{a}^{b}F(x)dx =b-\int_a^bF(x)dx.$$