# Chi-square test or Fisher's Exact test

Fisher's exact test is applied when sample size is small. In this link it is said that

If any expected counts are less than 5, then some other test should be used (e.g., Fisher exact test for 2x2 contingency tables)

This link http://www.theanalysisfactor.com/observed-values-less-than-5-in-a-chi-square-test-no-biggie/ also gave similar statement.

But here http://www.biostathandbook.com/fishers.html author recommended to use Fisher's exact test when the total sample size is less than 1000.

Can I use a Fisher's exact test whatever the sample size is?

### Edit:

I know Fisher's exact test is conservative and many authors recommend not to use this conditional test rather an unconditional test should be used (Reference: Recommended tests for association in 2×2 tables) .

Then my question is more precisely that when should I do an exact test instead of chi-square test?

• The comments only concern the chi square approximation that is used. Sample size is not much of an issu as it is with the chi square.e with Fisher's test. The only restriction involves assuming that the marginal total are assumed to be fixed. Commented Sep 12, 2017 at 17:08
• @MichaelChernick Exact test can be done in 3 case: (1) Both margins fixed (Hypergeometric Dist'n)→Fisher's exact test (2)One margin fixed (Double Binomial Dist'n)→Barnard's exact test (3)No margins fixed (Multinomial Dist'n)→Barnard's exact test. stats.stackexchange.com/questions/169864/…. If sample size is not an issue of exact test, then why is there chi-square test? Can't I always perform an exact test in a $R\times C$ contingency table whatever the sample size is? Commented Sep 12, 2017 at 17:18
• You were referring to Fisher vs Chi square and what I said about fixed margins is correct. Other types of exact tests were not mentioned in the question. Commented Sep 12, 2017 at 20:44
• You don't have to have fixed margins to use the Fisher exact test, you only need to be willing to condition on the (almost ancillary) margins. Commented Dec 25, 2019 at 11:38