Why Conditioning Can Change the Independence Question
Independence describes how two variables behave together under a specified probability model. Conditioning changes that model by restricting attention to outcomes in an event. Whether independence survives depends not only on the event, but also on whether the variables were independent before the restriction.
This tutorial focuses on conditioning on an event determined by one of two variables. The key result is precise: if \(X\) and \(Y\) are independent, and the conditioning event is determined by \(X\) alone, then \(X\) and \(Y\) remain independent under the conditional model. If \(X\) and \(Y\) were dependent initially, there is no general preservation rule: conditioning may produce independence, or dependence may remain.
For discrete variables, it is enough to check the factorization for every pair of possible values with positive conditional probability. A single factorization check can establish independence only if it covers the entire conditional distribution, not just one selected pair of values.
The Preservation Result
Suppose \(X\) and \(Y\) are independent, and let \(A=\{X\in S\}\) have positive probability. For any sets \(C\) and \(D\), independence gives \(P(X\in C\cap S,\ Y\in D)=P(X\in C\cap S)P(Y\in D)\). Also, because \(A\) is determined by \(X\), \(P(A)=P(X\in S)\), and independence gives \(P(Y\in D\mid A)=P(Y\in D)\). These facts yield the required factorization.
This derivation also explains what happens to each marginal distribution. The distribution of \(X\) is restricted to values in \(S\), then renormalized to total probability 1. The distribution of \(Y\) does not change: learning that \(X\) lies in \(S\) provides no information about \(Y\) when the variables were independent to begin with.
Testing the Result With Probability Tables
A useful exam method is to construct the conditional table by dividing every joint probability inside the event by \(P(A)\). Then calculate the conditional row and column probabilities and check whether each cell equals the product of its conditional marginals. This is the same joint-marginal factorization used to test independence, now applied to the conditional distribution.
Worked Example: Conditioning an Initially Independent Pair
Let \(X\) be uniform on \(\{1,2,3,4\}\), and let \(Y\) be Bernoulli with \(P(Y=1)=0.30\) and \(P(Y=0)=0.70\). Assume \(X\) and \(Y\) are independent. Given \(A=\{X\geq 3\}\), find \(P(X=4,Y=1\mid A)\) and determine whether \(X\) and \(Y\) remain independent.
Method and model. The joint probabilities are products because independence is part of the model. Each value of \(X\) has probability \(1/4\), so \(P(A)=P(X=3)+P(X=4)=1/4+1/4=1/2\).
The required joint conditional probability is
To test independence, first find the conditional marginals. Within \(A\), \(X=3\) and \(X=4\) each have probability \((1/4)/(1/2)=1/2\). The marginal distribution of \(Y\) is unchanged, so \(P(Y=1\mid A)=0.30\). Their product for the requested cell is \(P(X=4\mid A)P(Y=1\mid A)=(1/2)(0.30)=0.1500\), equal to the conditional joint probability. The same product factorization holds for all four cells because the conditional probabilities of \(X\) and \(Y\) multiply to form each cell. Thus the variables remain independent.
Check. Summing the two conditional probabilities for \(X=4\), over \(Y=0\) and \(Y=1\), gives \(0.35+0.15=0.50\), as required. The method avoids the mistake of treating the original probability \(P(X=4,Y=1)=0.075\) as the conditional probability without dividing by \(P(A)\).
Worked Example: Conditioning Creates Independence
A discrete pair \((X,Y)\) has the following joint probabilities. Let \(A=\{X\in\{0,1\}\}\). Find the conditional joint distribution given \(A\), and decide whether \(X\) and \(Y\) are independent before and after conditioning.
Method and model. The table gives the full joint distribution; its entries are nonnegative and sum to \(1.00\). The event has probability \(P(A)=P(X=0)+P(X=1)=0.40+0.20=0.60\). Divide each cell in the first two rows by \(0.60\). The conditional table is
For example, \(P(X=0,Y=1\mid A)=0.20/0.60=1/3\). In that cell, the product of the conditional marginals is \((2/3)(1/2)=1/3\). The other three cells also factor: for \(X=0,Y=0\), the product is \(1/3\); for either value of \(Y\) when \(X=1\), it is \((1/3)(1/2)=1/6\). Therefore \(X\) and \(Y\) are independent given \(A\).
They were not independent initially. For instance, \(P(X=2,Y=1)=0\), while \(P(X=2)P(Y=1)=(0.40)(0.30)=0.12\). Thus this example shows that conditioning on an event determined by one variable can produce independence from a pair that was dependent.
Check. The conditional table sums to \(1/3+1/3+1/6+1/6=1\). Its row and column totals agree with the displayed marginals. The method avoids assuming that an initially dependent pair must remain dependent after every restriction.
Worked Example: Dependence Remains After Conditioning
Suppose \(X\in\{0,1,2\}\) and \(Y\in\{0,1\}\) have joint probabilities shown below. Given \(A=\{X\in\{0,1\}\}\), determine whether the conditional variables are independent.
Method and model. The entries sum to \(1.00\). The event probability is \(P(A)=0.30+0.10+0.10+0.30=0.80\). Dividing the selected cells by \(0.80\) gives
If the variables were conditionally independent, the cell for \(X=0,Y=0\) would equal \(P(X=0\mid A)P(Y=0\mid A)=(0.500)(0.500)=0.250\). But the actual conditional cell is \(0.375\), so the factorization fails and the variables are still dependent given \(A\).
Check. The four conditional cells sum to \(1.000\), and the row and column totals are each \(0.500\). The method avoids concluding independence merely because both variables have simple conditional marginals; the joint cells must also factor.
Common Mistake: Applying the Result Without Its Assumption
A tempting but incorrect claim is that “conditioning on an event involving \(X\) preserves independence.” That statement leaves out the essential hypothesis that \(X\) and \(Y\) were independent before conditioning.
There is a second useful caution: the preservation theorem concerns an event determined by one variable. If the conditioning event instead depends jointly on \(X\) and \(Y\), the theorem does not apply, even when \(X\) and \(Y\) were independent initially. Always identify exactly how the event is defined before invoking a result.
A Reliable Exam Procedure
For a discrete table, a compact solution can be organized as follows:
Write it as \(A=\{X\in S\}\), or state clearly that it is determined by \(Y\). Confirm that \(P(A)>0\).
Sum the joint table entries inside the event to obtain \(P(A)\).
Divide each selected joint probability by \(P(A)\), then verify that the conditional entries sum to \(1\).
Calculate the conditional marginals and compare the joint cells with products of the corresponding marginal probabilities.
If the variables were initially independent and the event depends on just one of them, the theorem establishes conditional independence directly. Otherwise, test the conditional distribution rather than assuming an outcome.
The theorem and the table method are complementary. The theorem gives a quick conclusion when its assumptions are satisfied. The table method is necessary when the original variables are dependent and conditioning could change their relationship in either direction.
Check Your Understanding
For each problem, identify the conditioning event and use the conditional joint distribution or the preservation result to decide independence.
- \(X\) is uniform on \(\{0,1,2,3\}\), and \(Y\) is Bernoulli with \(P(Y=1)=0.25\); assume \(X\) and \(Y\) are independent. Given \(A=\{X\leq1\}\), find \(P(X=0,Y=1\mid A)\) and state whether conditional independence holds. (Answer: \(0.1250\); yes, they remain independent.)
- A pair has joint probabilities \(P(0,0)=0.18,\ P(0,1)=0.12,\ P(1,0)=0.12,\ P(1,1)=0.08,\ P(2,0)=0.10,\ P(2,1)=0.40\), where each pair is \((X,Y)\). Given \(A=\{X\leq1\}\), find \(P(X=0,Y=1\mid A)\) and determine conditional independence. (Answer: \(0.2400\); yes, \(X\) and \(Y\) are independent given \(A\).)
- A pair has joint probabilities \(P(0,0)=0.25,\ P(0,1)=0.05,\ P(1,0)=0.05,\ P(1,1)=0.25,\ P(2,0)=0.20,\ P(2,1)=0.20\), where each pair is \((X,Y)\). Given \(A=\{X\leq1\}\), compare \(P(X=0,Y=0\mid A)\) with the product of its conditional marginals. (Answer: joint \(=0.4167\), product \(=0.2500\); conditional independence fails.)
- Suppose \(P(X=0,Y=0)=0.30,\ P(X=0,Y=1)=0.20,\ P(X=1,Y=0)=0.10,\ P(X=1,Y=1)=0.40\). Given \(A=\{X=0\}\), determine whether \(X\) and \(Y\) are independent conditional on \(A\), and find \(P(Y=1\mid A)\). (Answer: yes; \(X\) is constant given \(A\), and \(P(Y=1\mid A)=0.4000\).)