I am trying to solve the following problem:
Given $n$ independent observations $Y_i$ from a Normal$(\theta, \tau^{-1})$ distribution with unknown mean $\theta$ and unknown precision $\tau$, i.e
$$Y_i \approx Normal(\theta, \tau^{-1}) \ , \ i = {1, ..., n}$$
Assume for $\theta$ and $\tau$ the following non-informative priors:
$$\theta \approx Normal(0,10^6) $$ $$\tau \approx Gamma(0.001,0.001) $$
Given $\textbf{y}$ is the observations $(y_1, ...,y_n)$. Derive two conditional distributions $p(\theta|\tau, y)$ and $p(\tau|\theta, y)$. One should be written as a normal distribution and the other as a Gamma distribution.
I have started by calculating $p(\theta|\tau, y)$ as:
$$ p(\theta|\tau, y) = p(\theta,\tau) \prod^{n}_{i=1} p(y_{i}|\theta, \tau) = \tau^{-1} \overbrace{\tau^{n/2}\exp[\frac{-\tau}{2} \sum^{n}_{i=1}(y_i - \theta)^2]}^{L(\theta,\tau;\textbf{y})} \\ = \tau^{\frac{n}{2} - 1} \exp [-\frac{\tau}{2} \sum^{n}_{i=1} (y_i - \bar{y} + \bar{y} -\theta)^2] \\ = \tau^{\frac{n}{2} - 1} \exp [-\frac{\tau(n-1)}{2} s^2 -\frac{\tau n}{2}(\bar{y} - \theta)^2 ] $$
In the last step $s = \frac{1}{n-1} \sum^{n}_{i=1} (y_{i} -\bar{y})^2$
I am new to Bayesian, not sure whether this is correct/best way to approach this question. Also I am unsure how could I find the other conditional distribution as Gamma Distribution.
My attempt at the derivation for the Gamma distribution is:
$$p(\tau|\theta,y) = p(\theta,\tau) p(y_{i}|\tau, \theta) \\ = \tau^{-1} \frac{y^{\theta}}{\Gamma(\theta)} \tau^{\theta -1} \exp^{-y \tau} $$
Thanks.