I was looking at the Gibbs Sampler when I stumbled upon the following example:
Suppose $y = (y_{1}, y_{2}, \ldots, y_{n})$ are iid observations from an $N(\mu, \tau^{-1})$
Furthermore, suppose there exists prior information on $\mu$ and $\tau$ indicating that they are independent and that $\mu$ follows an $N(\mu_{0}, \sigma_{0}^{2})$ distribution while $\tau$ follows a $\text{Ga}(\alpha_{0}, \beta_{0})$ distribution.
For this example,
$$ p(\mu, \tau|y_{1}, y_{2}, \ldots, y_{n}) \propto f(y|\mu, \tau)p(\mu, \tau)$$
Also,
$$ p(\mu|\tau, y) \sim N(\frac{n\bar{y}\tau+\mu_{0}\tau_{0}}{n\tau+\tau_{0}}, (n\tau+\tau_{0})^{-1}) $$
where $\tau_{0} = (\sigma_{0}^{2})^{-1}$
and
$$ p(\tau|\mu, y) \sim \text{Ga}(\alpha_{0}+\frac{n}{2}, \beta_{0}+\frac{S_{n}}{2}) $$
where $S_{n} = \sum_{i=1}^{n}(y_{i}-\mu)^{2}$
Because it is not easy to compute directly from this distribution, the Gibbs sampler can be used provided the conditional distributions are known.
Could anybody demonstrate how (provide the derivations for) the conditional distributions ($p(\mu|\tau, y)$ and $p(\tau|\mu, y)$) given above?
EDIT:
For example, to achieve $p(\mu|\tau, y)$, is the following valid?
$$ p(\mu|\tau, y) \propto p(\tau, y|\mu)p(\mu)$$
If so, what form will $p(\tau, y|\mu)$ have?