Let \(X_1,X_2,\ldots ,X_n\) be a random sample from a \(N(\theta ,\sigma ^2)\) distribution (\(\sigma ^2\) known), and let the prior distribution of \(\theta \) be \(N(\mu _0,\sigma _0^2)\), where \(\mu _0\) and \(\sigma _0^2\) are known.
(a) Find the posterior distribution of \(\theta \).
(b) Find the Bayes estimator under squared error loss.