TITLE: Why do distribution functions have Leibniz rule?
QUESTION [5 upvotes]: Suppose I have two distribution functions $f, g: \mathbb{R} \rightarrow [0,1]$, I.e. Non-decreasing, right continuous with $\underset{t\rightarrow \infty}{\lim} = 1, \underset{t\rightarrow - \infty}{\lim}= 0$.  Why does the measure given by the product of the distribution functions obey the Leibniz rule: $d(f\cdot g)=g df + f dg$?  By $df$ I mean the Borel measure given by assigning the measure $f(b)-f(a)$ to the interval $(a,b]$.

REPLY [3 votes]: Let $X$ have CDF  $F_X$. Then the integral  $\int h(x) d F_X(x)$ is to be understood as $E [ h(X)]$. 
Now suppose that $X$ and and $Y$ are independent with CDF $F$ and $G$ respectively. Then $Z= \max (X,Y)$ has CDF $FG$. Thus, 
$$ \int h(z) d FG (z) = E [ h(Z) ] .$$ 
Now 
\begin{align} 
E [ h(Z) ] &=  E [ h(X), Y\le X]+ E [ h(Y) ,X < Y]  
\end{align}
Conditioning on $X$, then taking expectation, we have
$$E [ h(X) ,Y \le X] = E [ h(X)G(X)] .$$ 
Similarly, 
$$E [ h(Y),X<Y] = E[h(Y) F(X-)],$$ 
where $F(x-)$ is the limit from the left of $F$ at $x$.  
Rewriting the above expectations as integrals we obtain 
$$ \int h(z) d FG(z) = \int h(z)G(z) d F(z) + \int h(z) F(z-) d G(z).$$ 
Thus, 
$$ d FG (z) = G(z) d F(z)+ F(z-) d G(z).$$
If $F$ is continuous, then $F(z-)=F(z)$. 
Note. The same argument with roles of $X$ and $Y$ interchanged gives  
$$ d FG (z) =   F(z) d G(z)+ G(z-) d F(z).$$
Therefore whenever $F$ or $G$ are continuous, we have
$$ d FG (z) =  F(z) d G(z) + G(z) d F(z).$$ 
Finally, exercise: what is the meaning of the left limit ? When does it actually matter ?