Abstract:Bayes statistics in a vacuum can be broadly applied to the fields of natural science, economics and so cial science, which benefits from the development of computer science and technology and Markov Chain Monte Carlo (MCMC) method. In this paper the application of MCMC method into Bayes inference was introduced, and independent sampling and random walk sampling of Metropolis-Hastings(M-H) algorithm were mainly discussed. The two sampling modes were readably programmed with Matlab, and their detailed implementation processes, merits and demerits were talked about. It was shown by present simulation that, the independent sampling mode is relatively easy to implement, but need the proposal distribution to be close to the posterior distribution; other wise, the calculation efficiency is low and the simulation effect is unsatisfactory. The random walk sampling mode don’t need the proposal distribution to approach the posterior distribution and its simulation results are satisfactory. Therefore, it overcomes the limitations of the independent sampling mode has more widespread ap plication.