Assume that we know that data $X$ is generated i.i.d. by a normal distribution with mean $\mu$, variance $\sigma^2$. That is, for each $x_i\in X$, we have $p(x_i|\mu,\sigma^2)=n(\mu,\sigma^2)$, and these distributions for the $x_i$'s are i.i.d.
My question is:
How do we analytically solve for $$p(x_{n}|X_n)$$
Where $X_n=x_0,...x_{n-1}$.
I have used the sum and product rule and Bayes rule to expand it into:
$$\int_{-\infty}^\infty \int _0 ^\infty p(x_n|\mu, \sigma^2)p(\mu, \sigma^2) \frac {p(X_n|\mu,\sigma^2)} {p(X_n)}d\sigma^2d\mu$$
I don't know how to solve this. A subquestion is: what would be the prior $p(\mu, \sigma^2)$ that would make this most tractable? Can we assume a normal prior of $\mu$ and an exponential prior of $\sigma^2$? would that help?
My question is: How do we solve this for a closed form solution? Is there such a solution?
Bonus Question: Is there a computer program we can use to solve for a closed form solution to this?