Variance of Sums of Random Variables
Suppose you average ten independent thermometer readings to estimate a true temperature. How much less variable is that average than a single reading? The answer hinges on a deceptively simple question. What happens to variance when random variables are added together? Unlike expectation, which always adds linearly regardless of dependence, variance does not add. It adds only when we account for how the variables move together. The bridge between the variance of a sum and the variances of the parts is Covariance and Correlation. The formula that makes this bridge precise is one of the most-used identities in all of probability and statistics. This matters because sums and averages of random variables are the basic objects of statistical inference. Sample means, regression coefficients, portfolio returns, and estimators of every stripe are linear combinations of underlying random quantities. To assess their reliability, we must know how variance behaves under addition. This applies to building confidence intervals, comparing estimators, and understanding diversification in finance. The formula also sets the stage for two of the deepest results in the subject. These are the Weak Law of Large Numbers and the Central Limit Theorem. Both depend critically on the variance of a sum shrinking or growing in a controlled way. This control matters as the number of terms increases. The big picture is this: variance is a quadratic functional. Quadratic functionals of sums always produce cross terms. For a sum of two random variables, expanding the square in the definition of variance mechanically produces a covariance term. For a sum of many variables, this becomes a double sum over all pairs. It collapses beautifully to a sum of variances alone. This happens precisely when the variables are pairwise uncorrelated. This single fact — variances add under uncorrelatedness — is the quiet engine behind the shrinking spread of sample averages. It underlies the entire edifice of large-sample statistics. This article develops the general bilinear formula for the variance of a linear combination of random variables. It proves the formula rigorously from the definition of variance via covariance. It specializes the formula to the i.i.d. case that underlies the law of large numbers. It also works through concrete numerical examples that expose exactly where correlation helps or hurts. A counterexample shows what fails when independence is dropped. The closing sections connect the formula to its far-reaching consequences.
- Variance of a sum is not simply the sum of variances unless the variables are uncorrelated.
- The general formula is .
- For pairwise uncorrelated variables, all cross terms vanish and variances simply add.
- For i.i.d. variables with variance , the sum of of them has variance , and the sample mean has variance .
- Positive covariance between summands inflates variance; negative covariance shrinks it — this is the mathematics of diversification.
- Key idea: variance is a quadratic form in the summands, so cross-covariances must be tracked unless independence (or zero correlation) kills them.
Where this lives today
In finance, Markowitz portfolio theory is built entirely on the quadratic form , where minimizing this quadratic form subject to a return constraint is precisely how "efficient" diversified portfolios are constructed. In statistics, the variance of a sample mean, , is the single most-used fact in the construction of confidence intervals and hypothesis tests, and it is the direct i.i.d. corollary proved above. In Monte Carlo methods and computational statistics, the variance of an average of simulation draws determines the number of samples needed for a target precision, and control-variate and antithetic-variate techniques deliberately engineer negative covariance between simulation terms to shrink , mirroring Example 1 exactly. In signal processing and time series analysis, the variance of a weighted sum of correlated noise terms (autocovariance) governs the performance of filters and estimators. In genetics and quantitative biology, the additive variance decomposition for polygenic traits — where the phenotype is modeled as a sum of many small independent genetic contributions — is a direct application of the pairwise-uncorrelated corollary. Finally, this formula is the algebraic seed from which the Weak Law of Large Numbers grows (via Chebyshev's inequality applied to a sample mean whose variance shrinks like ), and it supplies the exact normalizing scale that makes the Central Limit Theorem's rescaling of sums meaningful.
Ask the tutor: Can you show me how the variance-of-sums formula is used to derive Chebyshev's inequality bound in the Weak Law of Large Numbers?
Let be random variables on a common probability space, each with finite second moment, so that and are well-defined finite numbers for all . For real constants , define the linear combination
The variance of the sum is defined, as for any random variable with finite second moment, by
The object of study in this article is the explicit expansion of in terms of the individual variances and the pairwise covariances , .
Intuition
Think of each random variable as a vector of fluctuations around its mean, and think of variance as the squared length of that fluctuation vector. When you add two random variables, you are adding two vectors, and the Pythagorean-style law for squared lengths of a sum of vectors involves not just the two squared lengths but also twice their inner product. Covariance plays exactly the role of that inner product: it measures the extent to which the fluctuations of and point in the "same direction." If the fluctuations tend to reinforce each other (positive covariance), the combined fluctuation is larger than the sum of the separate spreads would suggest. If they tend to cancel (negative covariance), the combined fluctuation shrinks. Only when the fluctuations are "orthogonal" — uncorrelated — does the sum behave like a genuine Pythagorean sum, with squared lengths simply adding. This geometric picture also explains why independence, which is a much stronger condition than zero covariance, is often invoked in practice: independent variables are automatically uncorrelated, so the cross terms vanish, but the converse is false — variables can be uncorrelated without being independent. The i.i.d. sum formula, central to sampling theory, is the special case where all variances coincide and all cross terms vanish by independence, giving the strikingly clean scaling for a sum of terms and for their average — the seed of the law of large numbers and the central limit theorem.
Let be random variables on a common probability space with for every , and let be constants. Then
Equivalently, writing ,
Corollary (pairwise uncorrelated case). If in addition for all (in particular if are independent), then
Corollary (i.i.d. sum formula). If are i.i.d. with common finite variance , and , then
We prove the main identity directly from the definitions of variance and covariance, using only linearity of expectation. This is a proof by algebraic expansion; no probabilistic machinery beyond linearity of is needed, and finiteness of second moments is what licenses every expectation manipulation below.
Step 1: Reduce to centered variables. For each let , which is finite since implies by the Cauchy–Schwarz inequality (or Jensen's inequality) applied with the constant random variable . Define the centered variable , so . Let . By linearity of expectation,
Hence
This is a valid rearrangement because both sums are finite sums of real numbers and random variables, so ordinary algebra (distributivity, commutativity of addition) applies term by term.
Step 2: Expand the square. By definition,
Expand the square of the finite sum using the distributive law for real numbers (valid pointwise, for every outcome in the sample space, since for each fixed the quantities are real numbers):
This is a finite double sum of real-valued random variables.
Step 3: Justify the interchange of expectation and finite sum. Expectation is linear over finite sums of random variables with finite expectation, so
provided each is finite. This finiteness holds by the Cauchy–Schwarz inequality:
since , a finite quantity because and (again by Cauchy–Schwarz). Thus every term in the finite double sum has finite expectation, and linearity of expectation over finite sums (which holds unconditionally, without independence or any distributional assumption) applies rigorously.
Step 4: Identify the terms as covariances. By definition, for any ,
When this reduces to . Therefore
This proves the second (double-sum) form of the theorem.
Step 5: Split into diagonal and off-diagonal terms. Separate the double sum into the diagonal terms () and the off-diagonal terms ():
Since covariance is symmetric, , each unordered pair with contributes twice to the off-diagonal sum, once as and once as , with identical value . Grouping these identical pairs together,
Substituting back gives exactly the stated formula
Corollary 1. If for all , every term in the off-diagonal sum vanishes, leaving . Independence of implies : this is a standard fact proved from the definition of covariance together with the multiplicativity of expectation for independent random variables, , giving . Pairwise independence therefore suffices; full mutual independence is not required for this corollary.
Corollary 2. Take for all and suppose are i.i.d. with for every . Independence gives pairwise uncorrelatedness, so by Corollary 1,
For the sample mean, apply the general theorem with for all (a single overall constant scaling), using the scaling property which is the case of the theorem itself with :
This completes the proof.
∎Worked examples
Example 1: A weighted portfolio with correlated assets. An investor holds two assets. Asset has annual return with (in percentage-points squared), and asset has . The correlation between the two returns is (they tend to move somewhat oppositely). The portfolio return is
i.e., 70% in asset and 30% in asset . Find . First recover the covariance from the correlation, using :
Apply the theorem with , :
Compute each term:
Summing,
Compare this to what naive addition (ignoring covariance) would give: . The negative covariance between the assets reduces portfolio variance from to — a concrete numerical illustration of diversification. Note also that if the investor had put everything into alone (), variance would be ; the diversified, negatively-correlated mix cuts risk substantially below either individual asset's variance.
Example 2: Non-identically-distributed independent sum with unequal weights. Let be independent (hence pairwise uncorrelated) random variables with
and consider the weighted sum
Here , , . Since independence gives for , Corollary 1 applies and all cross terms vanish regardless of the sign of the coefficients — this is a common point of confusion, since students sometimes expect the minus sign on to subtract variance. It does not, because variance depends on , not . Compute:
So . Notice that even though enters with coefficient , it contributes to the variance, exactly as it would with coefficient — variance cannot distinguish the sign of a linear coefficient acting on a single uncorrelated term, only its magnitude squared. This also illustrates why, for i.i.d.-style reasoning with unequal variances and unequal weights, one must carry each term separately rather than invoking the clean shortcut, which requires both equal variances and equal (unit) weights.
The corollary "" requires . Drop this hypothesis and additivity fails, sometimes dramatically. Let (each value with probability ), so and
Let , a deterministic (but non-constant) function of , so and are certainly not independent, and in fact are strongly dependent. Compute , and
Since takes values with the same probabilities as , . So here even though are dependent — this alone does not yet break the formula, it only shows uncorrelated is weaker than independent. To actually break additivity we need nonzero covariance, so modify the example. Let and itself (perfect positive dependence). Then ; compute
So . If one incorrectly applied the "add the variances" shortcut, one would predict
But exactly (since ), so the true value, using the correct theorem (, but really directly), is
Indeed the full formula confirms this: , so
matching the direct computation exactly. The naive shortcut is only half of the true answer — a factor-of-two error caused entirely by ignoring the covariance term, here as large as the two variances combined. This shows precisely why the hypothesis "pairwise uncorrelated" (weaker than but often justified by independence) cannot be dropped from the additive corollary.
Scope, edge cases & common traps
| Situation | What happens to | Why |
|---|---|---|
| independent | Independence zero covariance | |
| merely uncorrelated (pairwise) | Corollary 1 only needs , not full independence | |
| positively correlated | strictly greater than (generically) | Positive cross terms add |
| negatively correlated | strictly less than (generically) | Negative cross terms subtract — diversification |
| Some | No effect on sign of variance contribution; only matters for the diagonal term | Variance is quadratic in weights |
| Infinite variance (e.g. Cauchy distribution) | Formula does not apply; undefined | Hypothesis fails |
| Constants ( deterministic, but replaced by a constant ) | contributes nothing | Degenerate case of the formula, consistent by definition |
The mathematician behind it
Origins · 1 minAndrei Nikolaevich Kolmogorov and how this was discovered
Kolmogorov placed probability on a rigorous measure-theoretic foundation in his 1933 monograph Grundbegriffe der Wahrscheinlichkeitsrechnung, defining expectation as a Lebesgue integral and thereby giving concepts like variance and covariance an unambiguous, universally applicable meaning. This foundation is exactly what licenses the linearity-of-expectation manipulations used throughout the proof above, regardless of whether the underlying random variables are discrete, continuous, or neither. Kolmogorov's broader program — including his strong law of large numbers and his criteria for convergence of sums of independent random variables — made the variance-of-a-sum formula not just a computational trick but the entry point into the deep asymptotic theory of probability.
Why doesn't variance simply add the way expectation does?
Expectation is a linear functional: always holds, with no assumptions about dependence, because integration (or summation against probabilities) is linear by definition. Variance, however, is defined via a square, , and squaring a sum of two quantities always produces a cross term in ordinary algebra. The same happens with random variables: expanding the square produces a covariance cross term that has no expectation analogue. Variance only becomes additive once this cross term vanishes, which happens precisely when the summands are uncorrelated.
Is independence necessary for variances to add, or is uncorrelatedness enough?
Uncorrelatedness is enough. The proof of the additive corollary uses only for ; it never uses the full strength of independence (that is, joint distribution factorization). Independence is a convenient sufficient condition because it always implies zero covariance, but there exist dependent, even strongly dependent, uncorrelated random variables (see the first construction in the counterexample block, with ) for which variances still add. So "uncorrelated" is the precise hypothesis; "independent" is a stronger, easier-to-verify sufficient condition often used in practice.
How does this formula connect to the Central Limit Theorem?
The Central Limit Theorem studies the standardized sum of i.i.d. variables with mean and variance . The denominator is chosen precisely because , so for every — the variance-of-sums formula is what tells us the correct scale on which to center and normalize so that its distribution can converge to a fixed, non-degenerate limit (the standard normal). Without this exact scaling factor, itself diverges and collapses to a point, so the formula is the load-bearing calculation behind the entire theorem's normalization.
Does the formula require the random variables to be discrete or continuous?
No. The proof uses only linearity of expectation over finite sums and the Cauchy–Schwarz inequality to control finiteness of cross terms — both hold in the fully general measure-theoretic (Kolmogorov) framework for expectation, covering discrete, continuous, and mixed random variables alike, as long as each has a finite second moment. The formula is distribution-free in this sense; it depends only on the covariance structure, not on the specific form of any density or mass function.
What happens if some have infinite variance?
The formula as stated requires for every , because and must be finite numbers for the algebra in the proof to make sense; in particular the Cauchy–Schwarz bound used to show each cross-expectation is finite breaks down entirely. If some has infinite variance (for example, a Cauchy-distributed variable), is not defined, and the entire right-hand side of the formula is meaningless, even if the sum itself happens to have a well-defined distribution. In such cases one must use other tools, such as characteristic functions or stable-law theory, rather than variance decompositions.
How does this generalize to random vectors?
For a random vector with covariance matrix (whose entry is ), and a fixed weight vector , the theorem is exactly the quadratic form identity . The double sum in the proof is simply this matrix product written out in coordinates. This matrix formulation is the standard language in multivariate statistics and portfolio optimization, and it makes manifest that must be positive semi-definite, since for every choice of weights .
Why is the i.i.d. corollary described as "foreshadowing" the law of large numbers?
Because Chebyshev's inequality bounds the probability that deviates from using exactly : as this variance tends to zero, forcing to concentrate arbitrarily tightly around in probability. The entire quantitative content of the Weak Law of Large Numbers — that sample averages converge to the true mean — rests on this single computation that the variance of an i.i.d. sum grows only linearly in , so that dividing by before squaring (as variance does) drives the spread of the average to zero.