Let $X\geqslant 0$ be a random variable. Then, we have
$\mathcal{E}(X)=\int_0^\infty P(X>t)dt$
(provided $\mathcal{E}(X)$ exists).
Suppose we have a finite data set $\{(d_1, a_1), \ldots, (d_n, a_n)\}$ consisting of pairs or real numbers where $d_i$ stands for a level (height) of some vessel and $a_i$ is the area of the surface of the vesel at level $d_i$.
How can I apply the above mentioned formula to calculate the (expected) capacity of the vessel?