This homework is about Metropolis-Hastings, Gibbs Sampling, derivation of update rules, modeling a given problem in terms of Probabilistic Graphical Model (PGM), and practically implementing a program to calculate the update step-by-step. Codes are included in the report.