# From Lebesgue Integral to Stieltjes Integral, and integration by parts

Let $X$ be a real random variable with c.d.f function $F$. Let $g$ be an increasing measurable real function and assume that $\mathbb{E}\left[g(X)\right]$ exists (and is finite).

What additional assumptions do I need on $g$ for the following equality to hold? $$\mathbb{E}\left[g(X)\right] = - \int_{-\infty}^{0}{F(t) \ dg(t)} + g(0) + \int_{0}^{+\infty}{\left(1-F(t) \right) \ dg(t)}$$

I have seen people using these kind of equalities, but I have never seen a rigorous statement yet. So I would like to know when can I use this transformation, and furthermore I am looking for a reference I can cite when using it.

Edit: Equality corrected thanks to Alexandre Eremenko's comments.

-
The formula you wrote is incorrect: if you add a constant to $g$, the left hand side will change while the right hand side will not. The correct integration by parts formula is $$\int_{-\infty}^\infty gdF=-\int_{-\infty}^0Fdg+g(0)+\int_0^\infty(1-F)dg.$$ You need some condition at $\pm\infty$ that guarantees that $gF\to 0$ as $t\to-\infty$, and $g(1-F)\to 0$ as $t\to+\infty$. And of course that the functions do not jump at $0$.
This result is called "integration by parts", any analysis textbook which has Stieltjes integral will have it. The general formula is $\int_a^bfdg=fg|_a^b-\int_a^bgdf.$ –  Alexandre Eremenko Dec 14 '13 at 15:38
Yes, but if they are not on the endpoints, it is OK. That's why I said "there is no jump at $0$. of course, the formula can be modified for the case that the points of discontinuity are at the endpoints. –  Alexandre Eremenko Dec 14 '13 at 16:48
Thanks, but I'm not looking for just a reference on integration by parts for the Stieljtes on a finite interval, but for the equality mentioned. First my domain of integration is infinite. Second while obviously some kind of continuity on $g$ is required, it is not obvious to me whether the conditions on the behaviour of $gF$ and $g(1-F)$ at infinity are required when the Lebesgue integral is assumed to be finite. –  Adrien Dec 14 '13 at 18:59