Conditional independence
Two events are conditionally independent given a positive-probability event when their conditional joint equals the product of their conditional marginals.
On this page 8 sections
01Understand the idea#
Two events can be independent in a whole population yet dependent after filtering, or the reverse. Conditional independence asks the question again inside a specified retained group. Every probability in the check must describe that same group.
Conditional independence tests independence inside a specified event C. The A rate, B rate and joint rate must all describe that same retained population.
Inside C, the A row totals 0.5 and the B column totals 0.4. Their product 0.2 matches the shared cell, so the events are independent given C.
Suppose a condition retains 20 records, with 10 showing , 8 showing , and 4 showing both. Within the retained group, the marginal rates are and . Their product 0.2 matches the joint rate . Using the original population size for only one rate would mix incompatible quantities.
Compare this with :
Require P(C) > 0. A zero rate for A inside C is allowed; it makes both the product and shared rate zero.
P(C)=0.5. Within C: A rate 0.6, B rate 0.4, both rate 0.24. Independent given C?
Show answer and explanation
Within C: 0.24 = 0.24.
02Normalize filtered counts by the retained total#
Normalize filtered counts by the retained total. If C keeps 20 uniform records, with A=10, B=8 and both=4, the within-C product 0.5 × 0.4 matches the joint 0.2.
Of 80 records, C keeps 20. Within C: A 10, B 8, both 6. Choose uniformly within C. Independent?
Show answer and explanation
Within C: 0.2 ≠ 0.3.
03Take four equally likely records 00, 01, 10, 11#
Take four equally likely records 00, 01, 10, 11. A means first bit 1; B means second bit 1. Overall they are independent. Keep only equal bits: 00, 11. Inside that condition, the joint is 0.5 but the product is 0.25.
P(C)=0.2. Within C: A rate 0.5, B rate 0.6, both rate 0.2. “Independent overall, so in C too.” Independent in C?
Show answer and explanation
Within C: 0.3 ≠ 0.2.
04A closer look#
Probabilistic models sometimes assume features are independent after conditioning on a class. That is a modeling assumption to examine, not a consequence of unconditional independence. Filtering can change relationships because it changes which combinations remain possible.
Use the same condition for every probability in the product check. Overall independence does not automatically survive a filter.
- Check the product inside the stated condition.
Sources & further reading
- [1]Pishro-Nik, Introduction to Probability: 1.4.4 Conditional Independence ↗Pishro-Nik, Introduction to Probability · Book