In a problem in my probability course we change the order of integration, and I am having trouble seeing why we can do it this way.
$\int_0^\infty \int_{\{x : g(x) > t\}} f_X(x)dxdt = \int_{-\infty}^\infty \int_{\{t : 0 \le t < g(x)\}} f_X(x) dt dx.$
Can anyone enlighten me to why this works. I know how it works with simple examples, but for some reason the $g(x) > t$ is messing with my head.