On this page
Means always add: E[X + Y] = E[X] + E[Y], whatever the link between X and Y. Variances do not. How spread out a sum is depends on whether its parts tend to move together, and the covariance term measures exactly that. Below are the formula, the one condition that lets you drop the extra term, and three worked examples.
What is the formula for the variance of a sum?
For any two random variables with finite variances, Var(X + Y) = Var(X) + Var(Y) + 2Cov(X, Y), as proved step by step in The Book of Statistical Proofs.
Covariance is Cov(X, Y) = E[(X − E[X])(Y − E[Y])], which works out to E[XY] − E[X]E[Y].
The proof is one line of algebra. Write Var(X + Y) as E[((X − E[X]) + (Y − E[Y]))²] and expand it like (a + b)² = a² + b² + 2ab. The a² part averages to Var X, the b² part to Var Y, and the 2ab part to 2Cov(X, Y).
Two consequences:
Var(X − Y) = Var X + Var Y − 2Cov(X, Y).
Var(aX + bY) = a²Var X + b²Var Y + 2abCov(X, Y), so constants come out squared.
When can you just add the variances?
When X and Y are independent, Cov(X, Y) = 0, so Var(X + Y) = Var X + Var Y; this is the additivity-under-independence result in The Book of Statistical Proofs. The same holds for any number of independent variables: add all their variances.
The converse is false, and it makes a favourite assertion-reason trap. Let X be −1, 0 or 1 with equal chance, and let Y = X². Then E[X] = 0 and E[XY] = E[X³] = 0, so Cov(X, Y) = 0. Yet Y is completely fixed by X. Zero covariance means no linear relationship, not independence. For adding variances, though, zero covariance is all you need.
How do you find the variance of the number of heads?
Toss a fair coin 10 times and let H be the number of heads. Write H as a sum of indicators, H = I₁ + I₂ + ... + I₁₀, where Iₖ is 1 if toss k lands heads and 0 otherwise. It is the same trick behind linearity of expectation with indicator variables.
One indicator: E[Iₖ] = 1/2, and since Iₖ² = Iₖ, E[Iₖ²] = 1/2. So Var(Iₖ) = 1/2 − 1/4 = 1/4.
Independence: separate tosses do not affect each other, so every covariance is zero.
Add: Var(H) = 10 × 1/4 = 2.5, and the standard deviation is √2.5 ≈ 1.58.
In general, n independent trials with success probability p give variance np(1 − p); The Book of Statistical Proofs derives the binomial variance exactly this way, as a sum of n independent Bernoulli variances.
Now the contrast shown in the diagram. Suppose you toss once and copy that result 10 times. The mean count is still 5, but H = 10I₁, so Var(H) = 100 × 1/4 = 25. Every pair of indicators now has covariance 1/4, and the 90 ordered pairs add 90 × 1/4 = 22.5 to the 2.5. Same mean, ten times the variance, and the covariance terms did all of it.
What if the trials are not independent?
Draw 2 cards from a 52-card deck without replacement and count red cards, R = I₁ + I₂. Each draw is red with probability 1/2, so each indicator still has variance 1/4. But P(both red) = (26/52)(25/51) = 25/102, so Cov(I₁, I₂) = 25/102 − 1/4 = −1/204.
Then Var(R) = 1/4 + 1/4 − 2/204 = 25/51 ≈ 0.490, a little less than the 0.5 you get with replacement. The negative covariance makes sense: a red first card leaves fewer reds for the second. It is also why draws without replacement are not binomial, as our four-condition test for a binomial distribution explains.
A four-step method for any variance-of-a-sum question
Split the quantity into simple pieces, often indicators that are 1 or 0.
Find each piece's variance; for an indicator with probability p it is p(1 − p).
Decide, pair by pair, whether the pieces are independent. If not, find Cov = E[XY] − E[X]E[Y], where E[IᵢIⱼ] is just the probability that both events happen.
Add all the variances, plus twice the covariance of every pair i < j.
If variance itself still feels shaky, start with mean deviation, variance and standard deviation in Class 11. If covariance or independence is the gap, the Fermi Concept Library gives every concept in mathematics its own lesson. And when a problem mixes dependent draws and you cannot tell which covariances vanish, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.
Try one now: find the variance of the number of sixes in 12 rolls of a fair die. (Answer: 12 × 1/6 × 5/6 = 5/3.)



