Let $X_1,...,X_n$ be a random sample from a $n(\theta,\sigma^2)$ population, and suppose that the prior distribution on $\theta$ is $n(\mu,\tau^2)$. Here we assume that $\sigma^2,\mu,\tau^2$ are all known. Show that $m(\bar{x}|\sigma^2,\mu,\tau^2)$, the marginal distribution of $\bar{X}$, is $n(\mu, (\sigma^2/n)+\tau^2)$.
I am trying to solve this question by MGF. The general mgf of normal distribution is $M_X(t)=exp(t\mu+\frac{1}{2}t^2 \sigma^2)$.
Hence, the mgf of $\bar{X}$ is $exp(\bar{x}\theta+\frac{1}{2}\bar{x}^2 \sigma^2/n)$.
The mgf of $\theta$ is $exp(\theta \mu+\frac{1}{2}\theta^2 \tau^2)$.
I assume the mgf of the marginal distribution of $\bar{X}$ is $\int exp(\bar{x}\theta+\frac{1}{2}\bar{x}^2 \sigma^2/n) exp(\theta \mu+\frac{1}{2}\theta^2 \tau^2) d\theta$? Am I correct? If yes, how to simplify this integral?
Interesting problem.
First observe that $(\overline{X}_n|\theta)\sim N\left(\theta;\frac{\sigma^2}{n}\right)$
To show that, marginally, $\overline{X}_n\sim N\left(\mu;\frac{\sigma^2}{n}+\tau^2\right)$, let's set
$$Y=\overline{X}_n-\theta$$
and observe that, $\forall \theta$, the conditional rv $(Y|\theta)\sim N\left(0;\frac{\sigma^2}{n}\right)$ thus $Y\perp\!\!\!\perp\theta$ ($Y$ is independent from $\theta$) and thus it results that
$$\overline{X}_n=Y+\theta$$
is the sum of 2 independent Gaussians and for this reason its distribution is still normal with mean $0+\mu=\mu$ and variance $\frac{\sigma^2}{n}+\tau^2$, that is:
$$\overline{X}_n\sim N\left(\mu;\frac{\sigma^2}{n}+\tau^2\right)$$