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(ji)q(j \mid i) each step and accepts it with rate
📌Overview
α=min(1,π(j)q(ij)π(i)q(ji)),\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(ij)/(π(i)q(ji))r = \pi(j) q(i \mid j) / (\pi(i) q(j \mid i)): when r1r \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(ji)α(i,j)=π(j)q(ij)α(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 π(xkxk)\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.
🎯5 High-Frequency Exam Points
1
Derive the MH acceptance rate α=min(1,π(j)q(ij)/(π(i)q(ji)))\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(ji)=q(ij)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 CardBootstrap

🔗 More AI Math Knowledge Cards

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