Find posterior mean

2k Views Asked by At

I have this problem,

Let $X\sim U(0,\theta)$ with $\theta>0$. Assume a signal random sample $X$, the squared error loss, and the prior $\pi(\theta) = \exp(1)$ i.e.

$\pi(\theta) = \theta e^{-\theta}$ for $\theta>0$

(a) Find the posterior distribution of $\theta$.

(b) Show that the posterior risk of an estimate of $\hat{\theta}$ is given by $e^{x}\int_{x}^{\infty}(\hat{\theta}-\theta)^{2}e^{-\theta}\, d\theta$

(c) Find the posterior mean.

(d) Show that the result in (c) is the minimizer of posterior risk.

I've now completed parts (a) and (b), got that the prior distribution is $e^{x-\theta}$. Now when I go to find the posterior mean I get $e^{x}$, but when I compute the integral in part (b) and take derivative with respect to $x$, set to 0 and solve for $x$ I get an expression that is in terms of $\theta$ and $\hat{\theta}$. Obviously I'm getting radically different sorts of answers and so there's something very fundamental in what I'm doing wrong but I can't see it.