# Predictive Posterior Distribution of Normal Distribution with Unknown Mean and Variance

Suppose that $$x_{i}|\mu,\sigma^{2} \sim \mathcal{N}(\mu,\sigma^{2})$$ for $$i = 1,...n$$. Assume that the assigned prior distributions are $$\mu$$ ~ $$\mathcal{N}$$($$\mu_{0}$$, $$\sigma^{2}_{0}$$) and $$\tau \sim Gamma(ξ_{0}, ξ_{0})$$ with $$\tau = \frac{1}{\sigma^{2}}$$

I have derived that the joint posterior distribution of $$\mu$$ and $$\tau$$, $$p(\mu,\tau|\mathbf{x})$$, where $$\mathbf{x}$$ is $$x_{1},x_{2},...,x_{n}$$, is $$p(\mu,\tau|\mathbf{x})\propto \tau^{\frac{n}{2}+ξ_{0}-1}exp(-\tauξ_{0})exp\{-\frac{1}{2}\tau\sum_{i=1}^{n}(x_{i}-\mu)^2-\frac{1}{2\sigma_{0}^{2}}(\mu-\mu_{0})^2\}$$

and the full conditional distributions of $$\mu$$ and $$\tau$$ , $$p(\mu|\tau, \mathbf{x})$$ and $$p(\tau|\mu, \mathbf{x})$$ as $$p(\mu|\tau, \mathbf{x}) \sim \mathcal{N}(\frac{\tau n\bar{x}\sigma_{0}^2+\mu_{0}}{n \tau\sigma_{0}^2+1} , \frac{\sigma_{0}^{2}}{n \tau\sigma_{0}^{2}+1})$$ $$p(\tau|\mu, \mathbf{x}) \sim Gamma(\frac{n}{2}+ξ_{0},\frac{\sum_{i=1}^{n}(x_{i}-\mu)^2}{2}+ξ_{0})$$ where $$\bar{x} = \frac{\sum_{i=1}^{n}x_{i}}{n}.$$ Now I have to derive the posterior predictive distribution $$p(\tilde{x}|\mathbf{x})$$, by definition $$p(\tilde{x}|\mathbf{x}) = \int\int p(\tilde{x}|\mu,\tau) p(\mu,\tau|\mathbf{x}) d\tau d\mu$$ The problem is I am not quite sure about the exact density of $$p(\mu,\tau|\mathbf{x})$$. I didn't think it is a Normal-Gamma distribution since it carries the term $$exp\{-\frac{1}{2\sigma_{0}^{2}}(\mu-\mu_{0})^2\}$$ which is without $$\tau$$. Hence I couldn't proceed with the integration.  Can someone show me the steps to obtain the posterior predictive distribution $$p(\tilde{x}|\mathbf{x})$$? Or correct any mistakes I have committed? Much appreciated!