242

Exact, Uniform Sampling of Contingency Tables via Probabilistic Divide-and-Conquer

Abstract

We present a new algorithm for the exact, uniform sampling of contingency tables of any size and constraints based on the recently introduced probabilistic divide-and-conquer\textit{probabilistic divide-and-conquer} technique. For an m×nm \times n table, the total expected runtime cost to sample a nonnegative integer-valued table uniformly from the set of contingency tables is given by \[O\left(\log(M)\,m\,n\right) + s_0 \] where MM is the largest row sum or column sum, and s0s_0 is the cost to compute certain rejection probabilities. The same algorithm applies, with one extra step, for contingency tables with real-valued entries. A similar algorithm is presented for {0,1}\{0,1\}-valued tables, and several alternative algorithms are presented for the general case where each entry of the table has a specified marginal distribution.

View on arXiv
Comments on this paper