I have posted an implementation of the Freeman-Halton exact test for 3x3 contingency tables at https://github.com/brannerchinese/ChineseUtilities. I had been using an on-line calculator for this test but it did not accept values as large as I needed so I had to construct my own.
The results initially puzzled me, and it now appears the on-line calculator has something wrong with it — at least, its results today (20130626) do not make sense to me. My code uses two slightly different but congruent equations for the exact test and reports them both (Ghent 1, Soper 2). Since the on-line calculator appears not to be working correctly today, I have tested my results against the reported results of Kirkman (3); they are confirmed.
This little program uses decimal.Decimal
to allow very large
factorials.
References
- (1) Arthur W. Ghent. 1972. A Method for Exact Testing of 2X2, 2X3, 3X3, and Other Contingency Tables, Employing Binomial Coefficients; American Midland Naturalist, Vol. 88, No. 1. (Jul., 1972), pp. 15-27.
- (2) Daniel Soper. 2013. Fisher's Exact Test Calculator for a 3X3 Contingency Table. On line at http://www.danielsoper.com/statcalc/calc.aspx?id=59 (accessed 20130626).
- (3) T. W. Kirkman. 1996. Statistics to Use. Fisher Exact Test. On line at http://www.physics.csbsju.edu/stats/exact.html (accessed 20130626).