Skip to contentScholarGate
LibraryBookshelfDeskReview StudioAssistant
Sign in
On this page
IntuitionHow it worksWhen to use itStrengths & limitationsCommon pitfallsApplicationsFrequently asked🔒 Read the full methodSourcesRelated methods
Cite this pageSpotted an issue on this page? Report or suggest a fix →
Home›Bayesian›Markov Chain Monte Carlo (MCMC)
Bayesian methods

Markov Chain Monte Carlo (MCMC)

Markov Chain Monte Carlo · Also known as: markov chain monte carlo, MCMC sampling, MCMC (Markov Zinciri Monte Carlo)

Markov Chain Monte Carlo (MCMC) is a family of computational algorithms for sampling from complex probability distributions, most commonly the posterior distributions that arise in Bayesian inference. Rather than computing posteriors analytically — which is rarely possible for realistic models — MCMC constructs a Markov chain whose stationary distribution is the target posterior and draws dependent samples from it, enabling full probabilistic inference for virtually any model.

ScholarGate
  1. Bayesian methods
  2. v1
  3. 2 Sources
  4. PUBLISHED
Cite this page →
Tools & resources
Download slides
Learn & explore

Read the full method

Members only

Sign in with a free account to read this section.

Sign in

Method map

The neighbourhood of related methods — select a node to explore.

MCMC
Bayesian Model AveragingBayesian RegressionVariational InferenceAutomatic Differentiatio…Bayes Factor TestBayesian ANOVABayesian Factor AnalysisBayesian Hierarchical Mo…Bayesian Inference with…Bayesian Linear Regressi…

+25 more

When to use it

MCMC is the standard tool for Bayesian inference whenever the posterior has no closed form — that is, whenever the model is not conjugate or is genuinely complex (hierarchical structure, non-linear relationships, heavy-tailed distributions). A minimum sample of about 20 observations is needed for the chains to have a signal to converge on; below that, the posterior is dominated by the prior and the samples carry no information about the data. It applies to continuous, binary, and categorical outcomes across cross-sectional and longitudinal designs.

Strengths & limitations

Strengths
  • Samples from virtually any posterior regardless of the model's complexity or dimensionality.
  • Provides the full posterior distribution, not just a point estimate, so uncertainty is explicitly quantified.
  • Does not require normality of the data or the outcome — applicable to hierarchical, non-linear, and non-standard models.
  • Posterior samples can be used directly for any derived quantity (differences, ratios, predictions) without additional approximation.
Limitations
  • Requires specifying a model and priors; misspecified priors can dominate the posterior, especially when the sample is small.
  • Convergence is not guaranteed and must be diagnosed explicitly through R-hat, ESS, and trace-plot inspection.
  • Computationally intensive for large datasets or high-dimensional parameter spaces compared to frequentist alternatives.
  • With fewer than 20 observations, chains may fail to converge and the posterior simply reflects the prior rather than the data.

Frequently asked

How do I know when the MCMC chains have converged?

The primary diagnostic is R-hat (potential scale reduction factor): values below about 1.1 — and ideally below 1.01 — indicate that multiple chains have mixed and are sampling from the same distribution. You should also check the effective sample size (ESS), which should be large enough (typically at least a few hundred per parameter) to give stable estimates, and visually inspect trace plots to confirm that chains are mixing freely without trends or sticking.

What is the difference between Metropolis-Hastings and Hamiltonian Monte Carlo (HMC/NUTS)?

Metropolis-Hastings proposes new parameter values from a simple proposal distribution and accepts or rejects them based on the likelihood-prior ratio; it is general but can be slow to explore high-dimensional posteriors. HMC uses gradient information from the log-posterior to simulate physical dynamics that guide proposals toward high-probability regions, making large, distant steps that are still accepted at high rates. NUTS is a self-tuning version of HMC that removes the need to set the number of leapfrog steps manually.

How many iterations do I need?

There is no universal answer, but a common starting point is a warm-up (tuning) phase of 1,000 iterations followed by 2,000 or more sampling iterations per chain, run across at least four chains. What matters is not the raw count but whether the ESS is adequate and R-hat is below 1.1. Complex or high-dimensional models typically need more iterations.

Can MCMC be used when my data are not normally distributed?

Yes — one of MCMC's principal advantages is that it does not require the data or the outcome to be normally distributed. You specify the likelihood that matches your data type (Poisson for counts, Bernoulli for binary outcomes, Student-t for heavy tails, etc.) and MCMC samples from the resulting posterior regardless of its shape.

Sources

  1. Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A. & Rubin, D. B. (2013). Bayesian Data Analysis (3rd ed.). CRC Press. ISBN: 978-1439840955
  2. Brooks, S., Gelman, A., Jones, G. & Meng, X.-L. (Eds.). (2011). Handbook of Markov Chain Monte Carlo. CRC Press. ISBN: 978-1420079418

How to cite this page

ScholarGate. (2026, June 1). Markov Chain Monte Carlo. ScholarGate. https://scholargate.app/en/bayesian/mcmc

Related methods

Bayesian Model AveragingBayesian RegressionVariational Inference

Which method?

Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.

  • Bayesian Model AveragingBayesian↔ compare
  • Bayesian RegressionBayesian↔ compare
  • Variational InferenceBayesian↔ compare
Compare side by side →

Referenced by

Automatic Differentiation Variational InferenceBayes Factor TestBayesian ANOVABayesian Factor AnalysisBayesian Hierarchical ModelBayesian Inference with Measurement ErrorBayesian Linear RegressionBayesian Logistic RegressionBayesian Model AveragingBayesian Model Averaging with Measurement ErrorBayesian NetworkBayesian Nonparametric MethodsBayesian RegressionBayesian SEMBayesian Structural Time SeriesConjugate Prior AnalysisDirichlet Process Mixture ModelEmpirical BayesExpectation PropagationGibbs SamplingHamiltonian Monte CarloHierarchical Bayesian InferenceHierarchical Hamiltonian Monte CarloHierarchical Variational InferenceLaplace ApproximationMCMC for Model ComparisonMCMC with Measurement ErrorMultilevel Bayesian InferenceNo-U-Turn SamplerParticle FilterRobust Bayesian Model AveragingRobust Markov chain Monte CarloSequential Monte CarloSlice SamplingVariational Inference

Similar methods

Markov Chain Monte CarloMetropolis-Hastings AlgorithmGibbs SamplingRobust Markov chain Monte CarloMultilevel Metropolis-HastingsHierarchical Markov Chain Monte CarloMultilevel MCMCMCMC with missing data

Related reference concepts

Markov Chain Monte CarloBayesian Computation and MCMCMarkov Chain Monte CarloMetropolis-Hastings AlgorithmGibbs SamplingGibbs Sampling (Statistical Computing)

Spotted an issue on this page? Report or suggest a fix →

ScholarGate — MCMC (Markov Chain Monte Carlo). Retrieved 2026-07-21 from https://scholargate.app/en/bayesian/mcmc · Dataset: https://doi.org/10.5281/zenodo.20539026
Quick facts
Family
Bayesian
Type
Posterior sampling algorithm
Purpose
prediction / exploration
Var Types
continuous / binary / categorical
Min Sample
20
Requires Normality
No
Convergence Diagnostic
R-hat < 1.1
Outputs
posterior samples / credible intervals
Related methods
Bayesian Model AveragingBayesian RegressionVariational Inference
ScholarGate

A content-first reference library for research methods — what each one is, how it works, and where it comes from.

Open data (CC-BY)

Explore

  • Library
  • Search the library…
  • Browse by field
  • Fields
  • Journey
  • Compare
  • Which method?

Reference

  • Subjects
  • Atlas
  • Glossary
  • Methodology
  • Philosophy

Your tools

  • Bookshelf
  • Desk
  • Chat

Company

  • About
  • Pricing
  • Contact
  • Suggest a method

Entries are compiled from published sources for reference. Verifying the accuracy and suitability of any information for your own use remains your responsibility.

© 2026 ScholarGate · A research-method reference library
  • Privacy
  • Cookies
  • Terms
  • Delete account