Bayes estimator under weighted absolute loss (source code)

= Bayes estimator under weighted absolute loss
{c}
{title2=$a\in\operatorname{Median}(w(\theta)\pi(\theta\mid x))$}

= Weighted posterior median
{synonym}

For loss $L(\theta,a)=w(\theta)|\theta-a|$, assume $w\geq0$, $0<\mathbb E[w(\Theta)\mid x]<\infty$ and $\mathbb E[w(\Theta)|\Theta|\mid x]<\infty$. The <posterior expected loss> is a positive constant times <absolute-error loss> under the <posterior distribution> reweighted by $w$. Thus its minimizers are the <medians> of that weighted <posterior distribution>. More precisely, the weighted <cumulative distribution function> $F_w$ satisfies $F_w(a^-)\leq1/2\leq F_w(a)$; the one-sided slopes of the convex loss give this condition.

For relative absolute loss on positive parameters, $w(\theta)=1/\theta$. With a <gamma distribution> posterior of shape two and rate $b>0$, reweighting produces an <exponential distribution> of rate $b$, so the estimate is $(\log2)/b$. The weighted first-moment condition ensures finite loss; without it every finite action can have infinite loss, making a median characterization uninformative.