Exponential posterior for a uniform endpoint (source code)

= Exponential posterior for a uniform endpoint
{title2=$\theta\mid X=x\ \sim\ x+\operatorname{Exp}(1)$}

For one observation from a <continuous uniform distribution> on $[0,\theta]$ and prior density $\theta e^{-\theta}$, the likelihood cancels the factor $\theta$ and leaves $e^{-\theta}1_{\{\theta\ge x\}}$. Normalization gives posterior density $e^{-(\theta-x)}1_{\{\theta\ge x\}}$, for $x\ge0$. Its mean is $x+1$ and variance one. The <Bayes estimator under squared error loss> is therefore $x+1$, unchanged by multiplying the loss by a positive constant.