If I have the following model:
$$y\sim N_n(X\beta, \sigma^2 I_n)$$ with prior distributions:
$$\beta\sim N_n(\beta_0, B_0)$$ and $$\sigma^2 \sim IG(\alpha_0/ 2, \delta_0/2)$$
What would be the posterior of $\theta=(\beta,\sigma^2)$?
If I have the following model:
$$y\sim N_n(X\beta, \sigma^2 I_n)$$ with prior distributions:
$$\beta\sim N_n(\beta_0, B_0)$$ and $$\sigma^2 \sim IG(\alpha_0/ 2, \delta_0/2)$$
What would be the posterior of $\theta=(\beta,\sigma^2)$?
The joint posterior is a Normal-Inverse Gamma, with parameters $(\mu_n, B_n, \alpha_n, \beta_n)$ where:
$$B_n = \frac{1}{B_{0}^{-1} + n}$$
$$\mu_n = B_n(B_0^{-1}\mu_0 + n\bar{x})$$
$$\alpha_n = \alpha_0 + \frac{n}{2}$$
$$\beta_n = \beta_0 + \frac{1}{2}[\mu_0^{2}B_0^{-1} + \sum_{i}x_{i}^{2} - \mu^{2}_nB_n^{-1}]$$
Deriving these parameters can be beastly (see here for more details). Usually people solve for the full conditionals of $\beta$ and $\sigma^{2}$ (they each take a more manageable closed form distribution) and use Gibbs sampling to find the posterior for each parameter.