Joint, Marginal and Conditional Distributions
Almost nothing in physics is measured one number at a time. A tracking detector reports a position and a momentum; a gravitational-wave interferometer reports a strain time-series whose samples are all correlated. To describe several random quantities together we need one object: the joint distribution over a vector of random variables. This single function is the complete probabilistic description — every question you can legitimately ask, individually or in combination, is already answered inside it and extracted by nothing more than integration. Two operations do almost all the work. Marginalisation integrates out the variables we do not care about, collapsing the joint to the law of what remains — "the distribution of alone?" Conditioning fixes some variables at observed values and renormalises the surviving slice — "given , the law of ?" Conditioning is the continuous face of conditional probability, and Bayes' theorem is just the statement that and are two views of the same joint density. Dependence is summarised — usefully but incompletely — by the covariance matrix, its diagonal holding variances and its off-diagonal entries measuring how variables move together; rescaled by the standard deviations it becomes the correlation . Covariance sees only linear association, so it can vanish while the variables remain tightly, non-linearly bound; genuine independence is the stronger statement that the joint factorises. Only for jointly Gaussian variables do the two coincide — which is exactly why the multivariate normal governs so much of physics.
- The joint distribution of several random variables is the complete probabilistic description; for two continuous variables it is a density that integrates to one over the plane.
- Marginals come from integrating the unwanted variables out: . Conditionals come from fixing a value and renormalising: .
- Independence is factorisation, ; it is equivalent to "every conditional equals the corresponding marginal".
- Covariance and the dimensionless correlation quantify only linear dependence.
- Independence forces , but zero covariance does not force independence — except for jointly Gaussian variables, where it does.
- Dependence propagates: , the term the naive "add errors in quadrature" rule wrongly drops.
- Key idea: the joint distribution is the master object — marginals come from integrating out variables, conditionals from fixing and renormalising, and covariance and correlation summarise the linear dependence, with independence equivalent to the joint factorising into its marginals.
The joint distribution is the complete description; marginals come from integrating out variables, conditionals from fixing and renormalising, and covariance and correlation summarise the (linear) dependence — with independence equivalent to factorisation of the joint into its marginals.
Where this lives today
Joint, marginal, and conditional distributions are the daily machinery of quantitative physics. In precision cosmology the analysis of the Planck cosmic-microwave-background data delivers a high-dimensional joint posterior over cosmological parameters; the headline numbers — the matter density, the Hubble constant — are marginals got by Markov-chain Monte Carlo integrating out every nuisance parameter, and the "banana" contours in a – plane are two-dimensional marginals whose tilt is a correlation. In gravitational-wave astronomy, LIGO and Virgo model detector noise by a large covariance matrix and infer source masses and spins as marginals of a joint posterior. The Kalman filter that steers spacecraft is the bivariate-Gaussian conditioning of Derivation C applied recursively, each measurement updating a Gaussian prior exactly as prescribes. Principal-component analysis diagonalises to find the uncorrelated (for Gaussians, independent) modes carrying the variance. And every serious particle-physics uncertainty now ships a full covariance matrix, because the correlated-error arithmetic of Worked Example 3 is the difference between a correct and an overconfident result.
The physical picture
Picture the joint density of two variables as a hill of probability over the plane, its enclosed volume exactly one — normalisation. Marginalising over is like shining a lamp down the -direction and reading the shadow the hill casts on the -axis: you sum the probability in every -column, and what remains is the law . Conditioning on is the complementary move: cut the hill along , take the exposed profile, and rescale it to area one again — because a raw slice does not integrate to one, and only a renormalised slice is a legitimate density.
Whether the hill tilts is what covariance measures: positive if large accompanies large , negative if large accompanies small . But a hill can be circular, or symmetric like a saddle or a ring, with no net tilt at all — covariance zero — while still richly structured, so knowing tells you a great deal about . That gap is why "uncorrelated" is weaker than "independent". Independence is the special case where the hill is an exact product of a profile in and a profile in : every conditional slice is then a rescaled copy of the single marginal.
The correlation coefficient is covariance with the units divided out — a pure number in reporting how tightly the samples hug a straight line, exact linear dependence and no linear trend. For the Gaussian hills above, fixes the entire dependence structure: the conditional law of given is — mean sliding linearly with , variance shrunk from one to .
The core equations
The starting point is the joint cumulative distribution function and, when it is smooth, the joint density obtained by differentiating in both arguments — the probability mass per unit area, from which everything else is computed.
where: — joint cumulative distribution function; — joint probability density; — values of . Reading it: the CDF accumulates probability over the quadrant below-and-left of ; the mixed derivative recovers the local density. A joint density is admissible exactly when it is non-negative and integrates to one — normalisation in two dimensions.
where: — joint density, non-negative and integrating to unit mass. Reading it: the probability hill has volume one, so any legitimate reduction must preserve that. Marginalisation integrates the unwanted variable out — the shadow the hill casts on each axis.
where: — marginal densities of and . Reading it: to forget a variable, integrate over it; derived in Derivation A. Conditioning fixes one variable and renormalises the exposed slice by the marginal, giving a proper density in the survivor.
where: — density of given ; — marginal of , the normaliser. Reading it: the raw slice has area , so dividing restores unit area. Bayes' theorem is the identity that both conditionals are the joint divided by a marginal, so one determines the other.
where: — reverse conditional, the likelihood; — prior marginal on ; — the evidence. Reading it: the continuous engine of Bayesian inference. The covariance is the mean of the product of the centred variables — one number for how they co-vary about their means.
where: — the means ; — mixed second moment. Reading it: positive when both exceed their means together, negative when one exceeds as the other falls short; it captures linear co-movement only. Dividing covariance by the two standard deviations strips the units, giving the correlation that Cauchy–Schwarz confines to .
where: — standard deviations; — dimensionless linear correlation. Reading it: is exact linear dependence, no linear trend; see Derivation B. The variance of a linear combination carries a covariance cross-term — what correlated measurement errors add.
where: — real constants. Reading it: only when do variances add in quadrature; otherwise shifts the result. Expectations of any function of the pair come from weighting with the joint density — LOTUS in two variables.
where: — any measurable function of both variables. Reading it: integrate against the joint density directly, never needing the law of itself. For several variables the covariances organise into a symmetric, positive-semidefinite matrix with the variances on its diagonal.
where: — the covariance matrix, symmetric with . Reading it: for a Gaussian this matrix and the mean vector are the entire distribution — every marginal and conditional follows from it.
The goal is to show that the two reduction operations are not definitions imposed from outside but forced consequences of what a joint distribution already is. We start from the joint cumulative distribution function, obtain the marginal by pushing the other variable to infinity and differentiating, and obtain the conditional as the unique renormalisation of a slice that integrates back to one — so marginalisation and conditioning are the only self-consistent answers to "the law of alone" and "the law of given ".
Step 1. Write the marginal CDF of by allowing any value: . Why: "the law of alone" places no restriction on , which in CDF language sends its upper limit to infinity.
Step 2. Express it as an integral of the joint density and differentiate: . Why: the density is the derivative of the CDF, and the double integral exposes the inner -integral that survives.
Step 3. The outer derivative cancels the outer integral, leaving , equation (3). Why: differentiating an accumulation in undoes it, so only the integration over the discarded remains — marginalisation is "integrate out what you drop".
Step 4. Now fix . The raw slice integrates over to , not to one, so dividing by that constant gives , equation (4). Why: a conditional must be a genuine density in , and there is exactly one rescaling that restores unit area — division by the slice's own total mass .
Step 5. Rearranging equation (4) as and equating the two products gives Bayes' theorem, equation (5). Why: the joint factors two ways, and setting them equal is the identity that inverts a forward likelihood into a posterior.
Go deeper · Derivation B · 1 minWhy the correlation coefficient lives in minus one to plus one
The goal is to prove the sharp bound and, in the same stroke, see why independence forces zero correlation while zero correlation does not force independence. The bound is Cauchy–Schwarz applied to the centred variables, got by demanding a certain expected square stay non-negative for every real parameter; the equality condition pins down the extremes, and a symmetric counterexample shows the converse fails — the backbone behind treating as a normalised measure of linear association.
Step 1. Centre the variables as , , and consider for real . Why: pointwise, so for every — one scalar inequality that encodes the whole bound.
Step 2. A quadratic with that never goes negative has non-positive discriminant ; with , , this is . Why: a positive discriminant would let the parabola dip below zero, contradicting .
Step 3. Simplify to , i.e. , so and . Why: this is Cauchy–Schwarz for the inner product ; dividing by the variances gives the correlation squared.
Step 4. Equality holds only when , i.e. almost surely — an exact affine relation , with the sign of setting the sign of . Why: a non-negative quadratic touches zero only at a double root, and forces the bracket to vanish with probability one.
Step 5. Now suppose and are independent, . By LOTUS , so . Why: factorisation separates the double integral, so the mixed moment collapses to the product of means — independence always kills covariance.
Step 6. The converse fails: let be symmetric about zero and ; then , so , yet is a deterministic function of . Why: the parabola has no linear trend even though the dependence is total — uncorrelated is strictly weaker than independent.
Go deeper · Derivation C · 1 minConditioning a bivariate Gaussian yields another Gaussian
The goal is to prove the single most-used fact about correlated Gaussians: if are jointly normal, the conditional law of given is again normal, its mean moving linearly with and its variance reduced below the marginal by the correlation. We take the standardised bivariate normal with correlation , divide by the Gaussian marginal of , and complete the square in ; out drops — the result behind linear regression, Kalman filtering, and the reason uncorrelated upgrades to independent for Gaussians.
Step 1. Start from and the marginal , and form . Why: conditioning is equation (4), so we need the exponent surviving after the -marginal is divided out.
Step 2. Combine the exponents. The marginal contributes , which cancels the -only pieces of the joint, leaving in just plus terms independent of . Why: any factor without is a constant for the conditional in and is swept into the normalisation.
Step 3. Complete the square: , so . Why: the exponent is now a perfect square in ; the leftover has no and is absorbed by the normaliser.
Step 4. Read off the parameters: , so and . Why: matching identifies and directly.
Step 5. Set : the conditional collapses to , exactly the marginal of — knowing tells you nothing. Why: for Gaussians zero correlation makes the conditional equal the marginal, i.e. independence — the "uncorrelated becomes independent" gate that fails for general distributions.
Limiting cases
Special structures of the joint distribution collapse the general machinery into one-line statements — each row a place where a full joint law degenerates into something simpler.
| Case | Result | Meaning |
|---|---|---|
| Independence | Every conditional equals its marginal; covariance and correlation vanish; the joint characteristic function factorises. | |
| Perfect linear dependence | The Cauchy–Schwarz bound is saturated; the probability hill collapses onto a straight line in the plane. | |
| Jointly Gaussian, uncorrelated | For the multivariate normal only, zero covariance upgrades to full independence; the density factorises. | |
| Discrete joint | Integrals become sums; each marginal mass is a row or column sum of the joint table. | |
| Uncorrelated, non-Gaussian | but | No linear trend, yet dependence survives in higher moments — e.g. with symmetric . |
Worked examples
1 · A discrete joint table, worked end to end (confidence builder)
Two binary detector flags fire with joint probabilities , , , . Find the marginals, a conditional, the covariance and correlation, and decide whether the flags are independent.
Step 1. Marginals are row and column sums. Over : , . Over : , . The cells sum to , so it is a valid joint law, and , .
Step 2. A renormalised conditional slice: , whereas . Because the law of changes when flips, the flags are already visibly dependent.
Step 3. Covariance from the mixed moment: only the cell contributes, so and — positive, so the flags tend to fire together.
Step 4. Correlation. For a variable , so , ; , . Hence , consistent with Step 2.
Step 5. Independence check: independence needs , but the table has . The joint does not factorise, so and are dependent, agreeing with . Marginals 0.4/0.6 and 0.5/0.5, , , dependent.
2 · A continuous joint density on the unit square (fully worked)
Two quantities have joint density on the unit square , zero elsewhere. Find the marginal of , the conditional , the covariance, and the correlation.
Step 1. Normalise, then marginalise: , a legitimate density. Integrating out gives , and by symmetry . .
Step 2. Conditional by equation (4): . It depends on — at it is (rising), at nearly flat — so the conditional is not the marginal and the variables are dependent. .
Step 3. Moments: , , so .
Step 4. Covariance: , so — slightly negative, since under this density a large makes a large marginally less likely.
Step 5. Correlation: with , — the small tilt the density carries. , , dependent despite the tiny correlation.
3 · Correlated errors: why quadrature can lie
Two resistors in series, , are each measured with uncertainty . A shared calibration correlates the measurements at . Find the uncertainty in for .
Step 1. Apply equation (8) with : , with , so .
Step 2. Uncorrelated (): , — the familiar "add in quadrature" answer.
Step 3. Positively correlated (): , — the shared calibration inflates the error by . Anti-correlated (): , — the errors partly cancel. Quadrature gives regardless; the truth is or depending on the sign of .
Physics of the portrait
The idea that dependence between two measured quantities is itself a number — bounded, dimensionless, computable — arrived late, out of nineteenth-century attempts to quantify heredity, then flowed back to unify the theory of errors Gauss and Laplace had begun.
Origins · 1 mincorrelation coefficient and how this was discovered
The correlation coefficient is younger than the objects it measures. Joint laws of errors were already in use when Gauss formulated the normal law of observational error in 1809 and Laplace, working on astronomical and geodetic errors, developed the multivariate normal and its characteristic functions — but neither wrote down a normalised measure of dependence. That step came from the study of heredity. Francis Galton, plotting parents' heights against their children's around 1885, noticed both "regression toward the mean" and a reproducible "co-relation", sketching the tilted elliptical scatter that is the bivariate normal seen from above. Karl Pearson made it exact: in 1896 he defined the product-moment coefficient , proved it lay in , and tied it to the bivariate normal whose contours are Galton's ellipses. The measure-theoretic footing that made a "joint distribution" a precise object — one probability measure on a product space, with marginals and conditionals derived by projection and disintegration — came with Kolmogorov's axioms in 1933. The physicist inherits it all at once: a covariance matrix for detector noise, a correlation reporting how two channels move together, and a conditional Gaussian at the heart of least-squares fitting, the Kalman filter, and correlated-error propagation.
Going further
Texts. Stone and Goldbart, Mathematics for Physics, probability chapter · Arfken and Weber, Mathematical Methods for Physicists, probability chapter (multivariate distributions and conditioning) · Hassani, Mathematical Physics, probability and statistics · Byron and Fuller, Mathematics of Classical and Quantum Physics, probability sections · Riley, Hobson and Bence, Mathematical Methods for Physics and Engineering, ch. 30 · Feller, An Introduction to Probability Theory and Its Applications, vol. 1. The worked-example results are: the discrete table gives , ; the density gives , ; the correlated sum gives for .
Prerequisites. Random Variables and Probability Distributions · Conditional Probability and Bayes' Theorem · Expectation, Variance and Moments · Axioms of Probability. Leads to. Multivariate Gaussian Distribution · Central Limit Theorem · Moment-Generating and Characteristic Functions · Laws of Large Numbers and Convergence of Random Variables.
Ask the tutor: Ask me to build a joint distribution of your own — a table or a density — and I will walk you through its marginals, a conditional, and its correlation, or show you exactly why uncorrelated need not mean independent.
What exactly is the difference between a joint, a marginal, and a conditional distribution?
They are three views of one object. The joint is the master: it assigns probability to every combination of values and contains everything. A marginal such as is what you get by forgetting the other variable — integrating it out, collapsing the hill onto one axis. A conditional such as is what you get by learning the other variable's value — cutting the hill along and rescaling to unit area. Marginalising discards information; conditioning uses it. Both come from the joint, and neither can recreate the joint alone unless the variables are independent.
Why do I divide by the marginal when I condition, but not when I marginalise?
Because the two operations have opposite jobs. Marginalising sums probability — you add the joint over every value of the discarded variable, and since the joint already integrated to one, the result does too; no rescaling is needed. Conditioning restricts attention to one slice , and a raw slice encloses area , generally less than one. Dividing by is the unique rescaling that restores unit probability. So the marginal appears as a divisor only in conditioning, precisely because only conditioning breaks normalisation.
Does zero correlation ever guarantee independence?
In exactly one situation: when the variables are jointly Gaussian. There the entire dependence structure sits in the covariance matrix, so zeroing the off-diagonal really does factorise the joint into marginals — uncorrelated becomes independent. Outside the Gaussian world this fails spectacularly: take symmetric about zero and , and the covariance is zero for lack of a linear trend even though is completely determined by . Covariance is blind to everything except linear co-movement, so a zero value rules out linear association only, never dependence in general — unless you already know the variables are Gaussian.
How does Bayes' theorem fall out of these definitions?
It is pure bookkeeping on the joint density. The joint factors two ways — and equally — because either variable can be the one you condition on. Setting the two products equal and solving for gives , Bayes' theorem. The pieces are named: prior, likelihood, evidence, posterior. So Bayes' theorem is not an extra axiom but the statement that a joint density has two equivalent conditional factorisations.
Why does the covariance term matter so much in error propagation?
Because dropping it can make your quoted uncertainty flatly wrong, either way. The variance of a sum (or any function) of correlated inputs carries a cross-term , and the naive "add in quadrature" rule silently zeroes it — valid only for uncorrelated inputs. Real measurements are often correlated through a shared calibration or systematic. As Worked Example 3 shows, two uncertainties combine to if independent, but if or if anti-correlated — nearly two to one. This is why modern experiments publish full covariance matrices, not lists of independent error bars.
What makes the covariance matrix positive semidefinite, and why should I care?
It is positive semidefinite because it is built from expectations of squares: for any weights , , so automatically. You care for three reasons. Every eigenvalue is non-negative, so diagonalising yields real variances along uncorrelated principal directions — the basis of principal-component analysis. It is a consistency check: a matrix with a negative eigenvalue cannot be a genuine covariance and signals an error. And for a Gaussian it must be invertible to write the density at all, its inverse (the precision matrix) appearing in the exponent.