Wrong expected value definition in book? I am currently hospitalised and reading a queueing theory book. I encountered in a proof this, and I fail to understand how this is true:
$$E[R_j]=\int_0^\infty{P(R_j>u)du}$$
Other than the fact that $R_j$ is a random variable defined in $[0,\infty)$ I dont think that any further context is needed for my question.
Due to my hospitalisation I don't have good access to my more basic probability books but I really don't recall reading any similar alternative definition for the expected value.
If someone is curious or believes that the context is important, in a stochastic renewal process with holding times $X_j$, for a given value $x>0$,  $R_j$ is defined as $R_j=X_j$ when $X_j\le x$, and $R_j=0$ otherwise.
Regardless of context, however, I find the line in question hard to comprehend.
 A: If $X\geqslant 0$ you have that
$$
\begin{align*}
\mathrm{E}[X]&=\int_{\Omega }X dP=\int_{\mathbb{R}}t \,dF_X(t)\\
&=\int_{[0,\infty )}t \,dF_X(t)\\
&=\int_{[0,\infty )}\int_{[0,\infty )}[s\leqslant t]\,d s\,dF_X(t)\\
&=\int_{[0,\infty )}\int_{[0,\infty )}[s\leqslant t]\,dF_X(t)\,d s\\
&=\int_{[0,\infty )}\Pr [X\geqslant s]\,d s
\end{align*}
$$
where $[s\leqslant t]$ is an Iverson bracket. In general you have that
$$
\begin{align*}
\mathrm{E}[X]&=\int_{\Omega }X dP=\int_{\mathbb{R}}t \,dF_X(t)\\
&=\int_{[0,\infty )}t \,dF_X(t)+\int_{(-\infty,0)}t \,dF_X(t)\\
&=\int_{[0,\infty )}\Pr [X\geqslant s]\,d s+\int_{(-\infty,0)}\int_{(-\infty,0)}-[s\geqslant t]\,d s\,dF_X(t)\\
&=\int_{[0,\infty )}\Pr [X\geqslant s]\,d s-\int_{(-\infty,0)}\int_{(-\infty,0)}[s\geqslant t]\,dF_X(t)\,d s\\
&=\int_{[0,\infty )}\Pr [X\geqslant s]\,d s-\int_{(-\infty,0)}\Pr [X\leqslant s]\,d s
\end{align*}
$$
A: Let me make a hand-waving proof that gets at the intuition - a discrete case to make it clearer.  Say you have a simple process that returns X which is 1,  2 or 3 with probabilities $p_1$, $p_2$ and $p_3$.  The expected value is $1p_1+2p_2+3p_3$.  Another way to write this is like this:
$$1p_1+\hspace{45pt}$$
$$1p_2+1p_2+\hspace{15pt}$$
$$1p_3+1p_3+1p_3$$
If you read this sum by column, you get three terms: $1p_1+1p_2+1p_3$, and $1p_2+1p_3$ and then $1p_3$.  The first part is $P(X\ge 1)$, the second part is $P(X\ge 2)$ and the third part is $P(X\ge 3)$.  So the expected value is the sum of the exceedance probabilities.
