Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Mixture architecture — joint and marginal laws

A normal variance–mean mixture has two related statistical descriptions: the joint law of an observation and its mixing variable, and the marginal law of the observation alone. Keeping these distinct explains the sufficient statistics and expectation-to-parameter map used by EM.

Conditional, joint, and marginal descriptions

Let Y>0Y>0 be independent of ZNd(0,Id)Z\sim\mathcal N_d(0,I_d), and let LL=Σ0LL^\top=\Sigma\succ0. Define

X=μ+γY+YLZ,XY=yNd(μ+γy,yΣ).X=\mu+\gamma Y+\sqrt Y\,LZ,\qquad X\mid Y=y\sim\mathcal N_d(\mu+\gamma y,y\Sigma).

For d=1d=1, this is conditioning a mixture with Y=WY=W, γ=β\gamma=\beta, and Σ=σ2\Sigma=\sigma^2. For a mixing density gg,

f(x,y)=f(xy)g(y),fX(x)=0f(x,y)dy,f(yx)=f(x,y)fX(x).f(x,y)=f(x\mid y)g(y),\qquad f_X(x)=\int_0^\infty f(x,y)\,dy,\qquad f(y\mid x)=\frac{f(x,y)}{f_X(x)}.
LawVariables availableStatistical role
Conditional normalXX at fixed Y=yY=ySpecifies the sampling mechanism
Joint(X,Y)(X,Y)Complete-data likelihood, sufficient statistics, joint divergences
MarginalXXObserved likelihood, moments, observable probabilities
PosteriorYY given X=xX=xConverts observations into expected complete-data statistics

Drawing both variables and discarding YY produces a marginal draw. Integrating out YY is an operation on a probability model, not an assertion that YY was observed.

When the joint is an exponential family

For GIG mixing, expansion of logf(x,y)\log f(x,y) gives the six statistic blocks

t(x,y)=(logy,y1,y,x,x/y,xx/y).t(x,y)=(\log y,y^{-1},y,x,x/y,xx^\top/y).

The scalar coefficients in the first three slots are

p1d/2,12(b+μΣ1μ),12(a+γΣ1γ).p-1-d/2,\qquad -\tfrac12(b+\mu^\top\Sigma^{-1}\mu),\qquad -\tfrac12(a+\gamma^\top\Sigma^{-1}\gamma).

The factors of 1/21/2 follow from the GIG kernel yp1e(ay+b/y)/2y^{p-1}e^{-(ay+b/y)/2}. The remaining coefficients and the log-partition are derived in GH. Matrix blocks use the trace inner product on symmetric matrices.

The first three expectations are always ordered as (E[logY],E[Y1],E[Y])(\mathbb E[\log Y],\mathbb E[Y^{-1}],\mathbb E[Y]) in this batch. Upstream implementation storage may use another order; descriptive moments, rather than slot numbers, identify the mathematical correspondence.

The joint GIG-normal model is an exponential family in these statistics. An arbitrary mixing density does not automatically give this particular finite-dimensional representation. Likewise, marginalization does not generally preserve exponential-family structure. For the full observable GH model, Bessel terms couple parameters to the observation inside the log density. The mere presence of a Bessel function or integral is not a proof that a model is outside the exponential family; GIG itself is a counterexample to that reasoning. Special restricted marginal families can behave differently.

Recovering a model from expected statistics

Let ηi=E[ti(X,Y)]\eta_i=\mathbb E[t_i(X,Y)] in the order (3). Conditional Gaussian moments imply

η4=μ+γη3,η5=μη2+γ.\eta_4=\mu+\gamma\eta_3,\qquad \eta_5=\mu\eta_2+\gamma.

If η2η31\eta_2\eta_3\ne1, this linear system gives

μ=η4η3η51η2η3,γ=η5η2η41η2η3.\mu=\frac{\eta_4-\eta_3\eta_5}{1-\eta_2\eta_3},\qquad \gamma=\frac{\eta_5-\eta_2\eta_4}{1-\eta_2\eta_3}.

The sixth moment gives

Σ=η6η5μμη5+η2μμη3γγ.\Sigma=\eta_6-\eta_5\mu^\top-\mu\eta_5^\top +\eta_2\mu\mu^\top-\eta_3\gamma\gamma^\top.

The mixing law is recovered from its own moment equations. This is the joint family’s inverse expectation map, with the domain conditions stated in the exponential-family core. An arbitrary tuple of six arrays need not be a feasible expectation vector. In particular, the recovered covariance must be positive definite and the mixing moments must admit the claimed distribution.

In EM, replace each ηi\eta_i by an average of conditional expectations given the observations. This uses the same mathematical map, but the expectations now come from the current posterior. See latent variables and ordinary EM for why this improves the observed likelihood under the stated assumptions.

Conditional parameters and observable moments

The normal parameters enter the marginal moments through

E[X]=μ+γE[Y],Cov(X)=E[Y]Σ+Var(Y)γγ.\mathbb E[X]=\mu+\gamma\mathbb E[Y],\qquad \operatorname{Cov}(X)=\mathbb E[Y]\Sigma +\operatorname{Var}(Y)\gamma\gamma^\top.

Thus μ\mu and Σ\Sigma describe the conditional mechanism, and cannot simply be read as the mean and covariance of the observed distribution. The normal-mixtures note works through this distinction. Moreover, a latent rescaling can change the joint representation while preserving the marginal law; see GH identifiability.

This note covers the full positive-definite covariance model. Factor-analysis constructions introduce additional latent variables and different complete-data statistics; the factor-analysis note derives their posterior moments and constrained M-step.

Class naming, storage, constructor recipes, and fitter contracts remain in the upstream mixture design, EM framework, and package API.

Source and adaptation

Rewritten as a mathematical note from xshi19/normix, docs/design/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.