Math 2.0

Numerical analysis Monte Carlo and quasi-Monte Carlo methods Proposition

Gibbs sampling

Builds on Markov chain Monte CarloConditional probability distributionTransition matrixStationary distributionDetailed balanceConvergence to equilibrium of ergodic Markov chains

Statement

Let S=S1×⋯×SdS = S_1 \times \cdots \times S_d be a product of countable sets, and let π\pi be a probability distribution on SS. For x∈Sx \in S and 1≤i≤d1 \le i \le d, write x−ix_{-i} for xx with its ii-th coordinate removed, and let Zi(x)=∑z∈S, z−i=x−iπ(z)Z_i(x) = \sum_{z \in S, \, z_{-i} = x_{-i}} \pi(z). Let KiK_i be the transition matrix on SS with Ki(x,y)=π(y)Zi(x)if y−i=x−i and Zi(x)>0,K_i(x,y) = \frac{\pi(y)}{Z_i(x)} \quad \text{if } y_{-i} = x_{-i} \text{ and } Z_i(x) > 0, Ki(x,y)=0K_i(x,y) = 0 for the other yy when Zi(x)>0Z_i(x) > 0, and Ki(x,⋅)=δxK_i(x, \cdot) = \delta_x when Zi(x)=0Z_i(x) = 0. So KiK_i redraws the ii-th coordinate from its conditional distribution under π\pi given the others. Then:

  1. each KiK_i satisfies detailed balance with respect to π\pi, that is, π(x)Ki(x,y)=π(y)Ki(y,x)\pi(x) K_i(x,y) = \pi(y) K_i(y,x) for all x,y∈Sx, y \in S;
  2. π\pi is a stationary distribution of the systematic-scan Gibbs sampler K1K2⋯KdK_1 K_2 \cdots K_d and of the random-scan Gibbs sampler 1d∑i=1dKi\frac{1}{d} \sum_{i=1}^{d} K_i.

Remarks

For clause 1, if y−i=x−iy_{-i} = x_{-i} and Zi(x)>0Z_i(x) > 0, then Zi(y)=Zi(x)Z_i(y) = Z_i(x) and both sides equal π(x)π(y)/Zi(x)\pi(x) \pi(y) / Z_i(x). If Zi(x)=0Z_i(x) = 0 then π(x)=π(y)=0\pi(x) = \pi(y) = 0 for all such yy, and in all other cases both sides are 00. Summing detailed balance over xx gives πKi=π\pi K_i = \pi, and clause 2 follows because a product or an average of kernels that fix π\pi also fixes π\pi. The same argument works for densities on ℝd\R^d, with sums replaced by integrals. Stationarity alone does not give convergence of the chain to π\pi. If SS is finite and π(x)>0\pi(x) > 0 for every xx, every entry of K1⋯KdK_1 \cdots K_d is positive, so the chain is irreducible and aperiodic and converges to π\pi by the convergence theorem. Without positivity this can fail: for π\pi uniform on {(0,0),(1,1)}⊂{0,1}2\set{(0,0), (1,1)} \subset \set{0,1}^2, each KiK_i fixes every state of positive mass, so the chain never moves.

Going deeper

For a student

Gibbs sampling is the Markov chain Monte Carlo method of choice when the full conditional distributions are easy to sample. This is the case in many Bayesian hierarchical models with conjugate priors and in lattice models such as the Ising model. Each update is a Metropolis–Hastings step whose proposal is the full conditional, so its acceptance probability is always 11. The systematic-scan sampler is in general not reversible, though each KiK_i is; the random-scan sampler is reversible. Strong dependence between coordinates slows mixing, since moves along single coordinates then make little progress; blocking several coordinates together is the usual remedy.

Reading path

To understand this page from the ground up, read these 60 pages in order. The foundations come first.

  1. Conditional probability distribution concept
  2. Construction of the reals from Cauchy sequences concept
  3. Coupling concept
  4. Detailed balance concept
  5. Element definition
  6. Integers object
  7. Markov chain Monte Carlo concept
  8. Markov chain mixing time concept
  9. Ordered field definition
  10. Proposition concept
  11. Random experiment concept
  12. Rational numbers object
  13. Real numbers object
  14. Recurrence and transience of states concept
  15. Stationary distribution concept
  16. Transition matrix concept
  17. Set definition
  18. Ring of integers statement
  19. Disjunction definition
  20. Implication definition
  21. Predicate definition
  22. Ordered pair definition
  23. Union definition
  24. Existential quantifier definition
  25. Universal quantifier definition
  26. Sample space definition
  27. The rationals form a field statement
  28. Cartesian product definition
  29. Subset definition
  30. Uniqueness quantifier definition
  31. The rationals form an ordered field statement
  32. Binary relation definition
  33. Universal set definition
  34. Power set definition
  35. Order on the reals definition
  36. Function definition
  37. Complement definition
  38. Interval definition
  39. Injective function definition
  40. Preimage of a set definition
  41. Sigma-algebra definition
  42. Countable set definition
  43. Event definition
  44. Borel sigma-algebra definition
  45. Probability axioms concept
  46. Probability measure definition
  47. Probability space definition
  48. Conditional probability definition
  49. Random variable definition
  50. Independence of two events definition
  51. Discrete random variable definition
  52. Stochastic process concept
  53. Random variable with a density definition
  54. Conditional independence definition
  55. Expected value definition
  56. Conditional expectation definition
  57. Markov property definition
  58. Markov chain definition
  59. Convergence to equilibrium of ergodic Markov chains statement
  60. Gibbs sampling statement

Further reading

  1. Web https://en.wikipedia.org/wiki/Gibbs_sampling
About this page
TagKS91STZCGM
URIm2://KS91STZCGM
Kindstatement, proposition
WritingW0 stub
MSC65C05, 65C40, 60J22
StatusThis copy of the site has no build data. Run m2 status KS91STZCGM.
AboutMarkov chain Monte Carlo
UsesMarkov chain Monte Carlo, Conditional probability distribution, Transition matrix, Stationary distribution, Detailed balance, Convergence to equilibrium of ergodic Markov chains
Same as

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.