I came across the following formula for Expectation for a random variable $X$, as follows: $$(*)\:\:\:E(X)=\int_0^{\infty}(1-F_X(x))dx-\int_{-\infty}^0F_X(x)dx$$
I am not able to absorb this definition, whereas in the standard case where $E(X)=\int_{-\infty}^{\infty}xf_X(x)dx$, it can be taken that each value $x$ is multiplied with it's probability(approx.) and then added up, and hence the average.
Although, the statement can be derived starting from the standard scenario of $E(X)$, I really can't "see" the idea behind $(*)$.
Can anyone help ?