# Chi-square test restriction for contingency tables with observed counts

I have the following 2X2 contingency table with observed counts to perform Chi-square test. But i've read about Chi-square test restriction:

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

I'm confused, since in my case the contingency table contains observed count not the expected ones. Is that restriction related to observed counts as well?

• I'm wondering, if there is any straightforward way (may be a special function in R) to count expected counts? Apr 20, 2020 at 21:11