# Integral w.r.t. a cumulative density function

I was reading a paper and couldn't understand the following transition. Could someone tell me where the term of $$p^k (\frac{1}{2} − c′)$$ comes from in the following transition?

## Def: Cumulative function of interest

$$F(x) = \begin{cases} 0 & \text{for } x < -c' \\ p^k & \text{for } x \in [-c', 0) \\ (p + (1 - p) x)^k & \text{for } x \in [0, 1] \\ 1, & \text{for } x > 1 \end{cases}$$

## Integral of interest

$$\int^{\infty}_{-\infty} x d F(x) = p^k (\frac{1}{2} - c') + \int^{1}_{0} x d F(x) = \cdots$$

## My attempts

First, I expanded the integral based on the sections as follows; $$\int^{\infty}_{-\infty} x d F(x) = \int^{-c'}_{- \infty} x dF(x) + \int^{0}_{-c'} x dF(x) + \int^{1}_{0} x dF(x) + \int^{\infty}_{1} x dF(x)$$ Then, i was not sure how to compute each term... could someone tell me how to compute the integral over a CDF?

## Reference

• Perhaps graphing an instance of this family of functions would clarify the calculations. Due to the four-part definition of $F,$ this result reflects four separate calculations: which one(s) are you wondering about?
– whuber
Commented Dec 26, 2022 at 14:28
• @whuber I think i was not clear about what to ask in the above post. Sorry! Commented Dec 26, 2022 at 23:32
• Do you know what the notation $dF(x)$ indicates? It's the derivative of the function $F$ with respect to $x$, handwaving over some details that aren't important here. The first and last integrals should be clear... what is the derivative of a constant? Then think carefully about what is happening with the transition between the first and second integral - follow @whuber's recommendation and plot the function - and that should help you with the second one. Then on to the third one! Commented Dec 27, 2022 at 2:21
• Well you still have the third term, the integral over $[0,1]$. Commented Dec 28, 2022 at 2:56
• Oh, no, it just generates the $-p^kc'$ term. Basically, there's a jump in $F$ at $-c$, which means there's a discrete mass at that point, that has probability $p^k$. So its contribution to the expected value is just $-c * p^k$. Commented Dec 28, 2022 at 3:57

Let us express the CDF in terms of the Heaviside function $$H(\cdot )$$, this function is defined by, $$H(a) = \left\{ \begin{array}{ccc} 1 & \text{ if } & a\geq 0 \\ 0 & \text{ if } & a < 0 \end{array}\right.$$ Note, $$H$$ itself is a CDF, in some sense it is the "simplest" CDF. Now, we will do something extremely controversial, we claim that the derivative of the Heaviside function is the delta function, i.e., $$H' = \delta$$. Where $$\delta(\cdot)$$ is defined as follows, $$\delta(a) = \left\{ \begin{array}{ccc} \infty & \text{ if } & a = 0 \\ 0 & \text{ if } & a\not = 0 \end{array}\right.$$ This is the delta "function", it has the additional property that, $$\smallint_I (g\cdot \delta) = g(0)$$ provided that $$I$$ is an interval that contains the singularity $$0$$ and $$g$$ is a continuous function at $$0$$. For instance, $$\smallint_{(1,2)} (g\cdot \delta) = 0$$ but $$\smallint_{(-1,2)} (g\cdot \delta) = g(0)$$. You can intuitively think of $$\delta$$ as a PDF, which integrates to $$H$$. Of course, no such function exists in the classical sense with such properties, but let us not be worried about that yet.
Now the function that you wish to integrate can be described by, $$F(x) = p^k \bigg( H(x+c') - H(x) \bigg) + (p+(1-p)x)^k\bigg( H(x) - H(x-1) \bigg) + H(x-1)$$ Therefore, the "derivative" is equal to, $$F'(x) = \delta(x-1) + p^k \bigg( \delta(x+c') - \delta(x) \bigg) + k(1-p)(p+(1-p)x)^{k-1}\bigg( H(x) - H(x-1) \bigg) + (p+(1-p)x)^k\bigg( \delta(x) - \delta(x-1) \bigg)$$ Therefore, the calculation you are looking for is equal to, $$\int_{\mathbb{R}} x ~ d F(x) = \int_{\mathbb{R}} x F'(x)$$ Now substitute the above "derivative" and use the delta properties.
• Thank you for your answer! In the last equation, isn't there $dx$ at the end of the integral of LHS?? Commented Dec 28, 2022 at 1:33
• @Rowing0914 Yes, if you want to, you can write $x F'(x) ~ dx$ at the very end, but here the $dx$ is purely symbolic and serves no purpose any more. But if it makes it easier for you to understand the calculation then it just means you treat the integral of $x F'(x)$ as a usual integration problem with delta functions in there. Commented Dec 28, 2022 at 3:13