← New search

Other meanings of Gibbs sampling

Statistics

Gibbs sampling

Gibbs sampling is a Markov chain Monte Carlo (MCMC) algorithm for generating samples from a multivariate probability distribution when direct sampling is difficult. It constructs a Markov chain whose stationary distribution is the target distribution by iteratively sampling each variable from its conditional distribution given the current values of all other variables. Named after physicist Josiah Willard Gibbs, the method was formally introduced by Stuart Geman and Donald Geman in 1984 in the context of image restoration. It is widely used in Bayesian statistics, computational physics, and machine learning for posterior inference and latent variable models.

1984
Year introduced by Geman & Geman
Year
O(n)
Per-iteration cost for n variables
Complexity
1
Number of variables updated per step (typically)
Count
1

Algorithm and convergence

The Gibbs sampler updates each variable in turn, drawing from its full conditional distribution given the most recent values of the other variables. For a target distribution p(x1,...,xd), the algorithm cycles through i = 1,...,d, sampling xi(t+1) ~ p(xi | x1(t+1),...,xi-1(t+1), xi+1(t),...,xd(t)). Under mild regularity conditions (irreducibility and aperiodicity), the chain converges to the target distribution as t → ∞.1 Convergence can be slow when variables are highly correlated, leading to poor mixing. Diagnostics such as the Gelman-Rubin statistic assess convergence by comparing multiple chains.2

2

Applications

Gibbs sampling is a cornerstone of Bayesian computation, enabling inference in hierarchical models, mixture models, and latent Dirichlet allocation (LDA).3 In computational physics, it is used to simulate spin systems like the Ising model, where each spin is updated based on its neighbors.4 In genetics, it infers population structure from genotype data, as in the STRUCTURE software.5 It also underpins probabilistic graphical models, including Bayesian networks and Markov random fields, for tasks such as image denoising and missing data imputation.

3

Variants and extensions

Several variants improve efficiency. Blocked Gibbs sampling updates groups of variables jointly, reducing correlation. Collapsed Gibbs sampling integrates out some variables analytically, often accelerating convergence in topic models.3 The Metropolis-within-Gibbs algorithm substitutes a Metropolis-Hastings step when full conditionals are not tractable. For high-dimensional problems, the Gibbs sampler can be combined with Hamiltonian Monte Carlo or used in a tempering scheme to escape local modes. The algorithm also appears in nonparametric Bayesian methods, such as the Dirichlet process mixture model.

4

Lesser-known aspects

The method's name honors Josiah Willard Gibbs, but he never worked on it; the term was coined by Geman and Geman in 1984, who applied it to Bayesian image restoration.1 Earlier, the idea appeared in the physics literature as the heat bath algorithm, used for lattice spin systems.4 A notable edge case: when variables are independent, Gibbs sampling reduces to direct sampling, but the chain still requires burn-in. The algorithm is a special case of the Metropolis-Hastings algorithm with acceptance probability always 1, which is why it is sometimes called a "component-wise Metropolis-Hastings."6 In practice, the order of updates (systematic vs. random) can affect convergence speed, though both yield the same stationary distribution.

Glossary

Full conditional distribution
The probability distribution of one variable given the current values of all other variables.
Mixing
The rate at which the Markov chain explores the support of the target distribution.
Burn-in
The initial set of samples discarded to allow the chain to reach stationarity.

Gibbs sampling is a fundamental tool in modern computational statistics, bridging theory and practice in Bayesian analysis.