Fisher's exact test may be contrasted with the chi-squared test for contingency tables, which compares the observed $\chi^2$ test statistic to the (continuous) chi-squared distribution to determine the p-value, instead of computing the p-value directly. This strategy is computationally inexpensive. The sampling distribution of the $\chi^2$ test statistic will match the theoretical chi-squared distribution asymptotically (i.e., with sufficiently large samples); with smaller sample sizes the match is only approximate, however. Fisher's exact test is sometimes recommended when cells have small expected frequencies and thus the chi-squared test may not be appropriate.