Which prior on precision implies half-normal prior on sd? I am using software (INLA) that parametrizes the normal distribution via mean and precision. I noticed that my results are notably influenced by the choice of prior on precision, but I have hard time building intuition about precision. Instead I'd like to put half-normal prior on the standard deviation (sd) as I have intuition about that.
So we have
$$
\tau = 1/\sigma^2 \\
\sigma \sim HalfN(0, a) 
$$
with he PDF being
$$
f_\sigma(y;a) = \frac{\sqrt{2}}{a\sqrt{\pi}}\exp \left( -\frac{y^2}{2a^2} \right)
$$
what is then the implied PDF $f_\tau$? Here's my attempt:
$$
F_\tau(y) = P(\tau \leq y) = P(\frac{1}{\sigma^2} \leq y) = P(\sigma \geq \sqrt{1/y}) = 1 - P(\sigma < \sqrt{1/y}) = \\ = 1 - F_\sigma(\sqrt{1/y})
$$
so we have
$$
f_\tau(y) = \frac{d}{dy} F_\tau(y) = - f_\sigma(\sqrt{1/y};a)(-\frac{1}{2}y^{-\frac{3}{2}}) = \\
= \frac{1}{2}y^{-\frac{3}{2}}\frac{\sqrt{2}}{a\sqrt{\pi}}\exp \left( -\frac{1}{2 y a^2} \right) = \\
= \frac{y^{-\frac{3}{2}}}{a\sqrt{2\pi}}\exp \left( -\frac{1}{2 y a^2} \right)
$$
Is that correct?
A similar question is at
Defining prior on variance and not precision but it has no complete answer.
 A: You are correct; here's a similar way to show it. The half-normal prior on the standard deviation $\sigma$ (with scale $a$) is:
$$p_\sigma(\sigma) =
\frac{\sqrt{2}}{a \sqrt{\pi}} \exp \left( -\frac{\sigma^2}{2 a^2} \right)$$
The precision $\tau$ is related to the standard deviation as:
$$\tau = g(\sigma) = \frac{1}{\sigma^2}$$
Since this is an invertible transformation (note that $\sigma$ and $\tau$ are non-negative), the prior on the precision can be found by applying the standard change of variables formula:
$$\begin{eqnarray}
  p_\tau(\tau) & = &
  p_\sigma \big( g^{-1}(\tau) \big) \left| \frac{d}{d\tau} g^{-1}(\tau) \right| \\
  & = & p_\sigma(\tau^{-\frac{1}{2}})
  \left| \frac{d}{d\tau} \tau^{-\frac{1}{2}} \right| \\
  & = & \frac{1}{2} \tau^{-\frac{3}{2}} p_\sigma(\tau^{-\frac{1}{2}})
\end{eqnarray}$$
Plugging in the formula for $p_\sigma(\cdot)$ yields the same answer you found:
$$p_\tau(\tau) =
\frac{1}{a \sqrt{2 \pi}} \tau^{-\frac{3}{2}}
\exp \left( -\frac{1}{2 a^2 \tau} \right)$$
This is an inverse gamma distribution with shape parameter $\frac{1}{2}$ and scale parameter $\frac{1}{2 a^2}$
