Why Disease Status Changes the Independence Question
Suppose two diagnostic tests are applied to the same people. Their outcomes might be related because each test responds to the same underlying disease. But even if the tests have no direct relationship once disease status is known, their outcomes could still be associated when people with and without the disease are combined. To describe this distinction, we need the idea of conditional independence.
Let \(D\) be the event that a person has a particular disease, and let \(A\) and \(B\) be the events that the first and second tests, respectively, return positive results. Knowing whether \(D\) occurred divides people into two groups: those with the disease and those without it. We can ask whether the test outcomes are independent within each group.
For diagnostic outcomes, conditional independence given disease status means that the equality holds among people with the disease and also among people without it: $$ P(A\cap B\mid D)=P(A\mid D)P(B\mid D) $$ and $$ P(A\cap B\mid D^c)=P(A\mid D^c)P(B\mid D^c). $$ Both conditions are needed for independence within both disease-status groups. The probabilities are defined only when the relevant conditioning event has positive probability.
The events \(A\) and \(B\) can be defined as positive test outcomes, but they could instead describe negative outcomes or any other specified results. Here, focusing on positive outcomes is convenient. Because each test has two possible outcomes, checking the positive-positive equality within a group is enough to check independence of the full pair of test outcomes. If the positive indicators are independent, their complements are independent as well; the other joint outcome probabilities then follow by subtracting from the corresponding marginal probabilities.
Reading Conditional Independence From a Table
A two-way table of test results can be formed separately for each disease-status group. Within one group, divide each count by that group’s total to get conditional proportions. The row and column totals give the separate positive-test proportions; the both-positive cell gives the joint proportion. Conditional independence holds in that group when the joint proportion equals the product of the two separate proportions.
The multiplication in this comparison is important. A large both-positive count by itself does not show dependence: if both tests are often positive separately, many people may be positive on both simply as a result. The relevant comparison is between the observed joint proportion and the product expected under independence, using that group’s own conditional proportions.
Worked Example: Checking Both Disease-Status Groups
In a hypothetical set of 200 people, disease status is known. Among 100 people with the disease, 72 test positive on both tests, 8 test positive only on the first, 3 test positive only on the second, and 17 test negative on both. Among 100 people without the disease, the corresponding counts are 5, 15, 10, and 70. Are the positive outcomes conditionally independent within each group?
Among people with the disease: the first test is positive for \(72+8=80\) people, so \(P(A\mid D)=80/100=0.80\). The second is positive for \(72+3=75\), so \(P(B\mid D)=75/100=0.75\). The joint probability is \(P(A\cap B\mid D)=72/100=0.72\). Under conditional independence, the product would be $$ P(A\mid D)P(B\mid D)=0.80(0.75)=0.60. $$ Since \(0.72\ne 0.60\), the positive outcomes are not conditionally independent among people with the disease.
Among people without the disease: the first test is positive for \(5+15=20\), and the second for \(5+10=15\). Thus \(P(A\mid D^c)=0.20\) and \(P(B\mid D^c)=0.15\). The joint probability is \(5/100=0.05\), whereas the product is $$ P(A\mid D^c)P(B\mid D^c)=0.20(0.15)=0.03. $$ Because \(0.05\ne 0.03\), the outcomes are also not conditionally independent among people without the disease. These data do not satisfy conditional independence in either group.
This calculation assesses the pattern in the table. In a real setting, observed counts are data from a particular sample, while the probabilities in a model describe a broader process. A match or mismatch in a sample does not, by itself, establish that the corresponding population probabilities are exactly equal or unequal.
Conditional Independence Does Not Mean Overall Independence
Even when the tests are independent separately among people with the disease and people without it, they may be dependent after those groups are combined. The reason is that disease status can affect the chance of a positive result on each test. Once the groups are mixed, learning that one test is positive may provide information about which disease-status group a person is more likely to belong to, and that group membership can in turn be associated with the other test’s outcome.
The next example checks both levels directly. It uses equally sized groups to keep the combined proportions straightforward; conditional independence does not require the groups to be equally sized.
Worked Example: Independent Within Groups, Associated Overall
Consider hypothetical results from 100 people with a known disease and 100 without it. Among those with the disease, the outcome counts (both positive, first positive only, second positive only, neither positive) are \(60, 20, 15, 5\). Among those without the disease, the counts are \(2, 18, 8, 72\). First check conditional independence, then check independence in the combined group.
With the disease: the first positive proportion is \((60+20)/100=0.80\), and the second positive proportion is \((60+15)/100=0.75\). The both-positive proportion is \(60/100=0.60\). Since $$ 0.80(0.75)=0.60, $$ the positive outcomes are independent within this group.
Without the disease: the positive proportions are \((2+18)/100=0.20\) for the first test and \((2+8)/100=0.10\) for the second. The both-positive proportion is \(2/100=0.02\), and $$ 0.20(0.10)=0.02. $$ The outcomes are independent within this group too.
In the combined group: the first test is positive for \(80+20=100\) of 200 people, so its positive proportion is \(100/200=0.50\). The second is positive for \(75+10=85\), giving \(85/200=0.425\). Both tests are positive for \(60+2=62\), giving \(62/200=0.31\). If the outcomes were independent overall, the both-positive proportion would equal $$ 0.50(0.425)=0.2125. $$ But the observed proportion is \(0.31\), not \(0.2125\). The outcomes are dependent in the combined group, despite being independent within each disease-status group.
This difference is not a contradiction. The conditional comparisons use one group at a time; the overall comparison combines people with different positive-result rates. Independence within groups does not generally imply independence after combining those groups.
A Short Justification for the Table Check
The independence condition uses the probability of two events occurring together. For binary test outcomes, once the separate positive probabilities and the probability of both being positive are known, the other three cells are determined. This explains why the positive-positive check is sufficient for checking independence of the pair within a group.
Condition on a particular status event \(C\), such as \(D\) or \(D^c\), with \(P(C)>0\). Let \(a=P(A\mid C)\), \(b=P(B\mid C)\), and \(q=P(A\cap B\mid C)\).
If \(q=ab\), the probability of both positive outcomes matches the product required for independence.
The probability of \(A\) positive and \(B\) negative is \(a-q\); that of \(A\) negative and \(B\) positive is \(b-q\); and that of both negative is \(1-a-b+q\).
When \(q=ab\), these three probabilities become \(a(1-b)\), \((1-a)b\), and \((1-a)(1-b)\), respectively. Each is the product of its separate outcome probabilities, so all four cells factorize as required for independence.
For example, the both-negative cell follows because its probability is the complement of the event that at least one test is positive: $$ P(A^c\cap B^c\mid C)=1-a-b+q. $$ If \(q=ab\), then \(1-a-b+q=1-a-b+ab=(1-a)(1-b)\). The same reasoning works in each disease-status group separately.
Worked Example: Checking From Conditional Probabilities
In a hypothetical diagnostic setting, suppose the given conditional probabilities are \(P(A\mid D)=0.70\), \(P(B\mid D)=0.40\), and \(P(A\cap B\mid D)=0.28\). For people without the disease, suppose \(P(A\mid D^c)=0.08\), \(P(B\mid D^c)=0.25\), and \(P(A\cap B\mid D^c)=0.02\). Assess conditional independence given disease status.
For people with the disease, the product of the separate positive probabilities is \(0.70(0.40)=0.28\), equal to the given joint probability. The positive outcomes are independent within this group.
For people without the disease, the product is \(0.08(0.25)=0.02\), again equal to the joint probability. The outcomes are independent in this group as well. Therefore, under the stated probabilities, the test outcomes are conditionally independent given disease status. This conclusion concerns the within-group probabilities; it does not determine whether the outcomes are independent in a population that combines the two groups.
Common Mistakes and Why the Distinction Matters
- Checking only one status group. Showing independence among people with the disease is not enough to claim independence given disease status. Check the no-disease group too.
- Comparing the joint probability with the wrong product. Use the two probabilities conditioned on the same group as the joint probability. For example, compare \(P(A\cap B\mid D)\) with \(P(A\mid D)P(B\mid D)\), not with probabilities calculated across everyone.
- Assuming conditional independence implies overall independence. The worked example shows why this is false: combining status groups with different positive-result rates can change the relationship between test outcomes.
- Calling outcomes independent because both tests measure the same disease. Shared subject matter neither proves nor rules out conditional independence. The relevant question is whether the joint probability within each group equals the product of its conditional marginal probabilities.
- Treating an approximate match in sample proportions as proof. A table gives observed proportions. Exact equality of population probabilities is a model claim, not something established merely by rounded sample calculations.
The distinction matters whenever diagnostic outcomes are compared across people with different known conditions. A statement such as “the tests are independent” is incomplete unless it is clear whether it refers to the whole group or to people within a specified disease-status group. Conditional independence is a precise claim about the latter: after fixing the status, the two test outcomes have the product relationship specified by the definition.
Check Your Understanding
Use the definition and compare probabilities within the stated group.
- Among people with a known condition, \(P(A\mid D)=0.6\), \(P(B\mid D)=0.5\), and \(P(A\cap B\mid D)=0.3\). Are the positive outcomes independent within this group? Show the comparison.
- Why must a claim of conditional independence given disease status be checked separately among people without the disease?
- In a group, the first and second positive proportions are \(0.4\) and \(0.2\). What both-positive proportion would satisfy independence in that group?
- Two test outcomes are independent within each disease-status group. Does that establish their independence in the combined population? Explain.
- When assessing conditional independence from a table, why is it not enough to observe that the both-positive cell has a large count?