# Conditional independence, partial correlation

In my work, I am modelling graphs by measuring the zero- and first-order conditional independence between the variables. That is, if there are three variables, say $$A$$,$$B$$ and $$C$$, an edge between the variables $$A$$ and $$B$$ is drawn in the graph if and only if, zero- and first-order correlations between these two variables both differ from zero, that is, if

1. Partial correlation between $$A$$ and $$B$$ given $$C$$ is greater than 0 , that is, $$A$$ and $$B$$ are correlated and the correlation between A and B can not be explained by C.
1. correlation between $$A$$ and $$B$$ is greater than 0.

In the code I took from someone else, there is only the test for partial correlation (first-order conditional independence) but there is no test for correlation (zero order correlation). Is it safe to assume, that if, If there is correlation between $$A$$ and $$B$$ given $$C$$, it automatically implies that there is correlation between $$A$$ and $$B$$? For zero and first order partial correlations, is it enough to test for first order only? Or both are needed ?

Is it safe to assume, that if, If there is correlation between 𝐴 and 𝐵 given 𝐶, it automatically implies that there is correlation between 𝐴 and 𝐵?

No, let $$A$$ be $$1$$ if a fair coin's first toss is heads and $$0$$ o/w and $$B$$ be 1 if the coin's second toss is heads and $$0$$ o/w. Let $$C$$ be the number of heads in the two tosses. $$A$$ and $$B$$ are definitely independent, but if $$C$$ is given, then $$A,B$$ becomes dependent and correlated because $$A+B=C$$.

• If correlation of A and B can be explained entirely by another variable C, i.e r(A,B|C) > 0, does that also mean that r(A,B) > 0 ? – Hamda Binte Ajmal Jul 16 '20 at 12:46
• No, because it can still be $0$ since $A$ and $B$ can be independent. – gunes Jul 16 '20 at 12:47
• Thank you I have re worded my query – Hamda Binte Ajmal Jul 16 '20 at 13:53
• @HamdaBinteAjmal I've added an example for you to better understand. – gunes Jul 16 '20 at 20:05