The question

Given independent random variables $$X_1,\cdots,X_n \sim N(\theta,\phi)$$

with joint prior density $$\pi(\theta,\phi)\propto \frac1\phi$$

Show that the posterior distribution of $t(\theta)=\frac{\sqrt n}{s}(\theta - \bar x)$ follows a $t$-distribution

What I have done so far

I have found the posterior density to be

$$\pi(\theta,\phi | \vec x ) \propto \phi^{-\frac n2-1} \exp \biggl [-\frac{1}{2\phi}\biggl((n-1)s^2+n(\bar x-\theta)^2\biggr)\biggr] $$

where $$s^2=\frac{1}{n-1}\sum_{i=1}^{n}(x_i-\bar x)^2$$

Integrating over $\phi \in (0,\infty)$ with reference to the Inverse Gamma distribution, we get the marginal distribution of $\theta$

$$\pi(\theta|\vec x) \propto \biggl(\frac{2}{(n-1)s^2+n(\bar x-\theta)^2}\biggr)^{n/2}$$

And then I am stuck...

For reference

The posterior density $\pi(\theta,\phi|\vec x)$ is certainly correct because it was given in the question.

Inverse gamma distribution with parameters $(\alpha,\beta)$:

$$f(y)=\frac{\beta^\alpha}{\Gamma(\alpha)y^{\alpha+1}}e^{-\beta/y} \; \; \; \; \; y>0$$

$t$-distribution with parameter $r$:

$$f(y) \propto \biggl(1+\frac{y^2}{r}\biggr)^{-\frac{r+1}{2}} \; \; \; \; y \in \Bbb R$$

  • $\begingroup$ Don't you want to use $\propto$ instead of $\alpha$? $\endgroup$ – Przemysław Scherwentke Mar 30 '18 at 13:49
  • $\begingroup$ How did u make that symbol? $\endgroup$ – glowstonetrees Mar 30 '18 at 13:50
  • $\begingroup$ You may want to consider using propto ($\propto$) or varpropto ($\varpropto$). detexify is useful in these matters. $\endgroup$ – user228113 Mar 30 '18 at 13:50
  • $\begingroup$ @glowstonetrees Backslash propto. $\endgroup$ – Przemysław Scherwentke Mar 30 '18 at 13:50

Suppose we know the density function $f_x$ of a random variable $X$, we can work out the density function of $Y = a(X - b)$ for constants $a$ and $b$. If $F_X$ denotes the distribution function of $X$, i.e. $F(x) = P(X \leq x)$ then $$ F_Y(y) = P(a(X - b) \leq y) = P\left(X \leq \frac{1}{a}y + b\right) = F_X\left(\frac{1}{a}y + b\right) $$ Then $f_X(x) = F'_X(x)$ therefore $f_y(y) = \frac{1}{a} f_x\left(\frac{1}{a} y + b \right)$

In your case $X = \theta$ and $Y = t(\theta) = \frac{\sqrt{n}}{s}(X - \bar{x})$. So plugging $\frac{s}{\sqrt{n}}y + \theta$ into $\pi(\theta \mid \vec{x})$ and simplifying gives $$ f_{Y}(y \mid \vec{x}) \propto \left( \frac{(n-1)s^2 + n(\bar{x} - \frac{s}{\sqrt{n}} y - \bar{x})^2 }{2} \right)^{\frac{-n}{2}} \propto \left( 1 + \frac{y^2}{n-1} \right)^{\frac{-n}{2}}$$ So in fact $t(\theta)$ follows a $t$ distribution on $n - 1$ degrees of freedom.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.