An alternative hypothesis (Ha) states the claim that contrasts with the null hypothesis (H0). For a conditional-independence test, H0 asserts independence, while Ha asserts that the variables are not conditionally independent. A p-value below the chosen significance level favors Ha. section 4.3.2
The direction of the claim matters. Conventional tests treat a discovered pattern as the alternative and random noise as the null. For a causal model, however, the model predicts absences of patterns, so the model-supported alternative would assert independence and the null would assert dependence. section 4.4.2
Apply the distinction in two common workflows:
- Use a traditional conditional-independence test heuristically: a small p-value favors dependence, while a larger p-value favors the independence null. section 4.3.2 section 4.4.2
- Use DoWhy refuters to test causal assumptions: H0 says the assumptions are not refuted, and Ha says they are refuted. section 11.5
Transportation conditional-independence test
For education E and travel T conditioned on occupation O and residence R, define H0 as E ⊥ T | O, R and Ha as dependence after conditioning. A chi-squared test in pgmpy compares its result with a .05 significance level. section 4.3.2
Figure 4.16 The transportation model. Age (A) and gender (S) determine education (E). Education causes occupation (O) and residence (R). Occupation and residence cause transportation (T).
Use the transportation DAG to identify the conditional-independence claim being tested and distinguish model-implied constraints from observed associations. section 4.3.2


