Variance gamma, normal-inverse gamma, normal-inverse Gaussian, and generalized hyperbolic distributions share a conditional Gaussian construction. This note extracts its moment and probability identities from the upstream tutorial. Begin with conditioning a mixture for the scalar example, or the family tour for the choice of positive mixing law.
The model and notation¶
Let be independent of a nonnegative random variable . Given and , define
For , use , , and , so this is exactly from the conditioning note. Literature that writes a noise vector with covariance has absorbed into it. For , the conditional law is normal with mean and covariance ; at it is a point mass at .
The four named families in the source use strictly positive mixing variables. They are not the entire set of normal mixtures. In particular, taking constant or discrete also fits (1).
Mean and covariance by conditioning¶
Assume , a sufficient condition for all terms below. The laws of total expectation and total covariance give
The first term averages variation within conditional normals. The second is a positive-semidefinite rank-at-most-one contribution from variation in their means. Thus is a location parameter and a conditional scale matrix; neither is generally the corresponding marginal moment.
If , only is needed for the covariance formula . The stronger second-moment assumption is convenient for the general mean-coupled construction, not part of the definition of a mixture.
For constant mixing , the law reduces to . This also shows why a model with almost constant mixing can have difficulty separating location from mean coupling.
An exact two-dimensional calculation¶
Take
For gamma mixing with shape and rate both , and . Therefore
The positive conditional off-diagonal entry decreases from to because . The additional covariance matrix is still positive semidefinite: its off-diagonal entries need not be positive. This is an algebraic example, not an empirical fit or simulation result.
Joint draws, marginal density, and the posterior¶
If the positive mixing law has density , then
Here is a multivariate normal density. Sampling and retaining has exactly the marginal law. Observing alone, however, does not reveal the latent draw; its uncertainty is represented by
where the denominator is positive and finite. For GIG mixing the posterior is another GIG, as derived in EM. The mixture architecture explains why the joint law provides useful sufficient statistics for estimation of the marginal.
These density formulas assume . If has an atom at zero, the marginal has the corresponding atom at in addition to its positive-mixing part; a Lebesgue density alone does not describe the entire law.
Scalar distribution functions and quantiles¶
In one dimension, for strictly positive , conditioning gives
where is the standard normal CDF. This identity requires no finite moment of , since the integrand is bounded. A quantile is the generalized inverse
An atom at would add to the positive-mixing contribution. The formula explains the scalar probability calculation without prescribing an integration algorithm or package interface.
Estimation and further reading¶
For the four named mixing families, GH theory and its limits give density and higher-moment formulas. EM replaces missing mixing statistics by posterior expectations before maximizing the joint likelihood. Its monotonicity and limitations follow the ordinary EM entry. A fitted location or scale should still be interpreted through (2), not as an automatic estimate of a raw marginal moment.
The upstream normal-mixtures tutorial retains constructors, plots, sampling, CDF/quantile operations, and fitted examples. The package API remains authoritative for implementation. No fitter, executable cell, or notebook image is imported into this note.
Source and adaptation¶
Rewritten as a mathematical note from xshi19/normix, docs/tutorials/distributions/04_normal_mixtures.md, at revision
763bb3608920661a012cf089888d349fbf680aad (2026-09-13 import).
Copyright (c) 2020 xshi19. Licensed under MIT.
The pinned source
records the original version. Notation, mathematical qualifications, and links
were adapted for this site; API recipes, executable package cells, and notebook
plots are omitted. No upstream benchmark execution or formal-proof verification
is claimed for this adaptation.
MIT permission notice
MIT License
Copyright (c) 2020 xshi19
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.