Gibbs Sampling algorithm and some examples