2
Disclaimer. United States Government Work, uncopyrighted, public-domain, DRAFT COPY ONLY. This document does not necessarily represent the views or policies of any United States Government agency. This document is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and non-infringement. In no event shall the authors be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of, or in connection with the document or the use or other dealings made with the document.

3
Abstract. Context: Contingency tables are commonly used for organizing frequency data on biomedical databases. Classical statistical methods applied to contingency tables include chisquare and Fisher exact methods, based upon squared-normal and binomial distributions. In the token swap method, patients, or tokens, in the contingency table are randomly swapped, to determine whether observed data deviate from a preset null hypothesis. Technology: Perl programming language, theory of statistics. Design: The simplest contingency table is a rectangular table, consisting of four cells, two rows by two columns, that measures association between row and column variables in a misclassification space. The null hypothesis predicts expected values for each cell; tokens are randomly swapped until they match observed values. More generally, a three-dimensional contingency table has rows, columns, and depths, representing a variable for ultimate biomedical outcome. Results: The two- and three-dimensional token swap methods satisfy the Neyman- Pearson condition for power of the alternative hypothesis. Unlike classical methods, the token swap method supports a range of null hypotheses, including those with zero cell totals. Conclusion: The present model extends the range of existing contingency table analysis to incorporate additional clinicopathologic information, and to explore customized null hypotheses.