← Back to AI Math Mind Map
中文·English
📐 AI MathID: mcmc

MCMC & Detailed Balance

MCMC 与细致平衡
🎯Core Definition
Markov Chain Monte Carlo (MCMC) builds a Markov chain whose stationary distribution is the target π\pi and samples along the chain. Metropolis-Hastings draws a candidate jj from a proposal q(j∣i)q(j \mid i) each step and accepts it with rate
📌Overview
α=min⁡(1,π(j) q(i∣j)π(i) q(j∣i)),\alpha = \min\Bigl(1, \frac{\pi(j)\, q(i \mid j)}{\pi(i)\, q(j \mid i)}\Bigr),
📌Overview
otherwise staying at ii. Writing r=π(j)q(i∣j)/(π(i)q(j∣i))r = \pi(j) q(i \mid j) / (\pi(i) q(j \mid i)): when r≥1r \ge 1, α(i,j)=1\alpha(i,j) = 1 and the reverse acceptance is 1/r1/r, so pointwise substitution yields the detailed balance of the MH chain, π(i)q(j∣i)α(i,j)=π(j)q(i∣j)α(j,i)\pi(i) q(j \mid i) \alpha(i,j) = \pi(j) q(i \mid j) \alpha(j,i), hence π\pi is stationary; moreover π\pi only needs to be known up to a constant (it cancels in the ratio). Gibbs sampling is a special case: each step updates one coordinate xkx_k by drawing from the conditional π(xk∣x∖k)\pi(x_k \mid x_{\setminus k}), whose definition forces the acceptance rate to be 1 — no rejection needed.
💡Use Cases
Bayesian posterior inference, latent-variable models (LDA, Gaussian mixtures), sampling high-dimensional joint distributions; interviews often ask to derive the MH acceptance rate and relate Gibbs to MH.
⚡Key Problems Solved
rejection sampling collapses as 1/M1/M and importance weights explode in high dimension, while MCMC trades correlated samples for a positive acceptance rate — the only general-purpose high-dimensional sampler; the cost is autocorrelation: burn-in must discard the non-stationary head of the chain, and convergence is diagnosed via acceptance rate (rule of thumb 0.2–0.5) and the Gelman-Rubin R^\hat R statistic.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of MCMC & Detailed Balance.
Use Cases
In production engineering, what are the primary use cases for MCMC & Detailed Balance and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Derive the MH acceptance rate α=min⁡(1,π(j)q(i∣j)/(π(i)q(j∣i)))\alpha = \min(1, \pi(j) q(i \mid j)/(\pi(i) q(j \mid i))) and verify the chain satisfies detailed balance (stationary at π\pi)?
2
Relationship between Gibbs and MH: why is the Gibbs acceptance rate always 1? Prove it?
3
What is burn-in and why is it needed? How do you diagnose convergence (Gelman-Rubin R^\hat R, trace plots, acceptance rate)?
4
What does the acceptance rate reduce to under a symmetric proposal q(j∣i)=q(i∣j)q(j \mid i) = q(i \mid j) (the Metropolis algorithm)?
5
Can MCMC handle unnormalized π\pi? Why does the acceptance rate only need π\pi up to a constant?
Updated 2026-08-12
🎯
Test Your Knowledge: Practice Questions for "MCMC & Detailed Balance"
Single choice pitfall questions with instant feedback and mistake tracking.
🚀 Start Card Practice ➔
← Previous CardMarkov Chain & Detailed BalanceNext Card →Bootstrap

🔗 More AI Math Knowledge Cards

Adam/AdamW MathBayesian InferenceBias-Variance DecompositionCausal Inference (Rubin)