Calculate chi-square, Fisher exact, odds ratio, and relative risk for 2×2 tables
Try It FreeA 2×2 contingency table (also called a fourfold table) is the simplest form of cross-tabulation, with two rows and two columns. It is the most common layout in medical research, epidemiology, and A/B testing. CrossTabs.com automatically detects 2×2 tables and computes additional measures like odds ratio, relative risk, and Fisher's exact test.
For 2×2 tables, CrossTabs.com provides several additional statistics beyond the standard chi-square test:
Consider a clinical trial comparing a new drug to placebo:
| Improved | Not Improved | Total | |
|---|---|---|---|
| Drug | 45 | 15 | 60 |
| Placebo | 30 | 30 | 60 |
| Total | 75 | 45 | 120 |
Results: χ²(1) = 7.50, p = 0.006. Odds Ratio = 3.00 [95% CI: 1.37, 6.58]. Relative Risk = 1.50 [95% CI: 1.12, 2.01]. The drug group had significantly higher improvement rates.
Yates' continuity correction is recommended when: (1) the table is exactly 2×2, (2) any expected cell count is between 5 and 10, and (3) you want a more conservative test. However, some statisticians argue it is overly conservative. CrossTabs.com calculates both corrected and uncorrected values so you can compare. For more details, see the chi-square test documentation.
Use Fisher's exact test when any expected cell count is below 5, or when the total sample size is less than 20. CrossTabs.com automatically recommends Fisher's exact test when appropriate.
An odds ratio of 1 means no association. OR > 1 means the outcome is more likely in the exposure group. OR < 1 means it is less likely. The 95% confidence interval tells you the precision; if it includes 1, the association is not statistically significant.
Relative risk (RR) compares probabilities directly and is easier to interpret. Odds ratio (OR) compares odds and is used in case-control studies where RR cannot be calculated. For rare outcomes (< 10%), OR approximates RR.