# Independence test

I'm working on Bayesian Network and I need to find a broad range of statistical test for testing independence and conditional independence between 2 variables with a potential conditioning set of important size.

My data is a mix of normal (not the most common), non normal (the most common), continuous (the most common), discrete, with dependences being not linear.

So far I was using Z-fisher test as I found a nice implementation in the bnt toolbox for MATLAB (I'm not so good in developing) but it assumes linearity and normality which are really heavy assumptions.

I found two or three implementation of the Hilbert Schmidt Independence Criteria but, unfortunately, they perform quite poorly.

Do you have some advice? Pointers?

I would like to design a kind of super class of test which will have access to a specific test depending on the nature of the parameters (testing continuous independent of discrete conditional on a continuous variable is still a bit unclear for me).

• Is this all assuming you know nothing about underlying phenomenon? – Aksakal Jan 8 '15 at 18:39

Regarding mixtures of discrete and continuous variables: At one point I needed to test $X \perp Y | Z$, where $X$ and $Z$ were continuous and $Y$ was discrete. I simply did a logistic regression of $Y$ onto $X$ and $Z$, and tested the significance of the coefficient for $X$. I think this is consistent - that coefficient is zero iff $X$ and $Y$ are independent conditional on $Z$. You can use multinomial logistic regression for non-binary discrete variables.