Hamiltonian Monte Carlo — intuition.
hardAnswer
- Uses gradients of log-posterior to propose long, informed steps → efficient in high dimensions.
- Introduces auxiliary momentum p, runs Hamiltonian dynamics (leapfrog) to propose new (θ, p), MH-accepts.
- Advantages: dramatically better mixing than random-walk MH in high dimensions.
- NUTS (No-U-Turn Sampler): auto-tunes trajectory length; default in Stan, PyMC, NumPyro.
- Requires differentiable posterior — great for continuous models, doesn't handle discrete latents directly.
Check yourself — multiple choice
- Random walk
- Uses log-posterior gradients + auxiliary momentum + leapfrog dynamics → efficient in high dims; NUTS auto-tunes trajectory; needs differentiable posterior
- Same as Gibbs
- Not real
HMC: gradient-based proposals via Hamiltonian dynamics; NUTS default.
#bayesian#mcmc
Practise Statistics Fundamentals
215 interview questions in this topic.