Calculator Inputs
Example Data Table
This sample compares two treatments across five ordered response levels.
| Group | None | Mild | Moderate | High | Severe | Total |
|---|---|---|---|---|---|---|
| Treatment | 8 | 4 | 3 | 1 | 0 | 16 |
| Control | 1 | 3 | 5 | 6 | 4 | 19 |
| Total | 9 | 7 | 8 | 7 | 4 | 35 |
Formula Used
For a fixed 2x5 table, let row totals be r1 and r2. Let column totals be c1 to c5. Let xj be the first row count in column j.
Table probability:
P(X = x) = (r1! r2! c1! c2! c3! c4! c5!) / (n! × product of all cell factorials)
Two sided exact p value: sum probabilities for every feasible table with probability less than or equal to the observed table probability.
Trend statistic: T = sum(scorej × xj). Upper and lower trend tails sum feasible table probabilities by this score direction.
How to Use This Calculator
Enter five column labels, two row labels, and ten observed counts. Counts must be whole numbers. Choose the exact option that matches your research question. Use two sided testing for any distribution difference. Use trend options only when columns have a meaningful order. Press Calculate to show results above the form. Use CSV or PDF buttons to save the report.
Understanding the 2x5 Fisher Exact Test
Fisher exact testing is useful when a contingency table has small counts, uneven margins, or sparse categories. A 2x5 layout compares two row groups across five outcome columns. The test does not rely on a large sample approximation. It fixes the row totals and column totals, then evaluates how unusual the observed arrangement is under the null hypothesis.
This calculator extends the classic two by two idea to a wider table. It uses the Fisher-Freeman-Halton method. Each possible table with the same margins receives a multivariate hypergeometric probability. The observed table probability is compared with probabilities from all feasible tables. For the two sided option, probabilities as small as, or smaller than, the observed probability are summed.
The tool also supports ordered column analysis. When columns represent increasing severity, dose, score, or response level, a trend direction can be tested. Custom scores let you describe the spacing between the five columns. Equal scores such as 1, 2, 3, 4, and 5 fit evenly ordered categories. Unequal scores can represent irregular categories.
When Exact Testing Helps
Use exact testing when expected counts are low. The exact p value is usually preferred for small data. The chi square statistic is still shown as a descriptive guide. Expected values and residuals help identify which cells drive the difference.
Reading the Output
Interpret the result with the research question first. A small p value suggests the row distribution differs across columns. It does not prove practical importance. Review row percentages, expected counts, and odds ratios. Look for a clear pattern before making a conclusion.
Data quality matters. Counts should be independent observations. Each subject should appear in one cell only. Do not enter percentages, rates, or repeated measurements as counts. If a category has no observations in both rows, consider removing that empty column before testing.
Reporting Results
Exports are included for reporting. The CSV file supports spreadsheet review. The PDF file gives a compact record of inputs, probabilities, and summary measures. Keep the table labels clear, so later readers understand the comparison and category order. Report the selected alternative, margin totals, and scoring method. These details make the exact result easier to audit and reproduce later securely.
FAQs
What is a 2x5 Fisher exact test?
It is an exact test for two groups across five categories. It checks whether the row distribution differs while keeping row and column totals fixed.
When should I use this calculator?
Use it when sample sizes are small, expected counts are low, or a chi square approximation may not be reliable for a 2x5 table.
What does the two sided p value mean?
It sums probabilities of feasible tables that are as unlikely as, or more unlikely than, the observed table under fixed margins.
Can I use ordered columns?
Yes. Enter trend scores for ordered categories. Then use the upper or lower trend option to test a directional row pattern.
What counts are allowed?
Use nonnegative whole counts only. Do not enter percentages, rounded rates, duplicated subjects, or observations that belong in multiple cells.
Why are odds ratios sometimes undefined?
An odds ratio can be undefined when a needed cell is zero. Enable the 0.5 correction to obtain a descriptive adjusted estimate.
Is Cramer's V an exact statistic?
No. Cramer's V is an effect size based on the chi square statistic. It helps describe association strength, not exact probability.
What do the export buttons include?
The CSV and PDF reports include the observed table, selected p value, exact alternatives, chi square statistic, Cramer's V, and expected counts.