Bayesian network structure score Created 2026-10-05 Updated 2026-10-14
For observations and graph , Bayes' theorem gives . Here is the graph prior distribution and the local distribution statistical parameters. The integral is Bayesian model evidence; it averages over nuisance parameters with a proper statistical parameter prior distribution. For independent complete observations, the node-factorized likelihood function and independence of local statistical parameter prior distributions make the evidence factor over nodes; suitable conjugate priors can make the local integrals analytic. With missing node observations, integrating out unobserved values can couple the local parameters, so independence of local prior distributions alone does not guarantee this factorization. Proper priors and coherent hyperparameters matter for comparing different graphs.
For inverse-gamma distribution observations of known shape and scale , their likelihood function in is proportional to . A shape-, rate- gamma distribution conjugate prior therefore gives the displayed Bayesian posterior. The Bayes estimator under squared error loss of the conditional claim expected value is . It depends on reciprocals, rather than the sample mean of the claims.
Normal-gamma distribution 2026-10-14
A normal-gamma conjugate prior for the mean and precision parameter of a Gaussian distribution specifies a Gamma distribution in the shape-rate convention and a conditional Gaussian distribution . Its joint probability density function is proportional to , with . For independent observations with Gaussian distribution , multiplication by the likelihood and completing the square gives
and . The identity behind conjugacy is .
Both the Metropolis–Hastings algorithm and the Gibbs sampler construct a Markov chain with a specified target distribution, usually a posterior distribution known only up to normalization. For a proposal density and target density , the Metropolis–Hastings acceptance probability is
After drawing , move there with this probability; otherwise stay at . The unknown normalizing constant of cancels. The original Metropolis algorithm uses a symmetric proposal, , so the proposal-density ratio disappears. The general Metropolis–Hastings algorithm permits nonsymmetric proposals and needs that correction.
A Gibbs sampler instead chooses a coordinate or block and draws directly from its full conditional distribution, leaving the other coordinates fixed. It is exactly a conditional Metropolis–Hastings update whose proposal is that full conditional. For a change from to with fixed, the acceptance ratio is
Thus a Gibbs update is an always-accepted Metropolis–Hastings update with the full conditional as proposal. This statement concerns each update: a systematic sweep of several Gibbs kernels preserves the target but need not itself be reversible.
When the full conditional distributions are easy to sample, a Gibbs sampler avoids proposal tuning and rejection, and is particularly convenient for conjugate priors and data augmentation. When a conditional cannot be sampled directly, a Metropolis–Hastings algorithm can use only its evaluable density; such an update can also be inserted into a Gibbs sweep. Block or joint Metropolis–Hastings proposals can move efficiently along strongly correlated directions for which coordinate-wise Gibbs updates mix slowly. Conversely, a badly chosen Metropolis–Hastings proposal can reject most moves or make only tiny moves. Acceptance probability one by itself does not guarantee rapid exploration. Both methods require appropriate irreducibility and convergence checks before their long-run averages are useful posterior estimates.
Let and . The Gaussian distribution likelihood is proportional to . Multiplying by the normal-gamma distribution prior gives the quadratic exponent . Completing the square,
The power of is , so the posterior distribution has exactly the required family with
and
For a proper prior, and . The separate factor is retained in both densities; it does not add to the update of . This is a conjugate prior for the Gaussian mean and precision parameter.
Put . The independent-count likelihood function is proportional to . Its conjugate prior is , giving the posterior distribution .
A credibility estimate blends the risk's own sample mean with a population or prior expected value. In the basic equal-exposure form it is , where the credibility factor is the weight attached to the individual experience. More data ordinarily increase that weight; greater within-risk variation relative to between-risk variation reduces it.
Write for the conditional claim expected value, keeping for the prior-level parameter. Normalization of the probability density function gives
At interior points of its finite domain, differentiation under the integral sign yields
This is an instance of the exponential-family derivative identities for natural parameter . The minus sign is present in the PDF and is lost in the converted TeX. The conditional variance is likewise .
Differentiate the log of the natural conjugate prior:
Integrate on a compact subinterval and then let its endpoints approach those of the parameter interval. The prescribed vanishing of the prior density eliminates the boundary term. Since , monotone convergence theorem justifies the limit of its expectation, and the identity gives
In particular the assumed proper prior and boundary conditions themselves establish this first-moment integrability.
For and , conditional independence makes the likelihood function proportional to . Multiplication by the prior distribution gives the Bayesian posterior
Thus this is a conjugate prior family, with updated parameters
The integration-by-parts calculation for the posterior mean also needs vanishing posterior boundary values. Here that property can be checked, rather than assumed. Let be the essential lower and upper endpoints of the claim support. Every nondegenerate tilted claim law has , so the established prior mean satisfies . Supported observations have ; hence . At a finite parameter endpoint the prior's vanishing forces , because its exponential factor has a finite positive limit; the increased power makes the posterior vanish there too. At , choose with positive base-measure mass below . Then and the unnormalized posterior is at most . At , choose with positive mass above to obtain the corresponding bound . These bounds also ensure posterior propriety at infinite endpoints. This is the endpoint control for a Laplace-family conjugate posterior.
Apply the previous score integration to the Bayesian posterior. The natural conjugate credibility identity is
Thus is the credibility factor. This is an exact posterior mean, rather than an affine approximation to one.
For the specific shape-two gamma distribution, take
Then and . The gamma rate gamma conjugacy prior is
that is, . Its normalizing constant in the notation of the question is . The gamma distribution density vanishes at both zero and infinity for . The posterior has shape and rate , so its conditional-mean posterior mean is again .
For the last calculation, gamma distribution integration gives
The second identity requires the printed . Therefore the expected process variance and variance of hypothetical means, denoted by in this question, are
Consequently , and the Bühlmann credibility factor agrees with the exact Bayesian weight:
This is the exact Bühlmann credibility for gamma claims, expressed using the reciprocal rate as the random scale. The symbols here are the process and between-risk variances, respectively; their roles should not be interchanged when comparing with other notation for the Bühlmann model.
A conjugate prior is a family of prior distributions whose members remain in that family after updating by the likelihood function. Here multiplying a shape-rate gamma distribution density by the Poisson process likelihood changes its power of and its exponential rate, leaving a gamma distribution. The parameters change with the observations; conjugate prior does not mean that the Bayesian posterior equals the prior distribution.
The specified gamma distribution uses shape and rate . Multiplying its density by the Poisson likelihood gives a posterior density proportional to . Thus the conjugate prior calculation gives
For squared-error loss, the posterior expected loss is
It is minimized at the posterior mean, so the Bayes estimator is
For a fresh conditionally independent Poisson observation, the posterior predictive probability of zero is the posterior expectation of . Evaluating the gamma integral gives
The samples are independent conditional on ; integrating out the uncertain common parameter produces the predictive probability above.
Let contain independent complete observations of the -dimensional vector, and let be a Directed acyclic graph. A Gaussian Bayesian network uses, for node ,
Here is an intercept, the vector of parent coefficients, and the conditional variance; the vector collects these statistical parameters. Its likelihood function factors as
Choose a proper statistical parameter prior distribution and a graph prior distribution . Bayes' theorem gives the Bayesian network structure score, up to the normalization common to graphs,
The integral is Bayesian model evidence: it averages over nuisance parameters rather than substituting their best-fitting values. A graph prior can favor sparse graphs, while the evidence balances fit against the amount of prior statistical parameter space that predicts the observations well. Compare these scores over admissible Directed acyclic graphs, using enumeration when feasible or a search procedure otherwise; search need not find a global maximum, and observational data need not identify a unique causal orientation.
A conjugate prior makes the integral analytic. For example, for take , , where is positive-definite matrix and ; these are independent local normal-inverse-gamma priors. Under prior independence between nodes, the evidence is a product of local regression evidences. Each posterior has the same family, so the local integral is the ratio of prior and posterior normalization constants, with the likelihood's constants included. This avoids costly numerical integration and makes local graph updates inexpensive. Hyperparameters must be specified coherently if score equivalence between observationally equivalent graphs is desired; arbitrary local priors do not automatically have that property.
Wishart distribution 2026-10-14
For integer , the sum of independent vectors has a Wishart distribution. Its positive-definite density extends to real and is proportional to . It is a conjugate prior for the precision matrix of a multivariate normal distribution. Its mean is .
The WinBUGS declaration dwish(R, nu) uses ; the density convention is documented in the NIMBLE BUGS-language manual. For it is proper, while the expected inverse matrix does not exist: that expectation requires . Specifying a Wishart prior on precision is therefore a substantive covariance assumption.