Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I have a question on subject chi-square test for independence.

I have, for example, two events A and B. If chi square test is not passed: is A dependent on B (A|B) or B on A (B|A)? Or does be valid both? (A|B and B|A).

Thank you in advance.

share|improve this question

4 Answers

There's nothing wrong with the existing answers, but I suspect that you're looking for a causal sense of dependence rather than an associational one, that is: whether A causes B rather than whether B is more predictable when you know A. The chi^2 test is working with the second sense.

Even in the simplest case of the first kind of dependence you would ideally experimentally manipulate B and observe the effect on A and vice versa. Judea Pearl points out that this is the difference between the ordinary sense of conditional probability

P("I observe that A has value a" | "I observe that B has value b")

and a quite different thing that we might slightly misleadingly write as

P("I observe that A has value a" | "I fix B to have value b")

These need not, of course, be the same number.

share|improve this answer
1  
+1 for the creative (and insightful) interpretation and explaining the distinction. – whuber Oct 30 '10 at 15:11

I assume A and B are both random variables taking discrete values and you are thinking of a chi-squared test on the two-way frequency table formed by the counts of observations on the two variables.

In that case, a significant result indicates both directions of dependence: A|B and B|A.

If you think about Bayes' theorem, it is clear that one always implies the other:

P(A|B) = P(B|A) P(A) / P(B)

So P(A|B) = P(A) if and only if P(B|A)=P(B).

share|improve this answer
You don't need assumption about 2x2 table but rather kxm table. – Wojtek Aug 13 '10 at 6:06
Of course. Now fixed. – Rob Hyndman Aug 13 '10 at 6:32

There are two definitions of statistical independence: 1) P(A,B)=P(A)*P(B) <=> 2) P(A|B)=P(A) <=> 2a) P(B|A)=P(B).

(<=> means if and only if)

So to answer your question: both are valid.

Pearson Chi-square test of independence is motivated by definition 1), logistic regression and multinomial regression are motivated by definition 2) of independence.

share|improve this answer

A chi-square test is not motivated by your description thus far. Give many more details.

Chi-square tests for independence are used to see if the probability or counts of each kind of event in a given variable are independent of other variables.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.