BUGS specifies a probabilistic model through stochastic nodes, deterministic nodes and observed data, then uses Markov chain Monte Carlo to simulate its Bayesian posterior. Its normal sampling notation uses a precision parameter rather than a variance, and its gamma notation uses shape and rate.
A zeros trick implements a positive likelihood function by adding an observed zero with Poisson distribution mean . If this mean is nonnegative throughout the parameter support, its likelihood is and yields the intended Bayesian posterior. The constant must be independent of the parameter; arbitrary clipping changes the target.
Variational inference approximates a posterior distribution by minimizing a Kullback-Leibler divergence over a chosen family of probability distributions. For an unnormalized posterior density and a trial probability density function , minimizing is equivalent to minimizing .
A reparameterization gradient differentiates an expected value by representing the simulated random variable as a differentiable transformation of parameter-independent noise. For , the identity requires justified differentiation under the integral sign. For a normal distribution, use with drawn from the standard normal distribution.
Markov chain variational inference optimizes an initial parametric probability distribution by minimizing after a fixed number of Markov kernel updates. The best initial probability distribution can depend on ; Kullback-Leibler divergence contraction does not imply that optimization commutes with applying the Markov kernel.
Mean-field variational inference restricts the trial probability density function to . With the other factors fixed, , provided this expression has a finite positive normalization constant. Subtracting the objective at leaves , proving the update is optimal when the terms are well defined.
Data augmentation enlarges a posterior distribution with latent variables whose removal by marginalization recovers the original posterior distribution. Convenient full conditional distributions then permit a Gibbs sampler on the enlarged space.
A hierarchical Bayesian model assigns distributions to local latent variables conditional on shared hyperparameters, then distributions to observations conditional on those latent variables. Its probabilistic graphical model records this conditional factorization, often using a plate for repeated observations. Integrating out latent variables gives the marginal likelihood of the hyperparameters. Priors described as flat on logarithms require a Jacobian determinant when densities are written in the original positive variables.
Partial pooling estimates related local parameters jointly through shared hyperparameters. Each local Bayesian posterior balances its own likelihood function against a group prior distribution, with stronger shrinkage when its data are weak or the group variation is small. It lies between forcing all local parameters to be equal and estimating them independently. Random-effects meta-analysis is an important application.
A Gamma–Poisson hierarchical model uses , , and , with gamma distributions in shape-rate convention. Conditional independence gives full conditional distributions and .
For independent Poisson distributions with means and a shape–rate Gamma distribution prior on , integrating adds to the total-count exponent and to the sum of relative rates. This distinguishes gamma mixing from conditioning on the total count, which gives a multinomial distribution.
An observed astronomical colour is the sum of a normal intrinsic colour, a nonnegative dust contribution with an exponential distribution, and normal measurement noise. With latent , and , the Gibbs sampler conditionals for are normal and those for are truncated normal distributions. A flat prior on and inverse-gamma priors on give inverse-gamma conditional updates for the two scales. Log-flat priors on both scales instead make the joint posterior improper when all , despite formally proper full conditionals at generic latent states: the marginal observed likelihood has a positive limit at either zero-scale boundary. Proper positive-scale priors restore a genuine joint posterior.
A maximum a posteriori estimate maximizes the posterior density of a parameter or latent configuration. Equivalently, it maximizes the sum of the log likelihood and log prior, relative to the chosen reference measure.
A credible interval is an interval whose posterior probability equals a prescribed level. Conditional on the observed data and the Bayesian model, the unknown parameter lies in the interval with that probability.
An empirical Bayes method estimates prior hyperparameters from the marginal distribution of the observed data and then uses the resulting fitted prior in Bayesian inference.
A maximum marginal likelihood estimator chooses a hyperparameter by maximizing the data density obtained after integrating the model parameter against its prior distribution.
A hyperparameter controls a family of prior distributions or statistical models and is fixed, estimated, or assigned a further prior at a higher level of a hierarchical model.
A Dirichlet process is a distribution over probability measures such that the masses assigned to every finite measurable partition have a Dirichlet distribution. Its draws are almost surely discrete.
A Dirichlet prior with parameters combined with categorical labels having counts gives a Dirichlet posterior with parameters .
A prior probability describes uncertainty about an event or parameter before the current observation is incorporated.
A prior density is the probability density function of a continuous prior distribution with respect to a specified reference measure. A proper prior density is nonnegative and integrates to one. Prior-density factors enter Bayesian posterior and RJ-MCMC acceptance formulas along with the likelihood and model prior probabilities.
A continuous spike-and-slab prior mixes a narrow continuous probability distribution around zero with a much wider component. It permits practical effect selection while retaining a continuous posterior density. Its narrow component is not the exact-zero mass of a point-null mixture prior. A latent component indicator aids computation; a wide-component draw can still have small magnitude, so posterior effect thresholds and component membership answer different questions.
A uniform prior on a finite-volume parameter region assigns constant probability density there and zero outside. On it is , giving a Beta distribution posterior after binomial distribution data. Uniformity depends on the coordinate: a nonlinear reparametrization introduces a Jacobian and generally does not preserve a uniform density.
A posterior variance is the variance of a parameter under its Bayesian posterior, namely when finite. It describes remaining uncertainty after observing data and is distinct from the repeated-sampling variance of a fitted estimator.
The distribution of a new or missing quantity integrates its model over the Bayesian posterior: . Both parameter and residual uncertainty should enter predictive draws used for multiple imputation.
A posterior predictive check compares a summary of the observed data with the same summary in replicated data drawn from a model's posterior predictive distribution. The replication must match the target: replicating an existing group's observations conditional on its effect differs from predicting a new group with a newly drawn effect. Such checks expose mismatches in dispersion, tails or other features; using the observations to fit and check the model means they are not automatically calibrated frequentist tests.
For independent observations , put , , , and . Integrating the likelihood function against a flat improper prior on gives, up to the arbitrary prior constant,Indeed , and the remaining one-dimensional Gaussian integral is . The conditional Bayesian posterior of is .
A posterior predictive probability averages a future-event probability over the Bayesian posterior. For a Bernoulli distribution with unknown parameter , it is . Under Beta-binomial conjugacy with posterior , the predictive success probability is .
A posterior density is the density of a posterior distribution with respect to a chosen reference measure.
The log-posterior is the logarithm of a positive posterior density. Its gradient is the posterior score control variate when boundary terms vanish. An additive constant independent of the parameter does not affect optimization or differentiation.
The posterior mean is the expected value of a parameter under its posterior distribution; under squared-error loss it is the Bayes estimator.
A posterior probability is the probability assigned to an event by the posterior distribution after conditioning on the observed data.
A point-null mixture prior assigns positive mass to one parameter value and distributes the remaining mass continuously over alternatives. Posterior point mass is obtained by dividing the null component of the marginal density by the full marginal density.
With a fixed diffuse alternative prior, a frequentist p-value and the posterior probability of a point null can order evidence differently. For and , the p-value exceeds the null posterior near zero, while sufficiently far in the tails the null posterior exceeds the p-value because it has a slightly slower Gaussian decay.
An improper prior is a nonnegative prior kernel with infinite total mass. It can still produce a proper posterior after multiplication by the likelihood and normalization.
The measure is invariant under multiplication by every positive constant. In the logarithmic coordinate it is Lebesgue measure. It cannot be normalized over , although a bounded truncation is a log-uniform distribution.
A random-effect model with positive marginal likelihood at scale zero cannot yield a proper posterior distribution under a prior proportional to the reciprocal scale near zero. On a compact set of the other parameters, continuity and positivity give a positive likelihood lower bound, while . Individual full conditional distributions can still be proper, so their existence alone does not justify a Gibbs sampler with a probability distribution as its joint target.
A posterior kernel defines a posterior distribution exactly when its integral is finite and nonzero. Proper full conditional densities do not suffice. For example, if a known positive measurement variance makes a marginal normal likelihood approach a strictly positive limit as a latent variance tends to zero, the log-flat prior gives infinite posterior mass at that boundary. The same problem occurs for a latent exponential scale with when the observed likelihood has a positive limit as the exponential contribution vanishes.
For a Poisson observation of mean and a gamma prior with shape and rate , the posterior is gamma with shape and rate .
Given , independent observations have Poisson distribution with means for known exposures. A gamma distribution prior of shape and rate yields a gamma posterior with shape and rate . The likelihood kernel is . Thus the posterior mean depends on total claims and total exposure, not the number of periods alone.
A gamma prior with shape and rate combined with independent observations from an exponential distribution of rate gives the posteriorUnder squared-error loss, the Bayes estimator is its posterior mean .
Draw , and , with and integer . The joint density of is symmetric in , making them exchangeable random variables with identical Beta distribution marginal distributions. The posterior beta normalization constant depends on and must be retained. The correlation coefficient is : this constructs tunable dependence without altering either marginal.
A Bayes decision rule maximizes posterior expected utility, equivalently minimizes posterior expected loss, separately at each observed data value.
For and , the posterior isThe Bayes estimator under quadratic loss is the posterior mean and its Bayes risk is the trace of the posterior covariance, .
Under , the posterior expected loss is minimized atprovided the conditional inverse moment is finite and positive.
Posterior expected loss averages the loss over the posterior and is minimized pointwise in the data.
Markov chain Monte Carlo constructs an ergodic Markov chain whose stationary distribution is the target law and uses its post-burn-in states as approximate dependent samples.
Reversible-jump Markov chain Monte Carlo samples a posterior on a disjoint union of model-specific parameter spaces. A dimension-matching bijection between old parameters plus auxiliary variables and new parameters plus reverse auxiliary variables supplies a reversible proposal. Its acceptance ratio includes posterior-density, model-selection, proposal-density, and Jacobian determinant factors. The equal-dimension reversible-jump acceptance probability is the ordinary density-based special case.
A pseudo-prior is a proper density assigned to a parameter that is inactive under a particular model. Integrating it out leaves that model's likelihood and marginal evidence unchanged. Its choice affects movement between model states, but not the intended marginal posterior over models.
A pseudo-prior can make model parameter vectors have equal dimensions, allowing identity-matched RJ-MCMC moves. If active and inactive coordinates share the same prior density in the two augmented targets, these factors cancel in model-switch ratios. Within-model updates must preserve the augmented target, including the inactive coordinate's pseudo-prior law.
Compare independent Poisson means with one shared mean under proper shape-rate gamma distribution priors. Adding the second mean as an inactive parameter under the shared-mean model gives a simple identity model switch. With equal model priors and identical active/inactive priors, its ratio from separate to shared means is . Poisson-gamma conjugacy supplies exact within-model updates, and integrating the gamma kernels supplies an independent Bayes factor benchmark.
For unnormalized model posterior densities , model-selection probabilities and parameter-proposal densities , accept a proposal with the minimum of one and . A deterministic matching-map formulation instead includes its explicit Jacobian determinant; it must not be counted again when already absorbed into a direct proposal density.
The hit-and-run sampler moves within a full-dimensional compact convex set by choosing a uniform direction, then a uniform point on the chord through the current point in that direction. Its invariant law is the uniform distribution on the set. Starting in the interior keeps the chain in the interior almost surely. To define absolutely continuous transitions also at boundary points, redraw directions whose chords have zero length. Without this convention, a corner can have a positive holding atom.
For a planar hit-and-run sampler, let be the chord length and the fraction of directions with positive chord length. With zero-length chords redrawn, the probability density function isfor almost every in the body. Interior points have . The two signed representations of a direction contribute the factor two in the polar-coordinate calculation. If the body has diameter , a version of this density is bounded below by . This is a global Doeblin condition after normalization by the body's area.
Several chains from dispersed initial states, trace plots, autocorrelation, effective sample sizes, and the rank-normalized split potential scale reduction factor assess mixing and disagreement between chains. An close to one is useful evidence but cannot prove convergence or prove posterior propriety. Comparing chains that explore different modes is especially important; monitor each scientifically important observable and its Monte Carlo uncertainty. A long apparent plateau can also occur when an improper-target sampler is drifting toward a boundary.
Thinning keeps every th state of a Markov chain. The retained chain has transition kernel and the same stationary distribution. It is generally still dependent, and reducing correlation between retained draws does not by itself improve precision per original transition. Keep all post-warmup draws unless storage or later processing requires thinning; assess precision using the effective sample size of a Markov chain.
A Markov kernel is geometrically ergodic when its iterates converge to stationarity in total variation at a geometric rate, with a finite state-dependent prefactor.
For an aperiodic positive Harris recurrent Markov chain with geometric ergodicity, an observable with stationary moment for some satisfies a central limit theorem. Its asymptotic variance is , with stationary covariances. Ergodicity alone does not guarantee this theorem.
Uniform geometric ergodicity strengthens geometric ergodicity by bounding the prefactor uniformly over the starting state. If globally and is invariant, thenWrite , where draws independently from , to obtain the bound.
Applying a Markov kernel to two initial laws cannot increase their total variation distance, even for the distribution of an entire subsequent finite trajectory. If a bounded summand has absolute value at most , the variance of a length- path sum differs between these laws by at most times their total variation distance. Thus a geometrically long enough burn-in makes this difference negligible relative to .
For a reversible Markov chain with invariant law , its Markov kernel acts as a self-adjoint operator on . An absolute spectral gap means that on the mean-zero functions is at most . Geometric ergodicity implies this gap for a reversible chain. Indeed, for bounded mean-zero supported where the geometric prefactor is bounded, the total-variation estimate gives . The spectral theorem for normal operators puts its spectral measure in . Such test functions are dense in the mean-zero subspace.
If , a stationary reversible Markov chain satisfiesConsequently the variance of a sum of consecutive values is at most times the stationary variance of one value. This bounds the Markov chain Monte Carlo asymptotic variance uniformly over square-integrable functions.
For a stationary ergodic Markov chain with invariant distribution and an integrable function , the sample mean converges almost surely to . Geometric ergodicity supplies standard sufficient conditions for this conclusion and stronger limit theorems.
A minorization condition gives a common component of transition laws: for every in a specified set, some , , and a probability measure .
A Doeblin condition is a minorization of the whole state space. It implies uniform geometric convergence in total variation distance.
A geometric drift with , together with a small-set minorisation on and irreducibility and aperiodicity, implies geometric ergodicity.
A geometric drift condition requires a measurable , a small set , constants and , andTogether with irreducibility and aperiodicity, it implies geometric ergodicity. A global Doeblin condition allows to be the entire state space and .
Suppose a Markov kernel satisfies for a measurable . For and , the sublevel set gives . If is a small set, this is a geometric drift condition. The hypotheses of an irreducible Markov chain and an aperiodic Markov chain are also required for the usual geometric ergodicity theorem.
For a reversible kernel , the inequality is equivalent to geometric contraction of variance under iteration of .
One Markov kernel dominates another in Peskun ordering when it assigns at least as much transition probability to every measurable set not containing the current state. For reversible kernels this increases Dirichlet energy and cannot decrease the spectral gap.
Hamiltonian Monte Carlo introduces an auxiliary Gaussian momentum, approximately follows Hamiltonian dynamics by a reversible volume-preserving integrator, and applies a Metropolis correction.
Surrogate Hamiltonian Monte Carlo uses an auxiliary smooth probability density function to generate trajectories but applies a Metropolis–Hastings acceptance probability using the intended target . For Gaussian momenta and an involutive Metropolis proposal generated by flipped leapfrog integration, the acceptance probability is . Only the surrogate gradient is required during the trajectory; target density evaluations are still required at the endpoints.
The Metropolis–Hastings algorithm proposes from at state and accepts it with probabilityThis acceptance rule enforces detailed balance with the target density .
A pseudo-marginal Metropolis–Hastings algorithm replaces an intractable likelihood function by a nonnegative unbiased likelihood estimator and includes its auxiliary randomness in the state. If for , the extended target is proportional to . An independence proposal for new auxiliary randomness cancels the factors in the Metropolis–Hastings acceptance probability. On rejection the old estimate must be retained. Integrating the extended target gives the desired marginal posterior distribution exactly.
An unbiased likelihood estimator has expectation equal to the likelihood function at each parameter. A pseudo-marginal algorithm requires this estimator to be nonnegative. Importance sampling provides for independent random variables , provided the proposal covers the target support. Relative variance affects the mixing time even though unbiasedness guarantees the correct marginal target.
At the current state , a Metropolis–Hastings algorithm draws a candidate state from its proposal distribution . The Metropolis–Hastings acceptance probability corrects the proposal's bias so that the target distribution remains invariant.
An involutive Metropolis proposal uses a deterministic bijection satisfying . For a volume-preserving and target probability density function , accept with probability . The identity and a change of variables under prove detailed balance. A non-unit Jacobian determinant must be included when volume is not preserved.
For a proposal , with isotropic and an independent random orthogonal matrix , invariance of the distribution of under transpose makes the proposal distribution symmetric. Indeed , and averaging the isotropic Gaussian density over an inversion-invariant law yields . The Metropolis–Hastings algorithm therefore accepts with the target density ratio alone.
Let , let , and proposeThe proposal distribution is . If independently of , then is a jointly multivariate normal distribution invariant under exchanging and , because both random vectors have covariance matrix and their cross-covariance matrices are both . Consequently its density satisfieswhere is the standard-normal density. Thus the proposal is reversible with respect to the standard normal distribution.
The preconditioned Crank–Nicolson algorithm, or pCN algorithm, uses a Gaussian autoregressive proposal reversible with respect to a standard normal distribution in a Metropolis–Hastings algorithm. When the target density is a likelihood times the proposal's invariant Gaussian prior density, the Gaussian factors cancel from the Metropolis–Hastings acceptance probability, leaving the likelihood ratio.
Random-walk Metropolis proposes a symmetric increment from the current state and accepts a proposal from with probability .
An independence Metropolis–Hastings algorithm proposes from a fixed density independent of the current state. If , it is uniformly and hence geometrically ergodic.
The effective sample size discounts a correlated chain's raw length by its integrated autocorrelation time.
For a stationary Markov chain and a scalar observable with summable autocorrelation function , the asymptotic variance of its sample mean is . Thus the effective sample size of a Markov chain is approximately . Different observables can have very different autocorrelation times.
For Gaussian precision , a systematic update of the first coordinate followed by the second makes the centered second coordinate an AR(1) chain with coefficient . Independent conditional Gaussian noise supplies its stable innovation. This proves convergence of the Gaussian Gibbs sampler and explains slower mixing when posterior correlation has magnitude near one.
Every full-conditional coordinate update satisfies detailed balance with the target distribution. Their systematic ordered composition preserves the target but need not satisfy detailed balance, since compositions of reversible kernels need not be reversible. A fixed-probability random-scan mixture remains reversible.
A blocked Gibbs sampler draws groups of coordinates jointly from their full conditional distributions. Each update preserves the joint probability distribution; dependence between blocks can still cause a long mixing time.
Articles were limited to the first 100 out of 113 total.
Articles by others on the same topic
Bayesian statistics is a branch of statistics that incorporates prior knowledge or beliefs into the analysis of data. It is based on Bayes' theorem, which describes how to update the probability of a hypothesis as more evidence or information becomes available. The core components of Bayesian statistics include: 1. **Prior Distribution**: This represents the initial beliefs or knowledge about a parameter before observing any data.