1. Introduction:
Gibbs Sampling is a MCMC method to draw samples from a potentially complicated, high dimensional distribution, where analytically, it’s hard to draw samples from it. The usual suspect would be those nasty integrals when computing the normalizing constant of the distribution, especially in Bayesian inference.
Gibbs Sampler can draw samples from any distribution, provided you have all of the conditional distributions of the joint distribution analytically.
2. Psudo-code:
3. Problem:
To use Gibbs Sampler to draw 10000 samples from a Bivariate Gaussian Distribution with
μ=[5,5],