# What is the “Monte Carlo” part in MCMC algorithms like Metropolis-Hastings and Gibbs sampling?

I know that Monte Carlo is used to approximate an integral by sampling. I also learnt MCMC algorithms such as Metropolis-Hastings and Gibbs sampling but I don't know where the "Monte Carlo" part is in those algorithms. Those algorithms are just sampling.

• en.wikipedia.org/wiki/Monte_Carlo_method Monte Carlo methods are just sampling, usually with the goal of using certain facts about how the sampling was conducted to draw inferences about a problem that would be challenging to solve directly. – Sycorax Sep 25 '19 at 12:57
• @Sycorax Thank you for the answer. There is only one thing that is confusing to me. Does "Monte Carlo" concern itself with "APPROXIMATING an integral (given that we know how to sample from the distribution)" or "SAMPLING from an unknown weird distribution"? I am asking because I saw some sources on the internet that say that Monte Carlo is an approximation technique. – floyd Sep 25 '19 at 17:52
• Monte Carlo methods include both. On the page that I linked, the experiment about approximating $\pi$ can also be viewed as a MC method to approximate an integral (the area of the circular section). And one application of MC for Bayesian statistics is sampling from an inconvenient target distribution. – Sycorax Sep 25 '19 at 18:53