How can compute the chi-square statistic between the random variables X and Y given an evidence variable Z? I want to test if X & Y are conditionally independent given Z.
Assume all X,Y, Z are binary.
Say X = [1,1,1,0] Y is [0,1,1,0] and Z is [1,0,0,1]
if I compute the Chi-Square test between just X & Y I get χ2 =0.444
How Can I compute the Chi-Square test between X & Y when I have an evidence random variable Z ? ie How does the formula to compute chi-square statistic change ?