Prove $E(X)=\int_0^\infty1-F_X(x)\,dx$ using quantile functions

44 Views Asked by At

I’ve encountered following problem: Let $X$ be a positive random variable with distribution $P^X$, cumulative distribution function $F_X$ and quantile function $q_X$. Show that $$E(X)=\int_0^\infty1-F_X(x)\,dx$$ I’ve gotten so far: $$\int_0^\infty1-F_X(x)\,dx=\int_0^\infty P^X((x,\infty[)\,dx=\int_0^\infty\int1_{(x,\infty)}(y)\,dP^X(y)\,dx\overset{(*)}{=}\int\int_0^\infty1_{(x,\infty)}(y)\,dx\,dP^X(y)$$ where $(*)$ follows from Tonelli’s theorem. Now, I have already proven that $$E(X)=\int_0^1q_X(u)\,du$$ and my best guess is that the idea is to somehow connect these two results by showing $$\int\int_0^\infty1_{(x,\infty)}(y)\,dx\,dP^X(y)=\int_0^1q_X(u)\,du$$ but I’ve got literally no idea about how to do this. I’d be very grateful for any tips or hints.