I remember that the expected value of a random variable can be calculated by the cumulative distribution (or 1-CDF). But I don't recall it exactly. Can you please give some hint?
Update:
Should be $E[X]=\int_{0}^{\infty}Pr\{X\geq x\}dx$.
Does this formula have any special restriction?
If $X$ is a cts random variable with cdf $F (x)$ and the expectation exists then $$\mathsf E(X) ~=~ \int_{0}^{\infty}\big(1-F(x)\big)\operatorname dx\;-\int_{-\infty}^0 F (x)\operatorname dx $$ The case for the discrete can be found by replacing the integral with summation analogously