Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A solution to one of my practice problems involves this:

$\int^\infty_0 \{\int^x_0 dy\}f(x)dx = \int^\infty_0 \{\int^\infty_y f(x) dx\}dy $

Where f() is a PDF function of a continuous random variable(if that makes any difference).

Why does this work? And what should I know in order to be able to apply this kind of step to problems in the future?

share|cite|improve this question
up vote 1 down vote accepted

It's an application of Fubini's theorem and the observation that the domain of integration is $\{(x,y) \mid 0 \le y \le x < \infty\}$ which can be written in two ways. You can apply Fubini here as your function is non-negative and for seeing the two ways it sometimes helps mwe to write the bounded integral as in integral over a characteristic function as follows ($\chi_A(x) = 1$ if $x \in A$, $0$ else): \begin{align*} \int_0^\infty \int_0^x f(x)\,dy\,dx &= \int_0^\infty \int_0^\infty \chi_{[0,x]}(y)f(x)\, dy\,dx\\\ &= \int_0^\infty \int_0^\infty \chi_{[0,x]}(y)f(x)\,dx\,dy\\\ &= \int_0^\infty \int_0^\infty \chi_{[y,\infty)}(x)f(x)\,dx \,dy\\\ &= \int_0^\infty \int_y^\infty f(x)\,dx\,dy \end{align*}

share|cite|improve this answer
So why does $\chi_{[0,x]}$ become $\chi_{[y,\infty]}$ ? – user1066113 May 15 '12 at 10:05
$\chi_{[0,x]}(y) = 1$ iff $y \in [0,x]$ iff $x \in [y,\infty)$ iff $\chi_{[y,\infty)}(x) = 1$. – martini May 15 '12 at 10:15
Ohhhh, I see. Thanks a lot for all the help :) – user1066113 May 15 '12 at 11:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.