# Half-t distribution from inverse gamma hierarchical model

If $$\sigma^2$$ is generated from:

$$a\sim$$ inv-Gamma$$(\alpha=1/2, \lambda = 1/A^2)$$

$$\sigma^2|a \sim$$ inv-Gamma$$(\alpha=v/2, \lambda = v/a)$$

Show $$\sigma$$ has a marginal half-t distribution with pdf $$f(\sigma)\propto \left(1 + (\sigma/A)^2/v\right)^{1/2}$$

Attempt: \begin{align} f(\sigma^2) &= \int_0^\infty f(\sigma^2,a) da\\ &\propto (\sigma^2)^{-v/2-1}\int_0^\infty a^{-1/2-1}e^{-\frac{1}{a}\frac{\sigma^2+vA^2}{\sigma^2A^2}} \: da\\ &= (\sigma^2)^{-v/2-1} \frac{\Gamma(1/2)}{\left(\frac{\sigma^2+vA^2}{\sigma^2A^2}\right)^{1/2}}\\ &\propto (\sigma^2)^{-v/2-1} \left(\frac{\sigma^2A^2}{\sigma^2+vA^2}\right)^{1/2}\\ \end{align} and from here I'm stuck.

For the sake of clarity, define $$\varsigma = \sigma^2$$. Next, recall that the inverse gamma distribution has PDF $$f_X(x) = \frac{(\lambda/x)^\alpha e^{-\lambda/x}}{x \Gamma(\alpha)}, \quad x > 0.$$ So we have $$f(a) = \frac{\exp(-(A^2 a)^{-1})}{A a^{3/2} \Gamma(1/2)}$$ and $$f(\varsigma \mid a) = \frac{v^{v/2}\exp(-v/(a \varsigma))}{a^{v/2} \varsigma^{1+v/2} \Gamma(v/2)}.$$ The joint distribution of $$(\varsigma, a)$$ is therefore proportional to $$f(\varsigma, a) \propto \frac{\exp\left(-\frac{1}{a} \bigl(\frac{1}{A^2} + \frac{v}{\varsigma}\bigr)\right)}{a^{(3+v)/2} \varsigma^{1+v/2}}.$$ You seem to be missing a factor of $$a^{v/2}$$. Let $$K = \frac{1}{A^2} + \frac{v}{\varsigma}$$; then with the substitution $$u = K/a, \quad a = Ku^{-1}, \quad da = -Ku^{-2} \, du,$$ we have \begin{align*} \int_{a = 0}^\infty a^{-(3+v)/2} e^{-K/a} \, da &= K^{-(3+v)/2} \int_{u=\infty}^0 u^{(3+v)/2} e^{-u} (-Ku^{-2}) \, du \\ &= K^{-(1+v)/2} \int_{u=0}^\infty u^{(v-1)/2} e^{-u} \, du \\ &= K^{-(1+v)/2} \Gamma\left(\frac{v+1}{2}\right). \end{align*} It follows that $$f(\varsigma) \propto K^{-(1+v)/2} \varsigma^{-1-v/2}.$$ We then perform the transformation $$\sigma = \sqrt{\varsigma}$$, giving \begin{align*} f(\sigma) &= 2\sigma f_\varsigma(\sigma^2) \\ &\propto \sigma \left(\frac{1}{A^2} + \frac{v}{\sigma^2}\right)^{-(1+v)/2} \sigma^{-2-v} \\ &= \frac{1}{\sigma^{v+1}} \left(\frac{\sigma^2 + A^2 v}{A^2 \sigma^2}\right)^{-(1+v)/2} \\ &= \left(\frac{\sigma^2}{A^2} + v\right)^{-(1+v)/2} \\ &= v^{-(1+v)/2} \left(1 + \frac{(\sigma/A)^2}{v} \right)^{-(1+v)/2} \\ &\propto (1 + (\sigma/A)^2/v)^{-(1+v)/2} \end{align*} as claimed. Note there is a typographical error in your question; the exponent is missing a $$v$$. This is the kernel of a scale-transformed, half-Student $$t$$ with $$v$$ degrees of freedom. In particular, it is the density of $$\sigma = |AT|$$, where $$T \sim \operatorname{StudentT}(v)$$.
• thank you I see where I was wrong now. I left out a factor of $(v/a)^{v/2}$ Jun 1, 2020 at 2:49