Let A {\displaystyle A} , B {\displaystyle B} , and C {\displaystyle C} be events. A {\displaystyle A} and B {\displaystyle B} are said to be conditionally independent given C {\displaystyle C} if and only if P ( C ) > 0 {\displaystyle P(C)>0} and:
This property is often written: ( A ⊥ ⊥ B ∣ C ) {\displaystyle (A\perp \!\!\!\perp B\mid C)} , which should be read ( ( A ⊥ ⊥ B ) | C ) {\displaystyle ((A\perp \!\!\!\perp B)\vert C)} .
Equivalently, conditional independence may be stated as:
where P ( A , B | C ) {\displaystyle P(A,B|C)} is the joint probability of A {\displaystyle A} and B {\displaystyle B} given C {\displaystyle C} . This alternate formulation states that A {\displaystyle A} and B {\displaystyle B} are independent events, given C {\displaystyle C} .
It demonstrates that ( A ⊥ ⊥ B ∣ C ) {\displaystyle (A\perp \!\!\!\perp B\mid C)} is equivalent to ( B ⊥ ⊥ A ∣ C ) {\displaystyle (B\perp \!\!\!\perp A\mid C)} .
Each cell represents a possible outcome. The events R {\displaystyle \color {red}R} , B {\displaystyle \color {blue}B} and Y {\displaystyle \color {gold}Y} are represented by the areas shaded red, blue and yellow respectively. The overlap between the events R {\displaystyle \color {red}R} and B {\displaystyle \color {blue}B} is shaded purple.
The probabilities of these events are shaded areas with respect to the total area. In both examples R {\displaystyle \color {red}R} and B {\displaystyle \color {blue}B} are conditionally independent given Y {\displaystyle \color {gold}Y} because:
but not conditionally independent given [ not Y ] {\displaystyle \left[{\text{not }}{\color {gold}Y}\right]} because:
Let events A and B be defined as the probability that person A and person B will be home in time for dinner where both people are randomly sampled from the entire world. Events A and B can be assumed to be independent i.e. knowledge that A is late has minimal to no change on the probability that B will be late. However, if a third event is introduced, person A and person B live in the same neighborhood, the two events are now considered not conditionally independent. Traffic conditions and weather-related events that might delay person A, might delay person B as well. Given the third event and knowledge that person A was late, the probability that person B will be late does meaningfully change.2
Conditional independence depends on the nature of the third event. If you roll two dice, one may assume that the two dice behave independently of each other. Looking at the results of one die will not tell you about the result of the second die. (That is, the two dice are independent.) If, however, the 1st die's result is a 3, and someone tells you about a third event - that the sum of the two results is even - then this extra unit of information restricts the options for the 2nd result to an odd number. In other words, two events can be independent, but NOT conditionally independent.3
Height and vocabulary are dependent since very small people tend to be children, known for their more basic vocabularies. But knowing that two people are 19 years old (i.e., conditional on age) there is no reason to think that one person's vocabulary is larger if we are told that they are taller.
Two discrete random variables X {\displaystyle X} and Y {\displaystyle Y} are conditionally independent given a third discrete random variable Z {\displaystyle Z} if and only if they are independent in their conditional probability distribution given Z {\displaystyle Z} . That is, X {\displaystyle X} and Y {\displaystyle Y} are conditionally independent given Z {\displaystyle Z} if and only if, given any value of Z {\displaystyle Z} , the probability distribution of X {\displaystyle X} is the same for all values of Y {\displaystyle Y} and the probability distribution of Y {\displaystyle Y} is the same for all values of X {\displaystyle X} . Formally:
where F X , Y ∣ Z = z ( x , y ) = Pr ( X ≤ x , Y ≤ y ∣ Z = z ) {\displaystyle F_{X,Y\,\mid \,Z\,=\,z}(x,y)=\Pr(X\leq x,Y\leq y\mid Z=z)} is the conditional cumulative distribution function of X {\displaystyle X} and Y {\displaystyle Y} given Z {\displaystyle Z} .
Two events R {\displaystyle R} and B {\displaystyle B} are conditionally independent given a σ-algebra Σ {\displaystyle \Sigma } if
where Pr ( A ∣ Σ ) {\displaystyle \Pr(A\mid \Sigma )} denotes the conditional expectation of the indicator function of the event A {\displaystyle A} , χ A {\displaystyle \chi _{A}} , given the sigma algebra Σ {\displaystyle \Sigma } . That is,
Two random variables X {\displaystyle X} and Y {\displaystyle Y} are conditionally independent given a σ-algebra Σ {\displaystyle \Sigma } if the above equation holds for all R {\displaystyle R} in σ ( X ) {\displaystyle \sigma (X)} and B {\displaystyle B} in σ ( Y ) {\displaystyle \sigma (Y)} .
Two random variables X {\displaystyle X} and Y {\displaystyle Y} are conditionally independent given a random variable W {\displaystyle W} if they are independent given σ(W): the σ-algebra generated by W {\displaystyle W} . This is commonly written:
This it read " X {\displaystyle X} is independent of Y {\displaystyle Y} , given W {\displaystyle W} "; the conditioning applies to the whole statement: "( X {\displaystyle X} is independent of Y {\displaystyle Y} ) given W {\displaystyle W} ".
This notation extends X ⊥ ⊥ Y {\displaystyle X\perp \!\!\!\perp Y} for " X {\displaystyle X} is independent of Y {\displaystyle Y} ."
If W {\displaystyle W} assumes a countable set of values, this is equivalent to the conditional independence of X and Y for the events of the form [ W = w ] {\displaystyle [W=w]} . Conditional independence of more than two events, or of more than two random variables, is defined analogously.
The following two examples show that X ⊥ ⊥ Y {\displaystyle X\perp \!\!\!\perp Y} neither implies nor is implied by ( X ⊥ ⊥ Y ) ∣ W {\displaystyle (X\perp \!\!\!\perp Y)\mid W} .
First, suppose W {\displaystyle W} is 0 with probability 0.5 and 1 otherwise. When W = 0 take X {\displaystyle X} and Y {\displaystyle Y} to be independent, each having the value 0 with probability 0.99 and the value 1 otherwise. When W = 1 {\displaystyle W=1} , X {\displaystyle X} and Y {\displaystyle Y} are again independent, but this time they take the value 1 with probability 0.99. Then ( X ⊥ ⊥ Y ) ∣ W {\displaystyle (X\perp \!\!\!\perp Y)\mid W} . But X {\displaystyle X} and Y {\displaystyle Y} are dependent, because Pr(X = 0) < Pr(X = 0|Y = 0). This is because Pr(X = 0) = 0.5, but if Y = 0 then it's very likely that W = 0 and thus that X = 0 as well, so Pr(X = 0|Y = 0) > 0.5.
For the second example, suppose X ⊥ ⊥ Y {\displaystyle X\perp \!\!\!\perp Y} , each taking the values 0 and 1 with probability 0.5. Let W {\displaystyle W} be the product X ⋅ Y {\displaystyle X\cdot Y} . Then when W = 0 {\displaystyle W=0} , Pr(X = 0) = 2/3, but Pr(X = 0|Y = 0) = 1/2, so ( X ⊥ ⊥ Y ) ∣ W {\displaystyle (X\perp \!\!\!\perp Y)\mid W} is false. This is also an example of Explaining Away. See Kevin Murphy's tutorial 4 where X {\displaystyle X} and Y {\displaystyle Y} take the values "brainy" and "sporty".
Two random vectors X = ( X 1 , … , X l ) T {\displaystyle \mathbf {X} =(X_{1},\ldots ,X_{l})^{\mathrm {T} }} and Y = ( Y 1 , … , Y m ) T {\displaystyle \mathbf {Y} =(Y_{1},\ldots ,Y_{m})^{\mathrm {T} }} are conditionally independent given a third random vector Z = ( Z 1 , … , Z n ) T {\displaystyle \mathbf {Z} =(Z_{1},\ldots ,Z_{n})^{\mathrm {T} }} if and only if they are independent in their conditional cumulative distribution given Z {\displaystyle \mathbf {Z} } . Formally:
where x = ( x 1 , … , x l ) T {\displaystyle \mathbf {x} =(x_{1},\ldots ,x_{l})^{\mathrm {T} }} , y = ( y 1 , … , y m ) T {\displaystyle \mathbf {y} =(y_{1},\ldots ,y_{m})^{\mathrm {T} }} and z = ( z 1 , … , z n ) T {\displaystyle \mathbf {z} =(z_{1},\ldots ,z_{n})^{\mathrm {T} }} and the conditional cumulative distributions are defined as follows.
Let p be the proportion of voters who will vote "yes" in an upcoming referendum. In taking an opinion poll, one chooses n voters randomly from the population. For i = 1, ..., n, let Xi = 1 or 0 corresponding, respectively, to whether or not the ith chosen voter will or will not vote "yes".
In a frequentist approach to statistical inference one would not attribute any probability distribution to p (unless the probabilities could be somehow interpreted as relative frequencies of occurrence of some event or as proportions of some population) and one would say that X1, ..., Xn are independent random variables.
By contrast, in a Bayesian approach to statistical inference, one would assign a probability distribution to p regardless of the non-existence of any such "frequency" interpretation, and one would construe the probabilities as degrees of belief that p is in any interval to which a probability is assigned. In that model, the random variables X1, ..., Xn are not independent, but they are conditionally independent given the value of p. In particular, if a large number of the Xs are observed to be equal to 1, that would imply a high conditional probability, given that observation, that p is near 1, and thus a high conditional probability, given that observation, that the next X to be observed will be equal to 1.
A set of rules governing statements of conditional independence have been derived from the basic definition.56
These rules were termed "Graphoid Axioms" by Pearl and Paz,7 because they hold in graphs, where X ⊥ ⊥ A ∣ B {\displaystyle X\perp \!\!\!\perp A\mid B} is interpreted to mean: "All paths from X to A are intercepted by the set B".8
Proof:
Note that we are required to prove if P ( X | Y ) = P ( X ) {\displaystyle P(X|Y)=P(X)} then P ( Y | X ) = P ( Y ) {\displaystyle P(Y|X)=P(Y)} . Note that if P ( X | Y ) = P ( X ) {\displaystyle P(X|Y)=P(X)} then it can be shown P ( X , Y ) = P ( X ) P ( Y ) {\displaystyle P(X,Y)=P(X)P(Y)} . Therefore P ( Y | X ) = P ( X , Y ) / P ( X ) = P ( X ) P ( Y ) / P ( X ) = P ( Y ) {\displaystyle P(Y|X)=P(X,Y)/P(X)=P(X)P(Y)/P(X)=P(Y)} as required.
Proof
A similar proof shows the independence of X and B.
The second condition can be proved similarly.
This property can be proved by noticing Pr ( X ∣ A , B ) = Pr ( X ∣ B ) = Pr ( X ) {\displaystyle \Pr(X\mid A,B)=\Pr(X\mid B)=\Pr(X)} , each equality of which is asserted by X ⊥ ⊥ A ∣ B {\displaystyle X\perp \!\!\!\perp A\mid B} and X ⊥ ⊥ B {\displaystyle X\perp \!\!\!\perp B} , respectively.
For strictly positive probability distributions,9 the following also holds:
By assumption:
Using this equality, together with the Law of total probability applied to P ( X | Z ) {\displaystyle P(X|Z)} :
Since P ( X | Z , W , Y ) = P ( X | Z , Y ) {\displaystyle P(X|Z,W,Y)=P(X|Z,Y)} and P ( X | Z , Y ) = P ( X | Z ) {\displaystyle P(X|Z,Y)=P(X|Z)} , it follows that P ( X | Z , W , Y ) = P ( X | Z ) ⟺ X ⊥ ⊥ Y , W | Z {\displaystyle P(X|Z,W,Y)=P(X|Z)\iff X\perp \!\!\!\perp Y,W|Z} .
Technical note: since these implications hold for any probability space, they will still hold if one considers a sub-universe by conditioning everything on another variable, say K. For example, X ⊥ ⊥ Y ⇒ Y ⊥ ⊥ X {\displaystyle X\perp \!\!\!\perp Y\Rightarrow Y\perp \!\!\!\perp X} would also mean that X ⊥ ⊥ Y ∣ K ⇒ Y ⊥ ⊥ X ∣ K {\displaystyle X\perp \!\!\!\perp Y\mid K\Rightarrow Y\perp \!\!\!\perp X\mid K} .
To see that this is the case, one needs to realise that Pr(R ∩ B | Y) is the probability of an overlap of R and B (the purple shaded area) in the Y area. Since, in the picture on the left, there are two squares where R and B overlap within the Y area, and the Y area has twelve squares, Pr(R ∩ B | Y) = 2/12 = 1/6. Similarly, Pr(R | Y) = 4/12 = 1/3 and Pr(B | Y) = 6/12 = 1/2. ↩
Could someone explain conditional independence? https://math.stackexchange.com/q/23093 ↩
"Graphical Models". http://people.cs.ubc.ca/~murphyk/Bayes/bnintro.html ↩
Dawid, A. P. (1979). "Conditional Independence in Statistical Theory". Journal of the Royal Statistical Society, Series B. 41 (1): 1–31. JSTOR 2984718. MR 0535541. /wiki/Philip_Dawid ↩
J Pearl, Causality: Models, Reasoning, and Inference, 2000, Cambridge University Press ↩
Pearl, Judea; Paz, Azaria (1986). "Graphoids: Graph-Based Logic for Reasoning about Relevance Relations or When would x tell you more about y if you already know z?". In du Boulay, Benedict; Hogg, David C.; Steels, Luc (eds.). Advances in Artificial Intelligence II, Seventh European Conference on Artificial Intelligence, ECAI 1986, Brighton, UK, July 20–25, 1986, Proceedings (PDF). North-Holland. pp. 357–363. /wiki/Judea_Pearl ↩
Pearl, Judea (1988). Probabilistic reasoning in intelligent systems: networks of plausible inference. Morgan Kaufmann. ISBN 9780934613736. 9780934613736 ↩