Let $X$ be a non-negative random variable. In a proof for $E[X]=\int_0^\infty P(X>t)dt$ from the answer of this question, we use Fubini for the middle quality. Why do we need $X$ to be non-negative? We basically have a double integral over a function $f(X,t)$ which is $1$ if $X>t$ and else 0. So this function is non-negative for any $X$ not just for non-negative random variables $X$, thus we could use Fubini regardless. Where is the flaw in my reasoning?
2026-04-02 04:58:04.1775105884
On
Expectation of non-negative random variable
2.5k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
4
There are 4 best solutions below
0
On
There is no flaw in the Fubini part. However, the first equality in that proof won't work if you allow $X$ to have negative values.
We require $X$ to be non-negative, because otherwise \begin{equation} X \neq \int_{[0,X)} 1 \ dt, \ \ \mbox{ so in general} \ \ E[X] \neq E \left ( \int_{[0,X)} 1 \ dt \right ). \end{equation}
For example, if for some $\omega_0 \in \Omega$ we have that $X(\omega_0) = -5 < 0$, then $[0,X(\omega_0)) = \emptyset$ and $\int_{[0,X(\omega_0))} 1 \ dt = 0 \neq X(\omega_0)$, so we are in trouble if $\mathbb{P} (\omega_0) >0$. Thus, $X$ is required to be non-negative in order for the first equality to hold, not because of the Fubini theorem.
Not that for a non-positive $X$ you get \begin{equation} E[X] = -E[-X] =- \int_0^{\infty} P (- X > t)\ dt= \int_{-\infty}^0 P (X <s )\ ds. \end{equation}