I am a newbie to data mining. I am trying to find associations between two categorical variables. Since more than 20% of my expected frequencies are less than 5, I wanted to use Fisher exact test but it turns out it is generally used for contingency tables 2x2 but my variables have more than two values. Would really appreciate recommendations on the best course of action for me now. Here are some options I found after some search:

  1. Use Freeman-Halton extension to Fisher's Exact test for more than 2x2 table.
  2. Merge multiple attributes values so that I end up with 2x2 contingency table and then use Fisher's Exact test.
  3. Merge multiple attributes values so that I end up with expected counts > 5 and then use chi square test for independence.
  4. Use the Crammer V test.

I would like to know what is the standard practice in this case when your categorical variables with >2 possible values end up with less than 5 expected counts?



Fisher's exact test has a ready generalization to tables of an arbitary dimension and it is applicable here (Metha and Pathel, 2012).

You can for example use the fisher.test built-in function to compute this in R.

  • $\begingroup$ You can indeed use the Fisher test for a table with an arbitrary number of rows/columns, but it's still only typically used for a 2-dimensional contingency table. One could evaluate association between two factors each with 4 levels (in a 4x4 table), but you wouldn't typically use it to directly evaluate association between three factors each with 2 levels (in a 2x2x2 table). The R package, and the paper you link, deal only with 2-dimensional tables, but those dimensions can have an arbitrary number of levels. This is what the OP needs, just want to clarify the "dimensionality" terminology. $\endgroup$ Dec 16 '20 at 21:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.