Statistical tests for two-by-two tables
On this page

Recommendations


The best policy in the analysis of two-by-two tables is:
(1) Where all expected numbers are at least 1, analyse by the 'N - 1' chi-squared test (the K. Pearson chi-squared test but with N replaced by N - 1).
(2) Otherwise, analyse by the Fisher-Irwin test, with two-sided tests carried out by Irwin's rule (taking tables from either tail as likely, or less, as that observed).
These recommendations apply to data from either comparative trials or cross-sectional studies, and update those of Cochran (1952, 1954).

This website contains an online calculator for the 'N - 1' chi-squared test, i.e. the test recommended for most sets of data.

The above recommendations are based on extensive computer simulations and theoretical arguments, which are explained on this website. A summary of the research has been published by Statistics in Medicine (see below).


Article in Statistics in Medicine


A summary of the research work has been published in Statistics in Medicine:
Campbell Ian, 2007, Chi-squared and Fisher-Irwin tests of two-by-two tables with small sample recommendations, Statistics in Medicine, 26, 3661 - 3675
and is available on the Wiley website, from:
http://www3.interscience.wiley.com/cgi-bin/abstract/114125487/ABSTRACT
or by email from the author.

Manuscript available for download


Alternatively, you can download the accepted 'preprint' .pdf file from the following: campbell_twobytwo_preprint.pdf .
This is a preprint of an article published in Statistics in Medicine : Campbell Ian, 2007, Chi-squared and Fisher-Irwin tests of two-by-two tables with small sample recommendations, 26, 3661 - 75. Copyright © (2007) which is available on the Wiley website (see http://www3.interscience.wiley.com/cgi-bin/abstract/114125487/ABSTRACT.

Subsidiary material


Introduction
  • Why use N -1 rather than N in a chi squared test or comparison of proportions: the theoretical basis

Results
  • Why do the charts of maximum Type I error have a sawtooth appearance

Software used


The software used in the research is being made freely available. To download and install it:
1. Download by clicking: twobytwotables.zip .
2. Save it to your hard disk, and double-click it to unzip it.
3. Run Setup.exe, which will install TwoByTwoTables.exe.

This has three features:
1. Analysis of a particular 2 x 2 table by chi squared test or Fisher-Irwin test as appropriate (automatically decided).
2. Comparison of actual with nominal Type I error for a particular sample size and particular population proportion(s)
3. Comparison of maximum actual Type I error with nominal (or calculation of Type I error excess) for a particular sample size over all population proportions.

Back to top