Bühlmann–Straub model 2026-10-06
Conditional on a common latent variable , annual averages are independent, have common conditional expectation , and have conditional variance for known positive exposures . Its structural parameters are , expected process variance and variance of hypothetical means . It generalizes the equal-exposure Bühlmann model.
Conditional independence Created 2026-09-24 Updated 2026-10-14
Random variables and are conditionally independent given when, for every pair of Borel sets , the following identity holds almost surely:
Here conditional probabilities are conditional expectations of the corresponding indicator random variables given the sigma-algebra generated by . This defines the condition even when . In terms of regular conditional distributions, the conditional joint law is the product of the conditional marginal distributions for almost every conditioning value.
For discrete random variables, at every with , the condition becomes
Where , this is equivalent to . Once is known, observing provides no further information about .[ref]
For a worked example, suppose a latent variable chooses between two environments with . Given , take to be independent and identically distributed with a Bernoulli distribution of parameter , where and . Think of two separate trials run under the same quiet or active environment. Their conditional joint probability mass functions, with rows and columns , are
Each is exactly the product of its own conditional marginal distributions: for , and for . Thus are conditionally independent given .
If the environment is unobserved, the law of total probability averages the two tables:
Both unconditional marginal distributions are fair, but . The law of total expectation gives
Figure 1.
An unobserved shared environment creates statistical dependence between conditionally independent trials
. The first two tables show independent Bernoulli trials at conditional success probabilities and . Averaging them with equal weights gives the third table. The fourth table is the product of the resulting unconditional marginal distributions, which differs from the actual joint table. These are stipulated model probabilities, not observed frequencies. Details.
Observing makes the active environment more plausible, so it raises to . Knowing the actual environment removes this source of statistical dependence. The covariance induced by a shared latent variable lemma explains the calculation without listing all the outcomes.
This is why conditional independence is useful in statistical modelling: a model can multiply simple conditional laws and then average over a shared latent variable. The resulting observations can remain statistically dependent. Conditional independence graphs organize such information relations; their interpretation as causes requires additional assumptions from causal inference. Conditioning describes the information available to an observer. It does not, by itself, describe what would happen if an experimenter changed a variable.
Covariance induced by a shared latent variable Created 2026-10-06 Updated 2026-10-14
Let be indicator random variables with conditional independence given a latent variable , and suppose . Then
For a short proof, conditional independence gives . The law of total expectation gives and . Subtract their product to obtain the claimed variance. Since , all the required expected values exist.
In the two-environment example of conditional independence, is or with equal probabilities. Hence and . The two trials have zero conditional covariance in either environment, yet their unconditional covariance is positive because their success probabilities rise and fall together.
More generally, square-integrable conditionally independent random variables satisfy
by the law of total covariance. Equal conditional means reduce this to the displayed variance; unequal conditional means need not give a nonnegative covariance. The equal-mean result explains correlated component evolutionary states in a coeval binary population without correlation between initial masses: variation in a shared environment can supply the entire covariance.
Expectation-maximization algorithm Created 2026-10-03 Updated 2026-10-14
The expectation-maximization algorithm fits a latent-variable model by alternating a conditional expectation over the latent variables with a maximization over the statistical parameters. Its target is the observed-data likelihood function, although its updates use the simpler complete-data log-likelihood.[ref]
Write for the observations, for the latent variables, and for their joint probability density function or probability mass function. The observed-data log-likelihood is
where the integral becomes a sum for discrete . Directly maximizing a logarithm of this sum can be awkward. The E-step instead computes a conditional distribution at the current statistical parameters ; the M-step uses it to construct a new fit. The attractive idea is to retain uncertainty about the hidden labels while recovering simple weighted means and other complete-data updates. The Known-variance Gaussian mixture EM example shows the mechanism without estimating a variance or mixture weight.
Arthur Pentland Dempster, Nan M. Laird, and Donald B. Rubin gave the general framework its name in their 1977 paper, which also discusses earlier special-case algorithms.[ref]
Factor analysis Created 2026-10-05 Updated 2026-10-07
Factor analysis writes an observation as , where the low-dimensional latent variable describes shared variation. In the isotropic Gaussian model and independently, the observation has covariance .
Hierarchical Bayesian model Created 2026-10-05 Updated 2026-10-06
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.
Law of total covariance 2026-10-07
For square-integrable random variables, expand and into their conditional expectations and their centered conditional residuals. The cross terms vanish by the law of total expectation, giving the displayed covariance decomposition. Conditional independence can therefore coexist with positive unconditional covariance from a shared latent variable.
Generate a finite mixture model by drawing a categorical variable with , then drawing from the mixture component . The indicator random variables satisfy : exactly one mixture component generates each draw. The joint probability distribution obeys , and the law of total probability gives the mixture distribution after summing out .[ref]
For independent draws from this statistical model, draw a fresh for each . Drawing one shared latent variable for an entire collection is a different joint probability distribution: its individual marginal distributions can match the same mixture distribution while its observations are dependent.
Mixture model Created 2026-09-24 Updated 2026-10-14
A mixture model represents a population probability distribution by choosing one mixture component at random and then drawing from its probability distribution. For a finite mixture model whose mixture components have probability density functions , the resulting mixture distribution has probability density function
The mixture weights ensure and . For discrete random variables the same formula uses probability mass functions; without either kind of density, write for component distributions . A zero mixture weight makes that mixture component inactive.[ref]
The mixture components need not occupy disjoint bins of . Two normal distributions both have positive probability density functions everywhere, so the same value can plausibly come from either mixture component. The Two-Gaussian mixture example makes this overlap visible, and its mixture responsibilities quantify the remaining uncertainty about the latent variable. This is useful when a single normal distribution cannot represent the population's shape, but a fitted mixture model alone does not establish that its mixture components are real biological or social groups.
A normal local effect can be represented by a standardized latent variable independent of the hyperparameters, with . This preserves the hierarchical model while changing the coordinates explored by Markov chain Monte Carlo. It often improves mixing when individual effects are weakly informed, reducing strong scale-effect dependence. Centered coordinates can be better with very informative individual data. The stochastic prior on implements the transformation correctly; re-expressing an existing density directly instead requires the appropriate Jacobian determinant.
In a finite mixture model with hidden membership, the component label is a latent variable and is observed. If an actual recorded label specifies which mixture component generated , then is observed and its likelihood contribution is . With the label hidden, the observed likelihood contribution is the sum . A hard assignment chosen from mixture responsibilities is an inference under the statistical model, not an additional recorded label.
For observed data and latent variables , let be the complete-data log-likelihood. From a current parameter , the expectation-maximization algorithm computes
and then chooses maximizing this function in its first argument. Thus the E-step averages the missing information conditional on the current model and observed data; the M-step treats those expectations as fixed while maximizing.
For a short proof of likelihood function monotonicity, let . Then
The Jensen inequality for the logarithm gives . The M-step makes the right side nonnegative. Thus observed likelihood function cannot decrease. This proves the usual EM likelihood monotonicity, while allowing convergence to local stationary points rather than guaranteeing a global maximum.
Take the missing strong-swimmer times , , as the latent variables. Their partners' times are . The complete-data log-likelihood is
For the E-step of the expectation-maximization algorithm, use the conditional split of two exponential times. At the old rates, with ,
This is a truncated exponential distribution, whose conditional expectation is
The displayed mean follows by integrating against the conditional density; the missing weak-swimmer mean is . As , the conditional density becomes uniform on and .
Write and . The E-step objective is
Setting its partial derivatives to zero gives the unconstrained M-step
These are eight divided by the completed expected totals for the corresponding swimmers; imputing only observed pair totals without the conditional split would not perform the E-step.
The stated ordering must also be enforced. The ordered-rate exponential M-step accepts these updates when , so . Otherwise its maximum on the closed constraint lies at
Under a strictly open constraint , a boundary optimum is only a supremum; a finite interior maximizer is not assured for every possible sample. One should report that situation rather than swap the labeled swimmer groups. Starting from positive ordered rates, iterate the E-step and constrained M-step until the parameter changes and observed log-likelihood improvement are small. EM likelihood monotonicity applies to every exact constrained M-step. No numerical swimming times are supplied, so the data-dependent updates, rather than fabricated numerical estimates, are the answer.
Both data augmentation and the expectation-maximization algorithm introduce latent variables that make the complete-data model easier to handle. The observed-data likelihood is obtained by summing or integrating over the missing data, and both methods use the conditional law of given the observations and current parameters.
In data augmentation for Bayesian inference, one alternates random draws
These are Gibbs sampler updates on the joint posterior distribution; marginal parameter draws explore the whole posterior, including uncertainty, provided the chain converges appropriately. The parameter conditional incorporates its prior.
The expectation-maximization algorithm is instead a deterministic optimization procedure. Its E step forms
and its M step maximizes this function over . Exact steps do not decrease the observed-data likelihood function. Their aim is a likelihood stationary point, often a local maximum, rather than draws from a parameter distribution. Adding a log prior to the maximization gives a posterior-mode version, which still does not sample the posterior.
Data augmentation samples conditional missing data and parameters; EM averages the complete-data log likelihood and optimizes parameters. The E step is an expectation of the log likelihood, not the log of an averaged likelihood, and generally is not equivalent to merely replacing each missing value by its conditional mean. A Monte Carlo E-step approximation is a further variant of EM, not automatically the same procedure as a data augmentation chain.
Introduce a categorical latent variable for each observation, with , and let . Conditional on , has a normal distribution of mean and the shared variance . The complete-data log-likelihood function is
Initialize finite means, positive weights summing to one, and a positive common variance. At iteration , the Bayes' theorem gives the E-step mixture responsibilities
The common normal-density factor cancels. The observations' conditional labels are independent, and replacing by their conditional expectations gives
Set ; because , . The constrained weight maximization uses a Lagrange multiplier : differentiating gives , and summing fixes . Differentiating the residual quadratic in each mean gives . Hence the first two M-step updates are
With these new means define . The remaining objective in is , whose derivative is . For it increases up to and decreases afterwards. Thus the shared-variance update is
The denominator is , not and not a separate count for each component: this is maximum likelihood estimation with one common variance. These are the EM for Gaussian mixtures with a common variance updates. Recompute responsibilities with the new parameters and repeat until the observed-data likelihood changes sufficiently little.
The monotonicity claim also follows directly. For positive old weights, the likelihood ratio for observation is
Apply the Jensen inequality to the logarithm and sum over observations. This yields
for the maximizing M step. This proves likelihood increase, not convergence to the global maximum. Use several initializations to reduce sensitivity to local maxima. Compute responsibilities with a log-sum-exp function normalization to avoid numerical underflow.
If , that component's updated weight is zero and its mean is unidentified; retain its old mean or remove the empty component. Strictly positive interior initialization avoids this case in exact arithmetic while the variance stays positive. If , there is no positive finite variance maximizing this M step: the objective tends to infinity as . Such boundary degeneracy needs a variance constraint or regularization, as discussed in the next solution. For the formulas reduce to the ordinary sample mean and the maximum-likelihood variance .
The Bayesian network has a shared parent and, for each hospital, the chain . A plate encloses the hospital-specific pair. Observed counts are shaded; the local rates are latent variables. Conditional on , the pairs are independent.
Figure 1.
Directed graph of a Poisson–exponential hierarchical model
. Details.