The below problem is from an old PhD qualifying exam in our department. My own solution below is time-consuming and quite possibly wrong. It also relies on recognizing a less common distribution, so I wonder: is there a faster way to solve this problem, and how is that done? I suspect there are applicable theorems about Bayes estimators that I don't know about or have forgotten.
Problem
Given $\theta >0$, let $Y_1,\dots, Y_n$ be iid from the distribution with density
$$ f(y\mid \theta ) = I_{y>0}c\sqrt{\theta}\exp\{-\theta y^2 / 2\}, $$ where $c=(2\pi)^{-1/2}$. Suppose the loss function for estimating $f(0\mid \theta) = c\sqrt{\theta}$ is given by $L(\delta,c\sqrt{\theta}):=(\delta-c\sqrt{\theta})^2/(c\sqrt{\theta})^2$ and the prior on $\theta$ is the gamma distribution with parameters $\alpha>1,\beta>0$.
My solution
Let $\gamma = f(0\mid\theta)$. Then $$f(\mathbf{y}\mid\gamma)= \gamma^n \exp\{-\gamma^2 \sum_i y_i^2/(2c^2)\}$$ and by a density tranform with Jacobian $2\gamma$ we get
$$p(\gamma)\propto \gamma^{2\alpha - 1}\exp\{ -\beta \gamma^2 / c^2\},$$
so that
$$p(\gamma\mid \mathbf{y}) \propto \gamma^{n+2\alpha-1}\exp{\{-\gamma^2[\beta/c^2 + \mathbf{y'y}/(2c^2)] \}}.$$ Now minimizing $\mathbb E L(\delta, \gamma)$ under this posterior w.r.t. $\delta$ is equivalent to minimizing $\mathbb E (\delta-\gamma)^2$ (i.e. results in the same objective function) under the posterior
$$ p(\gamma\mid \mathbf{y}) \propto \gamma^{n+2\alpha-3}\exp{\{-\gamma^2[\beta/c^2 + \mathbf{y'y}/(2c^2)] \}}. $$
We know that setting $\delta = \mathbb E (\gamma \mid \mathbf y)$ solves such a problem. We also recognize the latest posterior as a generalized Gamma with parameters (following Wikipedia's notation) $d=n+2\alpha - 2, p = 2, 1/a = \sqrt{\beta/c^2 + \mathbf{y'y}/(2c^2)}$. The mean of the generalized gamma is $a\Gamma((d+1)/p)/\Gamma(d/p)$, and we are done.