# Calculating the Bayes estimator given prior $\pi (\theta) = \theta^{-2}e^{-1/\theta}$?

Let $$[X_i|\theta] \sim N(0,\theta)$$ and suppose $$\theta$$ has prior distribution:

$$\pi(\theta) = \theta^{-2}e^{-1/\theta}$$

I want to find the Bayes estimator of $$\theta$$ under square error loss, which I know is given by the posterior mean $$E[\theta |X]$$. The problem I am having is how to evaluate this expectation. Multipling the above densities we have that the joint density $$(X,\theta)$$ is given by

$$f(X,\theta) = (2\pi)^{-n/2}\theta^{-n/2-2}\exp \{\frac{-1}{2\theta^2}\sum_{i=1}^n X_i^2 -\frac{1}{\theta} \}$$

But I'm unsure how to proceed further. I know I need to integrate out $$\theta$$ to obtain the marginal distribution, but I am unsure how to integrate this?

I tried doing integration by parts but just got lost in the process.

• 0. Assume that $\theta$ in the first equation is a variance not a standard deviation. 1. Identify the standard posterior in $\theta$ [or $1/\theta$] from the joint; 2. compute the expectation. – Xi'an May 26 at 15:59
• @Xi'an thanks! I just assumed it was SD. Much appreciated – Xiaomi May 27 at 0:52