July 2004
We describe an algorithm for the sequential sampling of entries in multiway contingency tables. Properties of the sampling values at each step are related to properties of the associated toric ideal using computational commutative algebra. In particular, order of cell sampling and the set of sampling values at each step are related to properties of the initial terms. We apply the algorithm to examples of contingency tables which appear in the social and medical sciences.
KEY WORDS: Conditional inference, contingency table, counting problem, exact test, Monte Carlo, sequential importance sampling, toric ideal.
The manuscript is available in PostScript and PDF formats.