Conditional correlation 2026-10-14
The correlation coefficient computed under a conditional distribution, using its conditional covariance and positive conditional variances. It can depend on the observed conditioning value. For a multivariate normal distribution, conditioning on other coordinates gives the corresponding partial correlation.
Let be independent random variables, each with a Bernoulli distribution of parameter , and put . Unconditionally, the four ordered pairs each have probability . On the event , only and remain, each with conditional probability . Thus
Knowing that exactly one trial succeeded makes observing one outcome informative about the other. This violates conditional independence given , even though the original random variables are independent. Given or , both variables are constant random variables and are conditionally independent there; that does not repair the failure at , an event of positive probability.
Figure 1.
Selecting pairs with exactly one success makes independent trials dependent
. Left: four equally probable outcomes of independent fair Bernoulli trials. The selection retains exactly two pairs. Right: their conditional joint table has zero mass on the diagonal and off it. Within this selected model the conditional covariance is ; the two conditional marginal distributions remain fair. Details.
The conditional covariance here is . Both conditional variances are , so the conditional correlation coefficient is : within the selected group, . These conclusions follow from restricting a finite sample space, without positing any physical interaction between the trials.
This example and the shared-environment example establish both logical directions: independent random variables need not be conditionally independent, and conditionally independent variables need not be independent. When is represented as the joint result of two inputs in a causal directed acyclic graph, conditioning on it has the collider structure associated with collider bias. A probability calculation by itself establishes a dependence relation, not a physical causal mechanism or an intervention.
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.
Gaussian conditional expectation Created 2026-09-24 Updated 2026-11-05
Let the joint random vector have a multivariate normal distribution, with expectations , covariance matrices and cross-covariance matrix . If is invertible, the conditional expectation is the affine function
and the conditional covariance matrix is .
To prove both assertions, define . Direct covariance calculation gives . Since has a multivariate normal distribution, this zero cross-covariance implies independence. The decomposition of into its affine part and therefore gives the conditional expectation and the remaining covariance matrix. This is the conditional multivariate normal distribution calculation.
If is singular, replace by its Moore-Penrose inverse . The formulas hold for in its affine probability support, ; values away from that probability support do not determine a unique version of the conditional expectation. For example, if and for a standard normal random variable , then is the all-ones matrix. Although does not exist, on the probability support .
Additional observations weakly decrease the posterior variance at every fixed prediction input. Apply part (ii) repeatedly to add observations one at a time. An observation whose remaining conditional covariance with is nonzero strictly decreases that posterior variance; one with zero remaining conditional covariance leaves it unchanged. Large observation noise reduces the information gained through the denominator .
For fixed Gaussian process hyperparameters and a Gaussian likelihood, the posterior variance depends on the observation locations and noise level, but not on the observed numerical outputs. Hence the reduction holds for each possible new output, rather than only on average. The predictive variance of a future noisy observation also decreases by the same amount because its extra independent noise variance is fixed. Refitting the hyperparameters after adding data can change the covariance function; the monotonicity statement compares conditioning under one fixed model.
The Schur complement can be written
because the first term is a conditional variance and . Therefore and the squared term is nonnegative, so
Equality holds exactly when the remaining conditional covariance is zero. In particular, the reduction need not be strict even at a previously unseen input.
Write and . Apply the Schur complement covariance to the first two coordinates, conditioning on the third. The conditional covariance and conditional variances are
Divide the conditional covariance by the product of the conditional standard deviations. The conditional correlation is therefore
This is the partial correlation after removing the linear effect of . For a nonsingular multivariate normal distribution, both residual variances are positive and the answer is independent of . If a residual variance vanishes, the requested correlation coefficient is undefined, even though the residual covariance formula remains valid.
Write the expected value as and assume the relevant covariance matrix is invertible. Remove the linear predictor from the first block by defining
A linear image of a multivariate normal vector is again multivariate normal. Direct covariance calculation gives
Thus and are independent: uncorrelated jointly Gaussian variables are independent. Expanding the covariance matrix of , using , gives
Conditioning on translates by the fixed vector and leaves its covariance matrix unchanged. Consequently the conditional multivariate normal distribution is
The conditional covariance is the Schur complement and does not depend on .
Positive covariance 2026-11-05
Two random variables have positive covariance when their centered product has positive expected value:
Assume throughout that their second moments are finite. Outcomes where the centered values have the same sign contribute positively; opposite signs contribute negatively. The sign describes their average balance, rather than requiring every outcome to have matching signs.[ref]
A shared group effect can produce positive covariance even when the relation inside each group runs in the opposite direction. For an exact original example, let and be independent random variables with the Rademacher distribution: each takes the values with equal probability. Define and . Both expected values vanish, and independence gives
Their Pearson correlation coefficient is consequently . The four equiprobable outcomes are , , and .
For either fixed value , however, . Thus the conditional covariance is , and the conditional Pearson correlation coefficient is : the two points inside each group lie on a descending line. The law of total covariance identifies exactly where the positive pooled value comes from:
The first term averages the conditional covariances; the second measures how the two conditional expectations move together across groups. Here the between-group contribution outweighs the negative within-group contribution. This is a covariance form of Simpson's paradox.
Figure 1.
Positive pooled covariance with negative conditional covariance in both groups
. Original four-outcome model , with independent equiprobable signs. Colored segments show the two conditional relations; the dashed line is the pooled least-squares fit. These are exact model outcomes, not measured data. Details.
The dashed linear regression line has slope , but that slope does not give the direction of the relation at fixed . Nor does positive covariance by itself establish a causal effect: in the specified model the common variable supplies the positive component. Choosing which variables to condition on is a question about the model and the intended comparison, beyond computing one number.
Positive covariance is also weaker than requiring one variable to be an increasing function of the other. Under appropriate integrability assumptions, strict positive covariance with an increasing payoff supplies a useful sufficient condition; the grouping example shows a different route to the same sign.
Let be a real symmetric matrix with a positive-definite matrix. Its quadratic form satisfies the completing the square identity
For each fixed vector , the unique minimizing vector is , so the minimized value is . Also, is a positive-definite matrix exactly when is a positive-definite matrix, under the stated assumption on .[ref]
An original scalar example is
Here , , , and the Schur complement is . Holding would give , but letting relax to reduces the quadratic form to . At the respective values are and . Eliminating a variable therefore changes the effective cost of the retained variable.
Figure 1.
A Schur complement measures the quadratic form left after another variable relaxes
. Original contours of and the two resulting costs. The minimizing line picks the least value at each fixed ; the plotted profiles are exact model values, not experimental measurements. Details.
State estimation Created 2026-10-03 Updated 2026-10-13
State estimation infers an unobserved state of a dynamical system from its observations and a model of its evolution. An observed position can help estimate an unobserved velocity; repeated noisy observations can help distinguish changes in the state from measurement noise. The result should describe both an estimate and its uncertainty. A Kalman filter does this exactly for a linear Gaussian state-space model, maintaining a conditional expectation and conditional covariance.
The time at which information is available matters. Causal state filtering estimates the present state from observations available now. State prediction estimates a future state from those same observations. Later observations can improve an estimate of a past state, but that is a different information set from the one a live controller had. Kalman explicitly distinguishes these estimation tasks in A New Approach to Linear Filtering and Prediction Problems (1960), section Optimal Estimates.