Skip to content
LeetQuant
F3 Probability and Bayesian Reasoning

F3 · Probability and Bayesian Reasoning · Lesson 3 of 4

Independence and Conditional Independence

Test events for independence, separate pairwise from mutual and marginal from conditional independence, and see how aggregation produces Simpson's paradox.

17 min

Independence means "learning one tells you nothing about the other"

Events AA and BB are independent if

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

When P(B)>0P(B) > 0 this is equivalent to P(A∣B)=P(A)P(A \mid B) = P(A): conditioning on BB leaves the probability of AA unchanged. The product definition is preferred because it is symmetric and still makes sense when P(B)=0P(B) = 0.

Facts worth having ready:

  • If AA and BB are independent, so are AA and BcB^c: P(A∩Bc)=P(A)−P(A)P(B)=P(A)P(Bc)P(A \cap B^c) = P(A) - P(A)P(B) = P(A)P(B^c). The same holds for Ac,BcA^c, B^c.
  • An event of probability 00 or 11 is independent of every event.
  • Disjoint is not independent. If A∩B=∅A \cap B = \varnothing with P(A),P(B)>0P(A), P(B) > 0, then P(A∩B)=0<P(A)P(B)P(A \cap B) = 0 < P(A)P(B). Knowing BB happened tells you AA did not: that is strong dependence.
  • Independence is a property of the measure, not the events' shapes. The same two events can be independent under one PP and dependent under another, which is why "the coin might be biased" changes everything below.

Pairwise is not mutual

Events A1,…,AnA_1, \dots, A_n are mutually independent if for every subcollection SS of two or more indices,

P(⋂i∈SAi)=∏i∈SP(Ai).P\Big(\bigcap_{i \in S} A_i\Big) = \prod_{i \in S} P(A_i).

That is 2n−n−12^n - n - 1 conditions: 44 for three events, 1111 for four. Pairwise independence checks only the (n2)\binom n2 pairs, and it is strictly weaker.

Nor is the single condition P(A∩B∩C)=P(A)P(B)P(C)P(A \cap B \cap C) = P(A)P(B)P(C) enough on its own: take C=∅C = \varnothing. Then both sides are 00 for any AA and BB, including A=BA = B with P(A)=12P(A) = \tfrac12, which are as dependent as events can be.

Worked example

pairwise independent, not mutually independent

Roll two fair dice. Let AA = "the first die is odd", BB = "the second die is odd", CC = "the sum is odd". Are A,B,CA, B, C pairwise independent? Mutually independent?

Show solution

Each event has probability 12\tfrac12 (for CC: the sum is odd exactly when one die is odd and the other even, probability 2⋅12⋅122 \cdot \tfrac12 \cdot \tfrac12).

Pairs. A∩BA \cap B: both odd, 14=P(A)P(B)\tfrac14 = P(A)P(B). A∩CA \cap C: first odd and sum odd means first odd and second even, 14=P(A)P(C)\tfrac14 = P(A)P(C). By symmetry B∩CB \cap C also has probability 14\tfrac14. So the three events are pairwise independent.

Triple. If both dice are odd the sum is even, so A∩B∩C=∅A \cap B \cap C = \varnothing and

P(A∩B∩C)=0≠18=P(A)P(B)P(C).P(A \cap B \cap C) = 0 \ne \tfrac18 = P(A)P(B)P(C).

Not mutually independent: any two of the events determine the third. The structure is parity: CC is the XOR of AA and BB.

The XOR fact generalises and is behind several puzzles. If YY is a fair bit independent of XX (whatever XX's distribution), then Z=X⊕YZ = X \oplus Y is a fair bit independent of XX, because P(Z=1∣X=x)=P(Y=1−x)=12P(Z = 1 \mid X = x) = P(Y = 1 - x) = \tfrac12 for each xx. One fair coin makes the parity of any collection fair.

Knowledge check

Two events have P(A)=0.3P(A) = 0.3 and P(B)=0.4P(B) = 0.4 and are mutually exclusive. Which statement is correct?

Conditional independence

AA and BB are conditionally independent given CC if

P(A∩B∣C)=P(A∣C) P(B∣C).P(A \cap B \mid C) = P(A \mid C)\,P(B \mid C).

Conditional and marginal independence are logically unrelated: either can hold without the other.

Conditionally independent, marginally dependent: a hidden common cause. Choose a coin at random, fair or double-headed, and flip it twice. Given the coin, the flips are independent. Without knowing the coin, a first head is evidence for the double-headed coin, which raises the chance of a second head:

P(H1)=12⋅12+12⋅1=34,P(H1∩H2)=12⋅14+12⋅1=58,P(H_1) = \tfrac12 \cdot \tfrac12 + \tfrac12 \cdot 1 = \tfrac34, \qquad P(H_1 \cap H_2) = \tfrac12 \cdot \tfrac14 + \tfrac12 \cdot 1 = \tfrac58,

so P(H2∣H1)=5/83/4=56≠34P(H_2 \mid H_1) = \tfrac{5/8}{3/4} = \tfrac56 \ne \tfrac34. Repeated draws from an unknown distribution behave like this: independent given the parameter, dependent marginally. Defaults of firms exposed to the same economy, or returns of stocks driven by the same factor, follow the same pattern.

Marginally independent, conditionally dependent: conditioning on a common effect. Flip two fair coins independently and condition on "at least one head". Now P(H1)=23P(H_1) = \tfrac23, yet P(H1∣H2)=12P(H_1 \mid H_2) = \tfrac12: learning the second coin was heads "explains away" the observation and makes a first head less necessary. This is Berkson's paradox. If a fund hires analysts who are strong at either modelling or communication, the two skills look negatively correlated among the hires even if they are independent in the population.

Knowledge check

A bag holds two fair coins and one double-headed coin. You draw one at random and flip it twice. Given the first flip is heads, what is the probability the second flip is heads?

Simpson's paradox

The law of total probability says an aggregate rate is a weighted average of group rates:

P(win∣X)=∑gP(win∣X,g) P(g∣X).P(\text{win} \mid X) = \sum_g P(\text{win} \mid X, g)\, P(g \mid X).

The weights P(g∣X)P(g \mid X) depend on XX. If one option is used mostly in a hard group and the other mostly in an easy group, the first can win inside every group and still lose in aggregate. This reversal is Simpson's paradox. It requires both ingredients: the group mix differs between options, and the group affects the outcome.

Worked example

two strategies across two regimes

A desk records trades from two strategies, split by market regime.

CalmVolatileTotal
Strategy X18 wins / 2040 wins / 8058 / 100
Strategy Y68 wins / 809 wins / 2077 / 100

Which strategy has the better win rate?

Show solution

Within regimes, X wins: 90%90\% vs 85%85\% in calm markets and 50%50\% vs 45%45\% in volatile ones.

In aggregate, Y wins: 77%77\% vs 58%58\%.

Both statements are arithmetic facts. The reversal comes from the weights: X traded 80%80\% of the time in the volatile regime, where everyone wins less, while Y traded 80%80\% of the time in the calm regime. X's aggregate is 0.2×0.9+0.8×0.5=0.580.2 \times 0.9 + 0.8 \times 0.5 = 0.58; Y's is 0.8×0.85+0.2×0.45=0.770.8 \times 0.85 + 0.2 \times 0.45 = 0.77.

To compare like with like, apply both strategies' regime-level rates to a common mix. With a 50/50 mix, X scores 12(0.90+0.50)=70%\tfrac12(0.90 + 0.50) = 70\% and Y scores 12(0.85+0.45)=65%\tfrac12(0.85 + 0.45) = 65\%. X is better at any mix, since it is better in each regime.

Which comparison is "right" depends on the causal story, not the table. If the regime drives both which strategy fired and how likely a win is (a confounder), compare within regimes. If the strategy itself caused the regime split, for example a strategy whose own trading moves the market into volatility, the grouping variable is a consequence of the choice and the aggregate may be the relevant number. Say this out loud in an interview: it is the answer they want.

Knowledge check

Treatment A has a higher success rate than treatment B among young patients and among old patients, but a lower success rate overall. What must be true?

Common interview traps

  • Treating disjoint as independent. They are opposites when both events have positive probability.
  • Draws without replacement are dependent: the second card's distribution depends on the first. They are exchangeable (every order equally likely), which is often what you actually need.
  • Unknown parameters make repeated trials dependent. "The coin may be biased" or "a coin drawn from a bag" turns independent flips into conditionally independent ones.
  • Checking only pairs when an argument needs mutual independence (for example, multiplying three probabilities).
  • Uncorrelated is not independent for random variables: XX uniform on {−1,0,1}\{-1, 0, 1\} and Y=X2Y = X^2 have zero covariance but YY is a function of XX.
  • Conditioning on a selection (survivors, hires, funds still reporting) can create dependence that is not there in the population.

Key takeaways

  • A,BA, B independent iff P(A∩B)=P(A)P(B)P(A \cap B) = P(A)P(B); complements inherit independence; disjoint events with positive probability are dependent.
  • Mutual independence of nn events needs 2n−n−12^n - n - 1 product conditions; pairwise independence is weaker, as the XOR example shows.
  • Conditional and marginal independence are distinct: a hidden common cause creates marginal dependence, conditioning on a common effect creates conditional dependence.
  • Simpson's paradox is the law of total probability with different weights; resolve it with a causal argument, then compare at a common mix.

Practice problems

Finished reading?

Answer the 3 knowledge checks to complete this lesson (0 done).