The Yates correction is a correction made to account for the fact that both Pearson’s chi-square test and McNemar’s chi-square test are biased upwards for a 2 x 2 contingency table. An upwards bias tends to make results larger than they should be. If you are creating a 2 x 2 contingency table that uses either of these two tests, the Yates correction is usually recommended, especially if the expected cell frequencies are below 10 (some authors put that figure at 5).
But Fisher's exact test is a statistical significance test used in the analysis of contingency tables. Although in practice it is employed when sample sizes are small, it is valid for all sample sizes.
Hamid, if your marginal totals are not fixed in advance by design, I suspect you would be better off using the N-1 Chi-square than either Fisher's exact test (aka., the Fisher-Irwin test) or Chi-square with Yates' correction. See Ian Campbell's website and Statistics in Medicine article for more info.
Here is Campbell's recommendation on when the N-1 Chi-square ought to be used.
The best policy in the analysis of two-by-two tables is:
(1) Where all expected numbers are at least 1, analyse by the 'N - 1' chi-squared test (the K. Pearson chi-squared test but with N replaced by N - 1). (2) Otherwise, analyse by the Fisher-Irwin test, with two-sided tests carried out by Irwin's rule (taking tables from either tail as likely, or less, as that observed).
These recommendations apply to data from either comparative trials or cross-sectional studies, and update those of Cochran (1952, 1954).
Please have a look at my recent paper on this issue. It provides a numerical answer to question posed here. Article :. The Tale of Cochran's Rule: My Contingency Table has so Many Expected Values Smaller than 5, What Am I to Do? https://amstat.tandfonline.com/doi/abs/10.1080/00031305.2017.1286260 Abstract: In an informal way, some dilemmas in connection with hypothesis testing in contingency tables are discussed. The body of the paper concerns the numerical evaluation of Cochran's Rule about the minimum expected value in r×c contingency tables with fixed margins when testing independence with Pearson's X2 statistic using the chi-squared distribution.