Search

Search papers and lessons

Statistical Independence

Level 2 · 11 min read

Two events or variables are independent when learning one tells you nothing about the other, which is what lets us multiply their probabilities and add their variances.

On this page

  • Colour = topic mix
  • Probability
  • Sign in to see your progress

TL;DR

Two events are independent when knowing that one happened leaves the chance of the other unchanged. Two random variables are independent when knowing the value of one tells you nothing about the value of the other. Independence is the assumption that lets us multiply probabilities of separate things and add up their variances.

Where you'll see it: in the assumption that repeated coin flips, repeated measurements or separate noise sources do not influence each other, and in the "iid" in almost every statistical model you will meet.

Intuition

Two coins that ignore each other

Flip a coin and then flip it again. The second flip does not care what the first one showed. Knowing the first came up heads does not make the second more or less likely to be heads. That lack of influence is independence.

Now compare two events in one draw from a deck: "the card is a heart" and "the card is red". Knowing the card is red changes the chance it is a heart (from 1/4 to 1/2). These two are not independent. Independence is about whether information moves from one to the other, not about whether the events can happen together.

Why does it matter? Multiplying probabilities is a shortcut that only works when the parts do not interfere. If you want the chance of ten heads in a row, you multiply ten copies of one half. That multiplication is only correct because each flip ignores the others.

flowchart LR
  A[Learn B happened] --> B{Does P of A change?}
  B -- No --> C[A and B are independent]
  B -- Yes --> D[A and B are dependent]
  C --> E[Multiply: P of A and B equals P of A times P of B]

The math

Independent events

Definition: Independent events

Events AA and BB are independent when

P(A∩B)=P(A) P(B).P(A \cap B) = P(A)\,P(B).

Here A∩BA \cap B is the event that both AA and BB happen, and P(⋅)P(\cdot) is the probability of an event. When P(B)>0P(B) \gt 0, this is the same as saying P(A∣B)=P(A)P(A \mid B) = P(A), which is the statement that [[conditional-probability|conditioning on BB]] changes nothing. The product form is the one to use in calculations, because it does not need P(B)P(B) to be positive.

Independent random variables

Random variables XX and YY are independent when every event about XX is independent of every event about YY:

P(X∈S,  Y∈T)=P(X∈S) P(Y∈T)for all sets S,T.P(X \in S,\; Y \in T) = P(X \in S)\,P(Y \in T) \quad \text{for all sets } S, T.

For continuous variables with a joint density p(x,y)p(x,y), this is equivalent to the density factorising:

p(x,y)=pX(x) pY(y).p(x,y) = p_X(x)\,p_Y(y).

The factorised form is the one you check in practice. If the joint density cannot be written as a product of a function of xx and a function of yy, the variables are dependent.

Consequences for means and variances

Independence buys two results that you use constantly. For independent XX and YY:

E[XY]=E[X] E[Y],Var(X+Y)=Var(X)+Var(Y).\mathbb{E}[XY] = \mathbb{E}[X]\,\mathbb{E}[Y], \qquad \mathrm{Var}(X+Y) = \mathrm{Var}(X) + \mathrm{Var}(Y).

The second one is why noise adds up the way it does. Variances add, not standard deviations, so two independent noise sources of standard deviation 3 and 4 combine to a standard deviation of 9+16=5\sqrt{9+16} = 5, not 7. The first one is the statement that the covariance of independent variables is zero.

Mutual independence and iid

Three events can be pairwise independent without being mutually independent. Mutual independence needs the product rule for every subset, including the full set P(A∩B∩C)=P(A)P(B)P(C)P(A \cap B \cap C) = P(A)P(B)P(C).

A sequence X1,…,XnX_1, \dots, X_n is iid (independent and identically distributed) when the variables are mutually independent and all share one distribution. Almost every standard model begins with "assume the samples are iid", because it turns a joint distribution over nn things into a product of nn simple ones.

Worked examples

Example
Two dice: a dependent pair

Roll two fair dice. Let AA be "the first die shows 3" and BB be "the sum is 8".

  1. P(A)=1/6P(A) = 1/6, because one face out of six is 3.
  2. P(B)=5/36P(B) = 5/36, because (2,6),(3,5),(4,4),(5,3),(6,2)(2,6), (3,5), (4,4), (5,3), (6,2) are the five ways to sum to 8.
  3. A∩BA \cap B is the single outcome (3,5)(3,5), so P(A∩B)=1/36P(A \cap B) = 1/36.
  4. Compare P(A∩B)=1/36≈0.0278P(A \cap B) = 1/36 \approx 0.0278 with P(A)P(B)=(1/6)(5/36)=5/216≈0.0231P(A)P(B) = (1/6)(5/36) = 5/216 \approx 0.0231.

Interpretation: the numbers differ, so AA and BB are dependent. Knowing the first die is 3 raises the chance of a sum of 8 from 5/36≈0.1395/36 \approx 0.139 to 1/6≈0.1671/6 \approx 0.167. Information flowed from one die to the sum.

Example
A fair coin, ten times

Flip a fair coin ten times. Each flip is independent and has P(heads)=1/2P(\text{heads}) = 1/2.

  1. The chance the first three flips are all heads is (1/2)3=1/8=0.125(1/2)^3 = 1/8 = 0.125. The product rule applies because the flips are independent.
  2. The chance all ten are heads is (1/2)10=1/1024≈0.000977(1/2)^{10} = 1/1024 \approx 0.000977.
  3. Whatever the first flip shows, the next nine flips keep the same probabilities. That is why the product in step 2 is valid.

Interpretation: a run of ten heads is rare, about one in a thousand, but every specific sequence of ten flips is exactly as rare. And after nine heads, the tenth flip is still 50-50, because independence means the coin has no memory.

Example
Averaging 100 die rolls

A single fair die has mean μ=3.5\mu = 3.5 and variance σ2=35/12≈2.917\sigma^2 = 35/12 \approx 2.917. Roll it 100 times, with every roll independent, and let Xˉ\bar{X} be the average.

  1. The mean of the average is E[Xˉ]=μ=3.5\mathbb{E}[\bar{X}] = \mu = 3.5.
  2. The variance of the sum of 100 independent rolls is 100σ2=291.7100\sigma^2 = 291.7, by the rule Var(X+Y)=Var(X)+Var(Y)\mathrm{Var}(X+Y) = \mathrm{Var}(X)+\mathrm{Var}(Y) applied 99 times.
  3. Dividing the sum by 100 divides the variance by 1002100^2, so Var(Xˉ)=291.7/10000≈0.0292\mathrm{Var}(\bar{X}) = 291.7 / 10000 \approx 0.0292.
  4. The standard deviation of the average is 0.0292≈0.171\sqrt{0.0292} \approx 0.171.

Interpretation: averaging 100 independent rolls shrinks the spread to about 0.17, so the average is usually within a fifth of a point of 3.5. If the rolls were dependent, for example if every roll were copied from the first, the variance would not shrink this way at all.

Tradeoffs and failure modes

Independence is almost always an assumption, not a fact you verify. It is cheap to assume and expensive to get wrong.

SituationWhat goes wrongBetter choice
Two servers share a power supplyTheir failures are correlated, so "both fail" is far more likely than the product saysModel the shared cause explicitly, or use a joint distribution
Time series such as stock returns or sensor readingsNeighbouring values are related, so the mean and variance of the average are wrongUse a [[markov-chain
Samples drawn from one group without replacementEach draw changes the pool, so they are not independentTreat the draws as dependent, or sample with replacement if the pool is large
Uncorrelated variables that are not independentZero correlation looks like "unrelated", so people wrongly multiplyCheck the joint distribution, not just the correlation

A concrete case: two servers each fail with probability 0.01 in a day. If they are independent, both fail with probability 0.01×0.01=0.00010.01 \times 0.01 = 0.0001. If they share a power feed that fails with probability 0.005 and takes both down, then "both fail" is at least 0.005, which is fifty times larger. The independent calculation looked safe and was badly optimistic.

History

The multiplication rule for independent events was in use in the seventeenth century, when people analysed gambling problems. Independence was not given a precise general definition until the theory of probability was put on an axiomatic footing. Andrey Kolmogorov's 1933 axioms made events, random variables and their joint behaviour formal, and independence became a definition inside that framework rather than an informal idea about games.

The phrase "iid" became standard in statistics in the twentieth century, as the central limit theorem and the law of large numbers were proved under this assumption and then applied to samples. Its wide use reflects how often the assumption makes a model tractable, not how often it is true.

Check yourself

QuestionRecall: state the product rule that defines two independent events AA and BB.Show answer

AA and BB are independent exactly when P(A∩B)=P(A) P(B)P(A \cap B) = P(A)\,P(B). Equivalently, when P(B)>0P(B) \gt 0, P(A∣B)=P(A)P(A \mid B) = P(A): knowing BB does not change the chance of AA.

QuestionA fair die and a fair coin are tossed. What is the probability the die shows an even number and the coin shows heads?Show answer

The die and coin are independent. P(even)=3/6=1/2P(\text{even}) = 3/6 = 1/2 and P(heads)=1/2P(\text{heads}) = 1/2. So the probability is (1/2)(1/2)=1/4=0.25(1/2)(1/2) = 1/4 = 0.25.

QuestionWhy does independence imply zero covariance, and why does zero covariance not imply independence?Show answer

If XX and YY are independent, E[XY]=E[X] E[Y]\mathbb{E}[XY] = \mathbb{E}[X]\,\mathbb{E}[Y], so the covariance E[XY]−E[X] E[Y]\mathbb{E}[XY] - \mathbb{E}[X]\,\mathbb{E}[Y] is zero. The converse fails. Let XX take the values −1,0,1-1, 0, 1 with equal probability and let Y=X2Y = X^2. Then E[X]=0\mathbb{E}[X] = 0 and E[XY]=E[X3]=0\mathbb{E}[XY] = \mathbb{E}[X^3] = 0, so the covariance is zero. But YY is completely determined by XX: P(Y=1∣X=1)=1P(Y = 1 \mid X = 1) = 1, while P(Y=1)=2/3P(Y = 1) = 2/3. Covariance measures only linear association, and this relationship is not linear.

QuestionApplied: two independent sensors each misread a reading with probability 0.02. What is the probability both misread, and why might that number be too optimistic?Show answer

Under independence, P(both)=0.02×0.02=0.0004P(\text{both}) = 0.02 \times 0.02 = 0.0004. It is optimistic if the sensors share something that can affect both at once, such as a power supply, a calibration routine, or a physical vibration. Any shared cause puts a floor under the joint probability that the product rule ignores.

Sources