GO-V.ORG
As seen in

Gibbs sampling

In statistics, Gibbs sampling or a Gibbs sampler, also known in statistical mechanics as the heat bath algorithm, is a Markov chain Monte Carlo (MCMC) algorithm for sampling from a specified multivariate probability distribution when direct sampling from the joint distribution is difficult, but sampling from the conditional distribution is more practical.[src] This sequence can be used to approximate the joint distribution (e.g., to generate a histogram of the distribution); to approximate the marginal distribution of one of the variables, or some subset of the variables (for example, the unknown parameters or latent variables); or to compute an integral (such as the expected value of one of the variables).[src] Typically, some of the variables correspond to observations whose values are known, and hence do not need to be sampled.[src] Gibbs sampling is commonly used as a means of statistical inference, especially Bayesian inference.[src] It is a randomized algorithm (i.e.[src] an algorithm that makes use of random numbers), and is an alternative to deterministic algorithms for statistical inference such as the expectation–maximization algorithm (EM).[src] As with other MCMC algorithms, Gibbs sampling generates a Markov chain of samples, each of which is correlated with nearby samples.[src] As a result, care must be taken if independent samples are desired.…[src]

In statistics, Gibbs sampling or a Gibbs sampler, also known in statistical mechanics as the heat bath algorithm, is a Markov chain Monte Carlo (MCMC) algorithm for sampling from a specified multivariate probability distribution when direct sampling from the joint distribution is difficult, but sampling from the conditional distribution is more practical.[src] This sequence can be used to approximate the joint distribution (e.g., to generate a histogram of the distribution); to approximate the marginal distribution of one of the variables, or some subset of the variables (for example, the unknown parameters or latent variables); or to compute an integral (such as the expected value of one of the variables).[src] Typically, some of the variables correspond to observations whose values are known, and hence do not need to be sampled.[src] Gibbs sampling is commonly used as a means of statistical inference, especially Bayesian inference.[src] It is a randomized algorithm (i.e.[src] an algorithm that makes use of random numbers), and is an alternative to deterministic algorithms for statistical inference such as the expectation–maximization algorithm (EM).[src] As with other MCMC algorithms, Gibbs sampling generates a Markov chain of samples, each of which is correlated with nearby samples.[src] As a result, care must be taken if independent samples are desired.[src] Samples from the beginning of the chain (the burn-in period) may not accurately represent the desired distribution and are usually discarded.[src] Gibbs sampling, in its basic incarnation, is a special case of the Metropolis–Hastings algorithm.[src] The point of Gibbs sampling is that given a multivariate distribution it is simpler to sample from a conditional distribution than to marginalize by integrating over a joint distribution.[src] Suppose we want to obtain k samples of a n -dimensional random vector \mathbf{X} = (X_1, \dots, X_n) .[src] We proceed iteratively: Begin with some initial value \mathbf{X}^{(0)} .[src] Given a sample \mathbf{X}^{(i)} = \left(x_1^{(i)}, \dots, x_n^{(i)}\right) , to obtain the next sample \mathbf{X}^{(i+1)} = \left(x_1^{(i+1)}, x_2^{(i+1)}, \dots, x_n^{(i+1)}\right) , we can sample each component x_j^{(i+1)} from the distribution of X_j , conditioned on all the components sampled so far: we condition on X_{\ell}^{(i+1)} for all \ell\leq j-1 , and on X_{\ell}^{(i)} for j+1\leq\ell\leq n .[src] In other words, we sample x_j^{(i+1)} according to the distribution P\left(X_j=\cdot|X_1=x_1^{(i+1)}, \dots, X_{j-1}=x_{j-1}^{(i+1)}, X_{j+1}=x_{j+1}^{(i)}, \dots, X_n=x_n^{(i)}\right) .[src] P(X_j=x_j\mid (X_i=x_i)_{i\neq j}) = \frac{P((X_i=x_i)_i)}{P((X_i=x_i)_{i\neq j})} \propto P((X_i=x_i)_i) "Proportional to" in this case means that the denominator is not a function of x_j and thus is the same for all values of x_j ; it forms part of the normalization constant for the distribution over x_j .[src] In practice, to determine the nature of the conditional distribution of a factor x_j , it is easiest to factor the joint distribution according to the individual conditional distributions defined by the graphical model over the variables, ignore all factors that are not functions of x_j (all of which, together with the denominator above, constitute the normalization constant), and then reinstate the normalization constant at the end, as necessary.[src] In practice, this means doing one of three things: If the distribution is discrete, the individual probabilities of all possible values of x_j are computed, and then summed to find the normalization constant.[src] If the distribution is continuous and of a known form, the normalization constant will also be known.[src] In other cases, the normalization constant can usually be ignored, as most sampling methods do not require it.[src] can be proved as follows.[src] Define x \sim_j y if \left.x_i = y_i\right.[src] for all i \neq j and let \left.p_{xy}\right.[src] denote the probability of a jump from x \in \Theta to y \in \Theta .[src] Then, the transition probabilities are p_{xy} = \begin{cases} \frac{1}{d}\frac{g(y)}{\sum_{z \in \Theta: z \sim_j x} g(z) } & x \sim_j y \\ 0 & \text{otherwise} \end{cases} So g(x) p_{xy} = \frac{1}{d}\frac{ g(x) g(y)}{\sum_{z \in \Theta: z \sim_j x} g(z) } = \frac{1}{d}\frac{ g(y) g(x)}{\sum_{z \in \Theta: z \sim_j y} g(z) } = g(y) p_{yx} since x \sim_j y is an equivalence relation.[src] Thus the detailed balance equations are satisfied, implying the chain is reversible and it has invariant distribution \left.g\right.[src] .[src] In practice, the index \left.j\right.[src] is not chosen at random, and the chain cycles through the indexes in order.[src] In general this gives a non-stationary Markov process, but each individual step will still be reversible, and the overall process will still have the desired stationary distribution (as long as the chain can access all states under the fixed ordering).[src] \pi(\theta|y) = \frac{f(y|\theta) \cdot \pi(\theta)}{m(y)} where the marginal likelihood m(y) = \int_{\Theta} f(y|\theta) \cdot \pi(\theta) d\theta is assumed to be finite for all y .[src] To explain the Gibbs sampler, we additionally assume that the parameter space \Theta is decomposed as \Theta = \prod_{i=1}^{K}\Theta_{i} = \Theta_1 \times \cdots \Theta_i \times \cdots \times \Theta_K, \quad\quad (K>1) , where \times represents the Cartesian product.[src] Each component parameter space \Theta_i can be a set of scalar components, subvectors, or matrices.[src] Define a set \Theta_{-i} that complements the \Theta_i .[src] Essential ingredients of the Gibbs sampler is the i -th full conditional posterior distribution for each i=1,\cdots, K \pi(\theta_i|\theta_{-i},y)=\pi(\theta_i|\theta_1, \cdots, \theta_{i-1},\theta_{i+1},\cdots, \theta_{K},y) .[src] The following algorithm details a generic Gibbs sampler: \text{Initialize: pick arbitrary starting value}\,\, \theta^{(1)} = (\theta_1^{(1)},\theta_2^{(1)},\cdots,\theta_i^{(1)},\theta_{i+1}^{(1)},\cdots,\theta_K^{(1)}) \text{Iterate a Cycle:}\, \quad\quad \text{Step 1.[src] draw}\,\, \theta_1^{(s+1)}\sim \pi(\theta_1|\theta_2^{(s)},\theta_3^{(s)},\cdots,\theta_K^{(s)},y ) \quad\quad \text{Step 2.[src] draw}\,\, \theta_2^{(s+1)}\sim \pi(\theta_2|\theta_1^{(s+1)},\theta_3^{(s)},\cdots,\theta_K^{(s)},y ) \quad\quad\quad \vdots \quad\quad \text{Step i.[src] draw}\,\, \theta_i^{(s+1)}\sim \pi(\theta_i|\theta_1^{(s+1)},\theta_2^{(s+1)},\cdots, \theta_{i-1}^{(s+1)},\theta_{i+1}^{(s)} ,\cdots, \theta_K^{(s)},y ) \quad \quad \text{Step i+1.[src] draw}\,\, \theta_{i+1}^{(s+1)}\sim \pi(\theta_{i+1}|\theta_1^{(s+1)},\theta_2^{(s+1)},\cdots, \theta_{i}^{(s+1)},\theta_{i+2}^{(s)} ,\cdots, \theta_K^{(s)},y ) \quad\quad\quad \vdots \quad\quad \text{Step K.[src] draw}\,\, \theta_K^{(s+1)}\sim \pi(\theta_K|\theta_1^{(s+1)},\theta_2^{(s+1)},\cdots,\theta_{K-1}^{(s+1)},y ) \text{end Iterate} Note that Gibbs sampler is operated by the iterative Monte Carlo scheme within a cycle.[src] The S number of samples \{\theta^{(s)} \}_{s=1}^{S} drawn by the above algorithm formulates Markov Chains with the invariant distribution to be the target density \pi(\theta|y) .[src] Now, for each i=1,\cdots,K , define the following information theoretic quantities: I(\theta_i ; \theta_{-i}) = \text{KL}(\pi(\theta|y)||\pi(\theta_i|y) \cdot \pi(\theta_{-i}|y) ) H(\theta_{-i}|\theta_{i}) = -\int_{\Theta} \pi(\theta|y) \log \pi(\theta_{-i}|\theta_{i},y) d\theta, namely, posterior mutual information, posterior differential entropy, and posterior conditional differential entropy, respectively.[src] We can similarly define information theoretic quantities I(\theta_{-i} ; \theta_{i}) , H(\theta_{i}) , and H(\theta_{i}|\theta_{-i}) by interchanging the i and -i in the defined quantities.[src] Then, the following K equations hold.[src] I(\theta_i ; \theta_{-i}) = H(\theta_{-i}) - H(\theta_{-i}|\theta_{i}) = H(\theta_{i}) - H(\theta_{i}|\theta_{-i}) = I(\theta_{-i} ; \theta_{i}), \quad (i=1,\cdots,K) .[src] The mutual information I(\theta_i ; \theta_{-i}) quantifies the reduction in uncertainty of random quantity \theta_{i} once we know \theta_{-i} , a posteriori.[src] It vanishes if and only if \theta_{i} and \theta_{-i} are marginally independent, a posterior.[src] The mutual information I(\theta_i ; \theta_{-i}) can be interpreted as the quantity that is transmitted from the i -th step to the i+1 -th step within a single cycle of the Gibbs sampler.[src]

57 sentences · 57 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Gibbs sampling." encyclopegia.org, 2026, https://encyclopegia.org/wiki/gibbs-sampling. Accessed 03 December 2026.

Chicago

"Gibbs sampling." encyclopegia.org. Accessed December 3, 2026. https://encyclopegia.org/wiki/gibbs-sampling.

APA

encyclopegia.org. (2026). Gibbs sampling. Retrieved December 3, 2026, from https://encyclopegia.org/wiki/gibbs-sampling

Accessed December 3, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1374408416 · 0.5 · snapshot enwiki-001374408416

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.