For a table of frequency data cross-classified according to two categorical variables, X and Y, each of which has two levels or subcategories, this page will calculate the Phi coefficient of association; perform a chi-square test of association, if the sample size is not too small; and perform the Fisher exact probability test, if the sample size is not too large. For intermediate values of n, the chi-square and Fisher tests will both be performed.