# Using Leibniz integral rule when minimizing Expected Absolute Loss [duplicate]

Consider choosing $$\theta^*$$ that minimizes the expected absolute loss:

\begin{align} \tag{1} \int_{\Theta}|\theta-\theta^*|\pi(\theta|\mathbf{x})d\theta= \int_{-\infty}^{\theta^*}(\theta^*-\theta)\pi( \theta|\mathbf{x})d\theta+\int_{\theta^*}^{\infty}(\theta-\theta^*)\pi(\theta|\mathbf{x})d\theta \end{align}

Differentiating with respect to $$\theta^*$$ and equating to zero yields: \begin{align} \tag{2} \int_{-\infty}^{\widehat{\theta^*}}\pi(\theta|\mathbf{x})d\theta = \int_{\widehat{\theta^*}}^{\infty}\pi(\theta|\mathbf{x})d\theta \end{align}

EDITED:

I'm confused about the step taken from (1) to (2), which can be found on p. 12 (94) in online notes (Note: I replaced $$\delta(\mathbf{x})$$ by $$\theta^*$$) . A more detailed insight will be highly appreciated. My understanding is that it makes use of Leibniz rule. Here $$\widehat{\theta^*}$$ is the Bayes estimate (which turns out to be the median of $$\pi(\theta|\mathbf{x})$$), an argument that minimizes (1).

## marked as duplicate by Xi'an bayesian StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Nov 7 '18 at 19:48

• Could you explain what kind of mathematical object you mean by "$\delta$"? If it's not a number (the notation suggests it might be a function), could you further tell us what you mean by "differentiating" with respect to it would be? – whuber Nov 7 '18 at 17:39
• @AlexMe You can avoid the Leibniz rule if you write $\int_{-\infty}^t(t-x)\pi(x)\,dx=t\int_{-\infty}^t \pi(x)\,dx -\int_{-\infty}^t x\,\pi(x)\,dx$. Then differentiate the first piece using the product rule, and the second piece using FTC. – grand_chat Nov 7 '18 at 22:25