Integrating by parts with PDFs and CDFs (Differentiaing expected absolute loss function)

44 Views Asked by At

I'm trying to simplify $${d \over dd} \left[ \int _{- \infty}^d \theta \, f(\theta|x) \, d\theta \right]$$ but the answer simply shows:
$${d \over dd} \left[ \int _{- \infty}^d \theta \, f(\theta|x) \, d\theta \right]=d \, f(d|x)$$

I can easily show ${d \over dd} \left[ \int _{- \infty}^d f(\theta|x) \, d\theta \right]=f(d|x)$, which is given in the pre-amble to the question, but I must be missing something because I don't quite see a trivial way this leads to the answer (such that no working should be shown in the solution).

If I integrate by parts that presents the problem of dealing with $$\int_{-\infty}^d F(\theta|x) \, d\theta $$

Can anyone provide the necessary missing steps?

Thanks!

1

There are 1 best solutions below

0
On

We have that: \begin{equation} {d \over dd} \left[ \int _{- \infty}^d \theta \, f(\theta|x) \, d\theta \right] = \frac{d}{dd}[\int_{-\infty}^a\theta f(\theta|x)d\theta + \int_{a}^d \theta f(\theta|x)d\theta] ] \\ = \frac{d}{dd}[\int_{-\infty}^\infty\theta[\textrm{H}_a(\theta)-\textrm{H}_d(\theta)]f(\theta|x)d\theta] \end{equation}

For some $a \in \mathbb{R}<d$. Where $\textrm{H}_c(x)$ is the Heaviside step function with the switch at $c$.

Note that I dropped the first integral because it does not depend on $d$. Exchanging the integral and derivative we get:

\begin{equation} \frac{d}{dd}[\int_{-\infty}^\infty\theta[\textrm{H}_a(\theta)-\textrm{H}_d(\theta)]f(\theta|x)d\theta]= \int_{-\infty}^\infty\theta f(\theta|x)\frac{d}{dd}[\textrm{H}_a(\theta)-\textrm{H}_d(\theta)]d\theta \end{equation}

The derivative of the Heaviside function is a point mass at the argument. This gives us:

\begin{equation} \int_{-\infty}^\infty\theta f(\theta|x)\frac{d}{dd}[\textrm{H}_a(\theta)-\textrm{H}_d(\theta)]d\theta= \int_{-\infty}^\infty \delta_d(\theta) \theta f(\theta|x)d\theta\\ =df(d|x) \end{equation}

The last integral equality holds because $-\textrm{H}_d(\theta) = -I_{(\theta>d)} = I_{(\theta<d)}-1 = \textrm{H}_\theta(d)-1$. Taking the derivative of this gives us a point mass at $d$ (derivative of the Heaviside function).