# testing for independence

Most articles that I have found on the subject of testing for the independence of two events state if $P (A \cap B) = P (A) P(B)$, then $A$ and $B$ are independent. If I only had estimates of $P (A\cap B)$, $P (A)$ and $P(B)$ collected from sample data rather exact probabilities calculated using the entire population, will this test for independence still work? If for example, if $P (A\cap B)$ was almost equal to $P (A) \times P(B)$, can I assume independence? Should I be using the chi-square test for independence instead?

• What does your sample data consist of? Jan 27, 2017 at 3:41
• Not to nit-pick, but what would be defined as "almost equal"? Jan 27, 2017 at 4:20
• Ploni Almni, by "almost equal" I mean something akin to the statement "I believe with a confidence of 95% that event A is not dependent on B" Jan 27, 2017 at 4:33
• Glen_b, I don't have a particular data set to provide for you off hand. What I want to be able to do is make observations of events A and B so that I can get estimates of the probabilities, and then use a hypothesis test infer whether or not events A and B ar independent of each other based on whether or not the difference between P(A&B) and P(A)P(B) is statistically significant. Jan 27, 2017 at 4:51

You seem to have observations which each can be classified as either A or not A, and either B or not B. That is exactly the pattern behind a $$2\times 2$$ contingency table, so just make your contingency table and use a chisquare test.

This is all we can say without more context and details.