Specifically, suppose I have a CDF $F$ and an integral $$ \int_0^\gamma (\gamma-s)dF(s) $$ and I want to find $$ \frac{d}{d\gamma} \int_0^\gamma (\gamma-s)dF(s) $$

(Note that the upper limit $\gamma$ indicates that $s=\gamma$)

If the integral was $\int_0^\gamma (\gamma-s)ds$ then I can apply Liebniz rule. Can I still use Liebniz rule even though my integral is of the form $\int_0^\gamma f(\gamma,s)dF(s)$, instead of $\int_0^\gamma f(\gamma,s)ds$

(if $F$ is differentiable than I can (rigorously/correctly) write $dF(s) = f(s)ds$ and have the standard form. But if $F$ has mass point(s)... then I don't know)

  • $\begingroup$ For the integration limits, is it $F(s)=\gamma$ or $s=\gamma$? $\endgroup$
    – Szeto
    May 19, 2018 at 1:20
  • $\begingroup$ @Szeto $s=\gamma$. I will add that $\endgroup$
    – user106860
    May 19, 2018 at 1:25
  • $\begingroup$ By the way, is it okay to interpret that F(s) has some discontinuities, making it not differentiable at some isolated points? $\endgroup$
    – Szeto
    May 19, 2018 at 2:18
  • $\begingroup$ If you are able to convert it to an integral using the PDF instead, you could avoid this question altogether and apply the Leibniz rule. i.e. $$\int(\gamma-s) d F(s) = \int(\gamma-s)f(s)d s$$ where $f(s)$ is the PDF. However, this doesn't really answer your question regarding Leibniz rule applying to the integral with the CDF. $\endgroup$
    – MasterYoda
    May 19, 2018 at 2:27
  • 2
    $\begingroup$ If it has a finite number of discontinuities, in theory you could split up the integral at each of the discontinuities and convert to the PDF. $\endgroup$
    – MasterYoda
    May 19, 2018 at 2:34

2 Answers 2


I will interpret the integral as Riemann-Stieltjes integral. Then by integration by parts,

\begin{align*} \int_{0}^{\gamma} (\gamma-s) \, dF(s) &= \left[ (\gamma-s)F(s) \right]_{0}^{\gamma} + \int_{0}^{\gamma} F(s) \, ds \\ &= -\gamma F(0) + \int_{0}^{\gamma} F(s) \, ds \\ &= \int_{0}^{\gamma} (F(s) - F(0)) \, ds. \end{align*}

So we have

$$ \frac{d}{d\gamma} \int_{0}^{\gamma} (\gamma-s) \, dF(s) = F(\gamma) - F(0) = \int_{0}^{\gamma} dF(s) $$

at every continuity point $\gamma$ of $F$. But also notice that this is exactly what we expect when applying the Leibniz integral rule:

$$ \frac{d}{d\gamma} \int_{0}^{\gamma} (\gamma-s) \, dF(s) \quad``\,=\text{''}\quad \underbrace{(\gamma - \gamma)F'(\gamma)}_{=0} + \int_{0}^{\gamma} dF(s). $$

  • $\begingroup$ I have two questions then: 1) If I were to use the Leibniz integral rule, is it always that $\int_0^\gamma dF(s) = F(\gamma)-F(0)$? Using Fund. Thm. of Calculus comes to mind, but $f$ may not be continuous so I'm not sure it applies? 2) For this all that is required is $dF$ is lebesgue integrable? (and some condition on $\gamma-s$ but that is linear so I'm assuming it's fine) $\endgroup$
    – user106860
    May 19, 2018 at 18:44
  • 1
    $\begingroup$ @user106860, As I mentioned in the beginning of my answer, I interpreted the integral as the Riemann-Stieltjes integral as is often done in probability theory. The integral $$\int_{a}^{b} \phi(x) \, dF(x)$$ is well-defined as long as $\phi$ is continuous and $F$ is monotone increasing on $[a, b]$, and the equality $\int_{a}^{b} dF(x) = F(b) - F(a)$ is always true for such $F$. $\endgroup$ May 19, 2018 at 18:46
  • $\begingroup$ And for integration by parts, I am used to seeing it applied to $\int u(x) v'(x)dx$, but here we have $\int u dv$, where $v$ is a function. What conditions are needed to be able to use integration by parts here? Wikipedia says that for $dv= v'(x)dx$ we need $v'(x)$ lebesgue integrable, but here with $dF(s)$ and $f(s)$ maybe have mass points, it is not necessarily that $dF(s) = f(s)ds$? If that is maybe not clear, I restate: how we can be sure that we can use integration by parts with $dF(s)$? $\endgroup$
    – user106860
    May 19, 2018 at 18:52
  • 1
    $\begingroup$ @user106860, Of course it is also proved for Riemann-Stieltjes integral. Basically, most of thing you can think of the usual Riemann integral extends to Riemann-Stieltjes integral without much hassle. $\endgroup$ May 19, 2018 at 18:54

I am not an expert in probability theory, but I think my knowledge is just sufficient to tackle this problem.

Assume $\gamma>0$ for convenience.

Let $\{a_i\}$ where $a_i>0$ be the discontinuities of $F(s)$. For $a_k<\gamma<a_{k+1}$, we can rewrite your integral as $$\int_0^{a_1-\epsilon}(\gamma-s)f(s)ds+\left(\sum_{j=1}^{k-1}\int^{a_{j+1}-\epsilon}_{a_j+\epsilon}(\gamma-s)f(s)ds\right)+\int^\gamma_{a_k+\epsilon}(\gamma-s)f(s)ds$$

Differentiating it yields


Although a $\gamma$ appears in the integration limit of the last integral, but if you apply Leibniz integral rule carefully, you can see directly bringing the differentiation into the integral would give the correct result.


I should have explicitly state that $\epsilon$ is to be taken the limit $\to 0^+$.

Also, it might be counterintuitive that the value of the integrand at a point does not affect the value of the integral.


Indeed, when decomposing your integral into partitions, I didn’t write out some integrals, whose absolute value is $$\vert\int^{a_j+\epsilon}_{a_j-\epsilon}f(s)ds\vert\le(a_j+\epsilon-(a_j-\epsilon))|\text{max}_{[a_j-\epsilon, a_j+\epsilon]}f(s)|=2\epsilon |\text{max}_{[a_j-\epsilon, a_j+\epsilon]}f(s)|$$ which vanishes in the limit, as long as the function is not infinite in the region.

  • $\begingroup$ So $a_i$ can be points where $f(a_i)\not=0$ (i.e. mass points) correct? $\endgroup$
    – user106860
    May 19, 2018 at 2:53
  • 1
    $\begingroup$ @user106860 As long as $\lim_{s\to a_i^+}F(s)\ne\lim_{s\to a_i^-}F(s)$, $a_i$ is a discontinuity. $\endgroup$
    – Szeto
    May 19, 2018 at 3:05
  • $\begingroup$ @Sveto but isn't this not counting $f(a_1), f(a_2),\dots f(a_k)$? $\endgroup$
    – user106860
    May 19, 2018 at 15:17
  • $\begingroup$ @user106860 Can you elaborate? I don’t really understand. $\endgroup$
    – Szeto
    May 19, 2018 at 15:18
  • $\begingroup$ Suppose $f$ is continuous and defined on $0,1$. Also suppose that $f(.5) =.2$. Then $F$ has a discontinuity is $.5$. Suppose this is the only discontinuity. If I use the method you wrote to calculate $F(.6)$, won't it be too low by $.2$ because your integral does not include the point $.5$ (i.e. you integrate below $.5-\epsilon$ and above $.5+\epsilon$, but not at $.5$) $\endgroup$
    – user106860
    May 19, 2018 at 15:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .