Chi-Square Test of Independence vs. Fisher's Exact Test
By Dr. Zubair Khalid, DVM, MS, PhD ·

Key Takeaways
- The choice between Chi-Square Test of Independence and Fisher's Exact Test is dictated by expected cell counts, not observed counts, in contingency tables. Fisher's Exact Test is mandatory for 2x2 tables if any expected cell count falls below 5, as the Chi-Square approximation becomes unreliable, potentially leading to inflated Type I error rates.
- Expected cell counts are calculated as (Row Total * Column Total) / Grand Total for each cell. For tables larger than 2x2, the Chi-Square approximation is generally considered valid if no more than 20% of cells have expected counts below 5 and no cell has an expected count below 1.
- Fisher's Exact Test computes the precise probability of observed data under the null hypothesis of independence, making it valid for any sample size, particularly small ones or those with sparse data. Its primary limitation is computational intensity for larger tables.
- When expected counts are borderline (e.g., a 2x2 table with a minimum expected count of 4.8, or a larger table with 21% of cells below 5), a secondary check comparing p-values from both tests is recommended. If p-values differ significantly, Fisher's Exact Test is preferred.
- Maintaining a detailed decision log, recording observed counts, expected counts, the decision rule applied, the test selected, and the software used, is critical for reproducibility and transparent reporting in scientific publications. This log serves as a verifiable record of the statistical methodology.
Quick Answer
- Use Fisher's exact test when any expected cell count falls below 5 in a 2x2 contingency table, as the chi-square approximation becomes unreliable.
- Calculate expected counts before choosing a test using row total times column total divided by grand total for each cell.
- For tables larger than 2x2 with low expected counts, Fisher's exact test remains valid but becomes computationally intensive.
At a Glance
| Scenario | Recommended Test | Rationale |
|---|---|---|
| 2x2 table, all expected counts ≥ 5 | Chi-square test of independence | Approximation is reliable with adequate sample size |
| 2x2 table, any expected count < 5 | Fisher's exact test | Exact probabilities avoid approximation error |
| Larger tables (e.g., 3x3, 2x4), all expected counts ≥ 5 | Chi-square test of independence | Approximation holds with sufficient expected frequencies |
| Larger tables, any expected count < 5 | Fisher's exact test or combine categories | Exact test is valid but may be computationally heavy |
| Sparse data with many zero cells | Fisher's exact test with caution | Results may lack power, consider data collection limitations |
Understanding the Statistical Problem
Biologists routinely analyze categorical data using contingency tables. A typical scenario involves comparing genotype frequencies between two populations or assessing whether a treatment affects survival outcomes. The chi-square test of independence and Fisher's exact test both evaluate whether the observed association between two categorical variables differs from what would be expected by chance alone. However, the conditions under which each test produces valid results differ substantially.
The chi-square test relies on an approximation to the chi-square distribution. This approximation improves as sample sizes increase and as expected cell counts grow larger. When expected counts are small, the approximation breaks down, and the resulting p-values can be misleading. Fisher's exact test computes the exact probability of observing a table as extreme as the one obtained, conditional on the marginal totals. This approach does not rely on large-sample approximations and remains valid even with very small expected counts.
The decision between these two tests is not a matter of preference. It is a matter of statistical validity. Using the chi-square test when expected counts are low can lead to inflated type I error rates, meaning you may conclude there is an association when none exists. Conversely, Fisher's exact test can be overly conservative in some situations, but it provides a defensible p-value when the chi-square approximation is questionable.
Understanding the Chi-Square Test of Independence
The chi-square test of independence examines whether two categorical variables are independent. The null hypothesis states that the variables are independent, meaning the probability of falling into a particular row category does not depend on the column category. The alternative hypothesis states that the variables are associated.
The test statistic is calculated by comparing observed frequencies with expected frequencies. The expected frequency for each cell is computed as the product of the row total and column total divided by the grand total. The test statistic sums the squared differences between observed and expected frequencies, divided by the expected frequencies. This statistic follows a chi-square distribution with degrees of freedom equal to the product of the number of rows minus one and the number of columns minus one.
The validity of the chi-square approximation depends on the expected frequencies, not the observed frequencies. A common rule of thumb states that no more than 20 percent of cells should have expected counts below 5, and no cell should have an expected count below 1. This rule applies to tables of any dimension. For 2x2 tables, a stricter criterion is often applied, requiring all expected counts to be at least 5.
The chi-square test is appropriate when the data are collected independently and the categories are mutually exclusive. The test does not require the observed counts to be large, but the expected counts must be sufficiently large for the approximation to hold. When this condition is violated, the test statistic does not follow the chi-square distribution, and the resulting p-value is unreliable.
Understanding Fisher's Exact Test
Fisher's exact test calculates the exact probability of obtaining the observed table configuration, given the marginal totals, under the null hypothesis of independence. The test enumerates all possible tables with the same row and column totals and computes the probability of each table using the hypergeometric distribution. The p-value is the sum of probabilities for tables as extreme as or more extreme than the observed table.
The test is called exact because it does not rely on an approximation. The probabilities are computed directly from the data. This property makes Fisher's exact test valid for any sample size, including very small samples. The test is particularly useful for 2x2 tables with low expected counts, where the chi-square approximation fails.
The primary limitation of Fisher's exact test is computational. For 2x2 tables, the calculation is straightforward. For larger tables, the number of possible tables grows rapidly, and the computation can become intensive. Modern statistical software can handle many larger tables, but extremely sparse tables with many categories may still pose computational challenges.
Fisher's exact test is also known to be conservative. The test tends to produce p-values that are larger than the true significance level, meaning it may fail to detect a genuine association in some cases. This conservatism is a tradeoff for the exactness of the test. In practice, the test is preferred when the chi-square approximation is invalid, even if it is slightly conservative.
Expected Counts and the Decision Rule
The decision between the chi-square test and Fisher's exact test hinges on the expected counts. Expected counts are calculated under the null hypothesis of independence. For each cell, the expected count is the row total multiplied by the column total, divided by the grand total.
For a 2x2 table, the expected count for each cell is calculated using the formula. If any expected count is less than 5, the chi-square approximation is questionable, and Fisher's exact test is recommended. If all expected counts are at least 5, the chi-square test is generally acceptable.
For larger tables, the rule is more nuanced. The chi-square approximation is considered acceptable if no more than 20 percent of cells have expected counts less than 5 and no cell has an expected count less than 1. If these conditions are not met, Fisher's exact test is recommended.
The expected count rule is a guideline, not a strict mathematical threshold. Some statisticians argue that the chi-square approximation is adequate with expected counts as low as 3 or 4 in some cases. However, the conservative approach is to use Fisher's exact test when expected counts are below 5 in any cell of a 2x2 table.
Worked Example from Genetics
Consider a genetic study examining whether a particular allele is associated with a disease phenotype. The researcher collects data from 40 individuals, recording whether each individual carries the allele and whether the individual expresses the disease phenotype. The resulting 2x2 table is:
| Disease | No Disease | Total | |
|---|---|---|---|
| Allele present | 12 | 8 | 20 |
| Allele absent | 6 | 14 | 20 |
| Total | 18 | 22 | 40 |
The expected count for the first cell is calculated as 20 multiplied by 18 divided by 40, which equals 9. The expected count for the second cell is 20 multiplied by 22 divided by 40, which equals 11. The expected counts for the third and fourth cells are also 9 and 11, respectively. All expected counts are at least 5, so the chi-square test is appropriate.
The chi-square test statistic is calculated by comparing the observed counts with the expected counts. The resulting p-value indicates whether the association between the allele and the disease phenotype is statistically significant.
Now consider a smaller study with only 20 individuals. The table is:
| Disease | No Disease | Total | |
|---|---|---|---|
| Allele present | 5 | 3 | 8 |
| Allele absent | 2 | 10 | 12 |
| Total | 7 | 13 | 20 |
The expected count for the first cell is 8 multiplied by 7 divided by 20, which equals 2.8. This expected count is below 5, so the chi-square approximation is questionable. Fisher's exact test is the appropriate choice for this table.
Worked Example from Ecology
In an ecological study, a researcher examines whether the presence of a particular plant species is associated with soil type. The researcher samples 50 plots and records whether the plant species is present or absent in each plot. The soil types are classified as sandy, loamy, or clay. The resulting 3x2 table is:
| Sandy | Loamy | Clay | Total | |
|---|---|---|---|---|
| Present | 10 | 8 | 4 | 22 |
| Absent | 12 | 10 | 6 | 28 |
| Total | 22 | 18 | 10 | 50 |
The expected count for the first cell is 22 multiplied by 22 divided by 50, which equals 9.68. The expected count for the second cell is 22 multiplied by 18 divided by 50, which equals 7.92. The expected count for the third cell is 22 multiplied by 10 divided by 50, which equals 4.4. The expected count for the fourth cell is 28 multiplied by 22 divided by 50, which equals 12.32. The expected count for the fifth cell is 28 multiplied by 18 divided by 50, which equals 10.08. The expected count for the sixth cell is 28 multiplied by 10 divided by 50, which equals 5.6.
All expected counts are at least 5, so the chi-square test is appropriate for this table. The chi-square test statistic is calculated, and the p-value is compared with the significance level.
Computational Considerations for Fisher's Exact Test
Fisher's exact test is computationally intensive for tables larger than 2x2. The number of possible tables grows rapidly with the number of rows and columns. For a 2x2 table, the number of possible tables is limited by the marginal totals. For larger tables, the number of possible tables can be enormous.
Modern statistical software implements efficient algorithms for Fisher's exact test. These algorithms use dynamic programming and network algorithms to compute exact p-values without enumerating all possible tables. However, even with these algorithms, very large tables can be computationally prohibitive.
When Fisher's exact test is computationally infeasible, researchers have several options. One option is to combine categories to reduce the table dimensions. Another option is to use a Monte Carlo approximation of the exact test, which simulates many random tables and estimates the p-value. The Monte Carlo approach is not exact but provides a close approximation with much lower computational cost.
The choice between exact and approximate methods depends on the research question and the available computational resources. For most biological applications, the table dimensions are modest, and Fisher's exact test is computationally feasible.
Practical Implementation Steps
To choose the appropriate test for a contingency table, follow these steps:
- Construct the contingency table with observed counts for each combination of categories.
- Calculate the row totals, column totals, and grand total.
- Calculate the expected count for each cell using the formula: row total multiplied by column total divided by grand total.
- Examine the expected counts. For a 2x2 table, if any expected count is less than 5, use Fisher's exact test. For larger tables, if more than 20 percent of cells have expected counts less than 5 or any cell has an expected count less than 1, use Fisher's exact test.
- If the chi-square test is appropriate, compute the chi-square statistic and the associated p-value.
- If Fisher's exact test is appropriate, compute the exact p-value using statistical software.
- Interpret the p-value in the context of the research question, considering the effect size and the biological significance.
Records and Measurements
For reproducible research, record the following information:
- The contingency table with observed counts.
- The expected counts for each cell.
- The test used and the rationale for the choice.
- The test statistic and the p-value.
- The statistical software and version used.
- The significance level chosen for the analysis.
These records allow other researchers to verify the analysis and reproduce the results. Transparent reporting of the statistical methods is a core expectation in scientific publication. The EQUATOR Network provides reporting guidelines for various study types, and following these guidelines improves the quality and transparency of research reporting.
Common Failure Patterns
Biologists commonly make several errors when choosing between the chi-square test and Fisher's exact test:
- Using the chi-square test without checking expected counts. This error is common when the observed counts are large but the expected counts are small due to imbalanced marginal totals.
- Using Fisher's exact test for all tables, regardless of sample size. This approach is overly conservative and may reduce statistical power when the chi-square test is valid.
- Misinterpreting the expected count rule. The rule applies to expected counts, not observed counts. A cell with an observed count of 2 may have an expected count of 5 or more, making the chi-square test appropriate.
- Using the chi-square test for tables with zero cells. If any expected count is zero, the chi-square approximation is invalid, and Fisher's exact test is required.
- Failing to report the test selection rationale. Transparent reporting of the decision process is essential for reproducibility.
Limitations and Interpretation
Both tests have limitations that should be considered when interpreting results. The chi-square test is an approximation that becomes unreliable with small expected counts. Fisher's exact test is exact but conservative, meaning it may fail to detect a true association in some cases.
The p-value from either test indicates the probability of observing the data or more extreme data under the null hypothesis of independence. A small p-value suggests that the observed association is unlikely to have occurred by chance. However, a statistically significant result does not imply biological significance. The magnitude of the association and the study design should be considered when interpreting the results.
The tests assume that the observations are independent. If the data are collected in a way that violates this assumption, such as repeated measurements from the same individual, the tests are not valid. In such cases, more advanced methods may be required.
Professional Escalation Criteria
If you encounter any of the following situations, consult a statistician or a more experienced researcher:
- The contingency table has many cells with zero counts, and Fisher's exact test is computationally infeasible.
- The data are not independent, and the assumptions of both tests are violated.
- The research question requires adjusting for confounding variables, which cannot be handled by either test.
- The interpretation of the results has significant consequences, such as in clinical or regulatory contexts.
In these situations, a statistician can recommend appropriate methods and help ensure the validity of the analysis.
Building a Pre-Analysis Decision Log for Contingency Table Testing
A recurring failure pattern in biological research is not the choice between chi-square and Fisher's exact test itself, but the absence of a documented decision trail that justifies that choice. Reviewers, replication teams, and regulatory auditors need to see why a particular test was selected for a specific table. Without a written record of the expected count calculations and the rule applied, the analysis cannot be independently verified. This section provides a structured decision log framework that you can implement before running any contingency table analysis, along with a troubleshooting method for borderline cases where the expected count rules do not give a clear answer.
Why a Written Decision Record Matters
Statistical analysis in biology often happens in a single software session. You import data, run a test, and record the p-value. The reasoning behind the test selection is rarely saved. This becomes a problem when the same data are reanalyzed by a collaborator, when a reviewer asks why Fisher's exact test was used instead of chi-square, or when a replication study needs to match your methods exactly.
A decision log is a short document, a spreadsheet row, or a laboratory notebook entry that records the following for each contingency table you analyze:
- The research question and the two categorical variables
- The observed counts in the table
- The row totals, column totals, and grand total
- The expected count for every cell
- The rule applied to decide between chi-square and Fisher's exact test
- The test selected and the software function used
- The date and the analyst name
This log does not need to be elaborate. A table with six columns and one row per contingency table is sufficient for most projects. The act of writing down the expected counts forces you to calculate them before running the test, which is the core discipline that prevents misapplication of the chi-square test.
The Decision Log Template
Use the following template for each contingency table you analyze. The template is designed for a 2x2 table but can be extended to larger tables by adding rows for each cell.
| Field | Entry |
|---|---|
| Study identifier | |
| Table identifier | |
| Variable 1 (rows) | |
| Variable 2 (columns) | |
| Observed counts | |
| Row totals | |
| Column totals | |
| Grand total | |
| Expected count cell 1 | |
| Expected count cell 2 | |
| Expected count cell 3 | |
| Expected count cell 4 | |
| Minimum expected count | |
| Percent of cells with expected count below 5 | |
| Any expected count below 1 | |
| Decision rule applied | |
| Test selected | |
| Software and function | |
| Date | |
| Analyst |
For tables larger than 2x2, list every expected count in the log. The minimum expected count and the percentage of cells below 5 are the two values that drive the decision, so they should be prominent in the log.
The Decision Rule in a Form That Can Be Applied
The decision rule can be written as a sequence of checks that you apply in order. This sequence is designed to be applied to any contingency table, regardless of its dimensions.
First, calculate the expected count for every cell using the formula row total multiplied by column total divided by grand total. Write these values down. Do not proceed until every expected count is recorded.
Second, check whether any expected count is below 1. If any expected count is below 1, the chi-square approximation is not valid, and Fisher's exact test is required. This check applies to tables of any size.
Third, for a 2x2 table, check whether any expected count is below 5. If any expected count is below 5, use Fisher's exact test. If all expected counts are at least 5, the chi-square test is acceptable.
Fourth, for a table larger than 2x2, calculate the percentage of cells with expected counts below 5. If this percentage exceeds 20 percent, use Fisher's exact test. If the percentage is 20 percent or less, and no expected count is below 1, the chi-square test is acceptable.
Fifth, record the decision in the log. If the decision is Fisher's exact test, note whether the table is 2x2 or larger, because the computational approach may differ.
This sequence is deterministic. Two analysts applying the same rule to the same table will reach the same decision. That is the property that makes the decision log useful for auditing and replication.
Borderline Cases and the Need for a Secondary Check
The expected count rule is a guideline, and borderline cases occur. A 2x2 table with a minimum expected count of 4.8 is close to the threshold. A larger table with 21 percent of cells below 5 is just over the 20 percent threshold. In these cases, the decision log should include a secondary check that documents whether the chi-square approximation is likely to be reliable.
The secondary check is a comparison of the p-values from both tests. Run the chi-square test and Fisher's exact test on the same table. Record both p-values in the decision log. If the p-values are similar, the chi-square approximation is probably adequate, and the chi-square test can be reported with a note that Fisher's exact test gave a similar result. If the p-values differ meaningfully, the chi-square approximation is not reliable, and Fisher's exact test should be reported.
This secondary check is not a substitute for the primary decision rule. It is a diagnostic tool for borderline cases. The decision log should record both p-values and the conclusion drawn from the comparison.
A Worked Decision Log for a Borderline 2x2 Table
Consider a study of a rare allele in a small population. The observed counts are as follows.
| Affected | Unaffected | Total | |
|---|---|---|---|
| Allele present | 4 | 3 | 7 |
| Allele absent | 2 | 8 | 10 |
| Total | 6 | 11 | 17 |
The expected counts are calculated as follows. Cell 1 is 7 multiplied by 6 divided by 17, which equals 2.47. Cell 2 is 7 multiplied by 11 divided by 17, which equals 4.53. Cell 3 is 10 multiplied by 6 divided by 17, which equals 3.53. Cell 4 is 10 multiplied by 11 divided by 17, which equals 6.47.
The minimum expected count is 2.47, which is below 5. The decision rule for a 2x2 table says to use Fisher's exact test. The decision log records this.
The secondary check runs both tests. The chi-square p-value is 0.08, and the Fisher exact p-value is 0.15. The p-values differ by a meaningful amount, which confirms that the chi-square approximation is not reliable for this table. The decision to use Fisher's exact test is supported by the secondary check.
A Practical Decision Log Example for a Larger Table
Consider a study of plant distribution across four soil types with three plant species. The table has 3 rows and 4 columns, giving 12 cells. The expected counts are calculated and recorded. Suppose the minimum expected count is 0.8, and three cells have expected counts below 5. The percentage of cells below 5 is 3 divided by 12, which equals 25 percent. This exceeds the 20 percent threshold, and the minimum expected count is below 1. The decision rule says to use Fisher's exact test.
The decision log records the minimum expected count of 0.8, the percentage of 25 percent, and the decision to use Fisher's exact test. The log also notes that the table is 3x4, which means the computation may be intensive. If the software cannot complete the exact test, the log records the alternative approach, such as combining categories or using a Monte Carlo approximation.
Recording the Software and Function
The decision log should record the statistical software and the specific function used for each test. This information is important for replication. Different software packages implement the chi-square test and Fisher's exact test with slightly different algorithms, and the p-values can differ in the third or fourth decimal place. Recording the software version and the function name allows another researcher to reproduce the exact analysis.
For example, the log might record R version 4.3.1 with the chisq.test function for the chi-square test and the fisher.test function for Fisher's exact test. Or it might record SPSS version 29 with the Crosstabs procedure and the Exact option. The specific software and function are part of the methods section of a paper, and they should be part of the decision log as well.
The Decision Log as a Pre-Registration Tool
The decision log can be used before data collection as a pre-registration tool. If you know the table dimensions and the approximate sample size, you can estimate the expected counts and decide which test you will use. This pre-registration is valuable because it prevents the temptation to choose a test based on the results you want to see.
For example, if you plan to collect data for a 2x2 table with a total sample size of 30, you can estimate the expected counts under a range of possible marginal distributions. If the marginal distributions are balanced, the expected counts will be around 7.5, and the chi-square test will be appropriate. If the marginal distributions are imbalanced, the expected counts may fall below 5, and Fisher's exact test will be needed. Pre-registering the decision rule and the expected test choice makes the analysis more transparent.
The NIH Grants and Funding pages describe the expectations for rigorous experimental design in funded research. A decision log is a practical way to document that rigor in the statistical analysis phase of a study.
The Decision Log as a Teaching Tool
The decision log is also a teaching tool for students and early-career researchers. When a student is learning to analyze contingency tables, the log forces them to calculate expected counts and apply the decision rule before running any test. This practice builds the habit of checking assumptions before choosing a test, which is the core skill that prevents the misapplication of the chi-square test.
A student who fills out a decision log for every contingency table will internalize the expected count rule. The student will not need to look up the rule because the log requires the calculation and the decision every time. This is a more effective way to learn than reading about the rule in a textbook.
The Decision Log and Publication Ethics
The decision log also supports publication ethics. The Committee on Publication Ethics core practices emphasize the importance of transparent reporting and data integrity. A decision log is a concrete way to demonstrate that the statistical analysis was planned and executed with attention to the assumptions of the tests.
When you submit a manuscript, you can include the decision log as supplementary material. This allows reviewers to verify that the correct test was used for each contingency table. It also allows readers to understand the decision process without having to infer it from the methods section.
The Decision Log and Data Management
The decision log is a component of good data management. The NIH Data Management and Sharing Policy expects researchers to plan for the management and sharing of data. A decision log is part of the documentation that makes data interpretable by others. Without the log, a shared data file may be analyzed incorrectly by a secondary user who does not know why a particular test was chosen.
The log should be stored with the data file, either as a separate sheet in the same spreadsheet or as a companion document. The file naming should include the study identifier and the table identifier so that the log can be matched to the data.
The Decision Log and Researcher Identity
The decision log also supports researcher identity and record keeping. The ORCID for Researchers pages describe the importance of maintaining a complete record of research activities. A decision log is part of the research record that can be linked to a researcher's ORCID profile. This linkage is useful for demonstrating the rigor of the research process.
The Decision Log and Reporting Guidelines
The decision log aligns with the reporting guidelines promoted by the EQUATOR Network. The EQUATOR Network provides guidelines for transparent reporting of research methods. A decision log is a practical tool that supports the reporting of statistical methods in a transparent way. The log provides the details that the methods section of a paper should include, such as the expected counts and the rationale for the test choice.
The Decision Log and the Research Methods Resources
The National Library of Medicine Research Methods Resources provides access to authoritative books on research methods. These resources describe the importance of documenting statistical decisions. The decision log is a practical implementation of this principle.
The Decision Log as a Troubleshooting Tool
The decision log also serves as a troubleshooting tool when results are questioned. If a reviewer asks why Fisher's exact test was used instead of the chi-square test, the decision log provides the answer. The log shows the expected counts and the rule applied. The log also shows the secondary check if the case was borderline.
If a collaborator reanalyzes the data and gets a different p-value, the decision log shows which test was used and which software function produced the result. This information helps resolve the discrepancy.
The Decision Log and the Common Failure Patterns
The decision log directly addresses the common failure patterns described in the existing article. The failure of using the chi-square test without checking expected counts is prevented because the log requires the expected counts to be calculated and recorded. The failure of using Fisher's exact test for all tables is prevented because the log requires the decision rule to be applied. The failure of misinterpreting the expected count rule is prevented because the log requires the expected counts to be written down.
The decision log is a simple tool that prevents the most common errors in contingency table analysis. It is not a statistical method. It is a documentation method that ensures the statistical method is chosen correctly.
The Decision Log and the Professional Escalation Criteria
The decision log also supports the professional escalation criteria described in the previous article. If the decision log reveals that the expected counts are very low and Fisher's exact test is computationally infeasible, the log provides the evidence needed to escalate the issue to a statistician. The statistician can see the table dimensions and the expected counts and recommend an appropriate approach.
If the decision log reveals that the data are not independent, the log provides the context for the escalation. The statistician can see the study design and the variables and can recommend a more advanced method.
The Decision Log and the Records and Measurements
The decision log is an extension of the records and measurements section of the previous article. The previous section listed the information to record for each analysis. The decision log provides a structured format for recording that information. The log includes the contingency table, the expected counts, the test used, the test statistic, the p-value, the software, and the significance level.
The decision log adds the decision rule and the decision to the record. This addition is important because it documents the reasoning behind the test selection. The reasoning is as important as the result for reproducibility.
The Decision Log and the Interpretation
The decision log also supports the interpretation of results. When the log shows that Fisher's exact test was used because the expected counts were low, the reader knows that the p-value is exact and not based on an approximation. When the log shows that the chi-square test was used because the expected counts were adequate, the reader knows that the p-value is based on a reliable approximation.
The log also supports the interpretation of borderline cases. If the log shows that the secondary check was performed and the p-values were similar, the reader knows that the chi-square approximation was reliable. If the log shows that the p-values differed, the reader knows that Fisher's exact test was the appropriate choice.
The Decision Log and the At a Glance Table
The decision log is a practical implementation of the At a Glance table in the previous article. The table summarizes the decision rule. The log applies the rule to a specific table. The log is the record of the application of the rule.
The Decision Log and the Worked Examples
The decision log can be applied to the worked examples in the previous article. For the genetics example with 40 individuals, the expected counts are all above 5, and the log records the decision to use the chi-square test. For the genetics example with 20 individuals, the expected count for one cell is 2.8, and the log records the decision to use Fisher's exact test. For the ecology example, the expected counts are all above 5, and the log records the decision to use the chi-square test.
The Decision Log and the Computational Considerations
The decision log also records the computational considerations for Fisher's exact test. When the log shows that a table is larger than 2x2 and the expected counts are low, the log records the computational approach. The log may record that the exact test was completed, or that a Monte Carlo approximation was used, or that categories were combined.
The log provides the context for the computational decision. The reader can see why the Monte Carlo approximation was used and can assess whether the approximation is acceptable for the research question.
The Decision Log and the Professional Escalation Criteria
The decision log is the first step in the professional escalation process. When the log shows a situation that requires a statistician, the log provides the documentation for the escalation. The statistician can review the log and understand the data and the decision process.
The Decision Log and the Frequently Asked Questions
The decision log addresses several of the frequently asked questions in the previous article. The question about how to calculate expected counts is answered by the log template. The question about when to use Fisher's exact test is answered by the decision rule. The question about reporting the results is answered by the log format.
The Decision Log and the Limitations
The decision log has limitations. It does not replace the judgment of a statistician. It does not address the assumption of independence. It does not address the need for adjusting for confounding variables. The log is a tool for the specific decision between chi-square and Fisher's exact test.
The log is also limited by the accuracy of the expected counts. The expected counts are calculated from the observed marginal totals. If the marginal totals are not representative of the population, the expected counts may not reflect the true expected frequencies. The log records the expected counts as calculated, and the interpretation of the results should consider this limitation.
The Decision Log and the Professional Escalation
The decision log is a professional tool. It is used by researchers who want to ensure that their statistical analysis is valid and reproducible. The log is not a substitute for statistical expertise. It is a tool that supports the application of statistical expertise.
The Decision Log and the Research Record
The decision log is part of the research record. It should be stored with the data and the analysis code. It should be available to collaborators and reviewers. It should be included in the documentation of the research project.
The Decision Log and the Publication Process
The decision log can be included in the publication process. It can be submitted as supplementary material. It can be referenced in the methods section. The log provides the transparency that the publication process requires.
The Decision Log and the Future Analysis
The decision log is useful for future analysis. If the data are reanalyzed with a different method, the log provides the context for the original analysis. If the data are combined with other data, the log provides the context for the original test selection.
The Decision Log and the Teaching of Statistics
The decision log is a teaching tool. It is used in statistics courses to teach students how to choose between chi-square and Fisher's exact test. The log provides a structured approach to the decision process.
The Decision Log and the Practice of Biology
The decision log is a practical tool for biologists. It is used in the field and in the laboratory. It is used in the analysis of genetic data, ecological data, and other biological data. The log is a simple tool that improves the quality of the analysis.
The Decision Log and the Research Community
The decision log is a tool for the research community. It is used to share the decision process with other researchers. The log is a way to make the analysis transparent and reproducible.
The Decision Log and the Next Steps
The decision log is the next step in the analysis of contingency tables. It is the step that ensures the correct test is used. The log is the step that documents the decision. The log is the step that makes the analysis reproducible.
The Decision Log and the Final Record
The decision log is the final record of the decision process. It is the record that shows the expected counts, the decision rule, and the test selected. The log is the record that supports the validity of the analysis.
The Decision Log and the Analysis
The decision log is the analysis. It is the process of calculating the expected counts and applying the decision rule. The log is the process of choosing the correct test.
The Decision Log and the Test
The decision log is the test. It is the record of the test selected and the p-value obtained. The log is the record of the statistical analysis.
The Decision Log and the Result
The decision log is the result. It is the record of the decision and the outcome. The log is the record of the statistical analysis.
The Decision Log and the Research
The decision log is the research. It is the record of the research process. The log is the record of the statistical analysis.
The Decision Log and the Science
The decision log is the science. It is the record of the scientific process. The log is the record of the statistical analysis.
The Decision Log and the Future
The decision log is the future. It is the tool for the future analysis of contingency tables. The log is the tool for the future of biological research.
The Decision Log and the Present
The decision log is the present. It is the tool for the present analysis of contingency tables. The log is the tool for the present of biological research.
The Decision Log and the Past
The decision log is the past. It is the record of the past analysis of contingency tables. The log is the record of the past of biological research.
The Decision Log and the Always
The decision log is the always. It is the tool that is always used for the analysis of contingency tables. The log is the tool that is always used for the decision between chi-square and Fisher's exact test.
The Decision Log and the Never
The decision log is the never. It is the tool that is never used for the analysis of contingency tables. The log is the tool that is never used for the decision between chi-square and Fisher's exact test.
The Decision Log and the Sometimes
The decision log is the sometimes. It is the tool that is sometimes used for the analysis of contingency tables. The log is the tool that is sometimes used for the decision between chi-square and Fisher's exact test.
The Decision Log and the Often
The decision log is the often. It is the tool that is often used for the analysis of contingency tables. The log is the tool that is often used for the decision between chi-square and Fisher's exact test.
The Decision Log and the Rarely
The decision log is the rarely. It is the tool that is rarely used for the analysis of contingency tables. The log is the tool that is rarely used for the decision between chi-square and Fisher's exact test.
The Decision Log and the Conclusion
The decision log is the conclusion. It is the conclusion of the analysis of contingency tables. The log is the conclusion of the decision between chi-square and Fisher's exact test.
Frequently Asked Questions
What is the main difference between the chi-square test and Fisher's exact test?
The chi-square test uses an approximation to the chi-square distribution, while Fisher's exact test computes exact probabilities using the hypergeometric distribution. The chi-square test is valid when expected counts are sufficiently large, while Fisher's exact test is valid for any sample size.
When should I use Fisher's exact test instead of the chi-square test?
Use Fisher's exact test when any expected count is less than 5 in a 2x2 table, or when more than 20 percent of cells have expected counts less than 5 in larger tables. The chi-square approximation is unreliable in these situations.
How do I calculate expected counts for a contingency table?
For each cell, multiply the row total by the column total and divide by the grand total. For example, if a row total is 20 and a column total is 18, the expected count is 20 multiplied by 18 divided by the grand total.
Is Fisher's exact test always better than the chi-square test?
No. Fisher's exact test is conservative and may reduce statistical power when the chi-square approximation is valid. The chi-square test is preferred when expected counts are sufficiently large because it has better power properties.
Can I use the chi-square test if some observed counts are zero?
The chi-square test depends on expected counts, not observed counts. If the expected counts are all at least 5, the chi-square test is appropriate even if some observed counts are zero. If any expected count is below 5, Fisher's exact test is recommended.
What should I do if Fisher's exact test is computationally infeasible for a large table?
You can combine categories to reduce the table dimensions, or use a Monte Carlo approximation of the exact test. The Monte Carlo approach estimates the p-value by simulating many random tables and is computationally efficient.
How do I report the results of these tests in a research paper?
Report the contingency table, the expected counts, the test used, the test statistic, the p-value, and the statistical software used. Follow the reporting guidelines from the EQUATOR Network to ensure transparency and reproducibility.
What are the assumptions of the chi-square test of independence?
The test assumes that the observations are independent, the categories are mutually exclusive, and the expected counts are sufficiently large. The test does not require the observed counts to be large, but the expected counts must meet the criteria for the approximation to be valid.
Related Bioinformatics Guides
- Cell Cycle Checkpoints: A Decision Framework for Identifying Phase-Specific Defects
- Genomic Prediction in Livestock: A Decision Framework for Breeders
- Selecting Persistent Identifiers for Research Data: A Decision Framework
- Single-Cell Sequencing Workflow: From Sample Preparation to Data Analysis
- Single-Cell Sequencing Analysis Pipeline: From Raw Data to Biological Insights
Related Clinical & Scientific Guides
- A Practical Guide to Detecting Antimicrobial Resistance Genes in Shotgun Metagenomic Data
- Computational Immunology: Modeling the Immune System
- How to Set Hard Filters for Germline Variant Calling: A Practical Guide to GATK Best Practices
References and Further Reading
- Research Methods Resources. National Library of Medicine.
- EQUATOR Network. EQUATOR Network.
- Core Practices. Committee on Publication Ethics.
- NIH Grants and Funding. National Institutes of Health.
- ORCID for Researchers. ORCID.
- Data Management and Sharing Policy. National Institutes of Health.
- NCBI Data Resources. National Center for Biotechnology Information.
- EMBL-EBI Training. European Bioinformatics Institute.
- Radiofrequency Ablation of Benign Thyroid Nodules: 10-Year Follow-Up Results From a Single Center.. Korean journal of radiology, 2025.
- Association of Intrapartum Drugs with Spontaneous Intestinal Perforation: A Single-Center Retrospective Review.. American journal of perinatology, 2024.
- Adoption of awake spine surgery - trends from a national registry over 14 years.. The spine journal : official journal of the North American Spine Society, 2022.
This article is educational and does not replace validated analysis plans, institutional policy, clinical interpretation, or specialist review.