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 ?

  • $\begingroup$ Can you please add more details to your question? As it stands, it is too basic/vague for this site. $\endgroup$ – Skander H. - Reinstate Monica Apr 20 '18 at 22:03
  • $\begingroup$ @Alex added some details. I want to use the chi-square test to check if two variables ( X and Y) are conditionally independent given an observation variable(Z). $\endgroup$ – Adi Apr 20 '18 at 23:58
  • $\begingroup$ Look at the graduate admissions Berkeley paper for a famous example. $\endgroup$ – kjetil b halvorsen Jul 27 '19 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.