Statistics and Computing

, Volume 20, Issue 1, pp 57–61 | Cite as

Perfect sampling algorithm for small m×n contingency tables

  • Nicolas WickerEmail author


A Markov chain is proposed that uses coupling from the past sampling algorithm for sampling m×n contingency tables. This method is an extension of the one proposed by Kijima and Matsui (Rand. Struct. Alg., 29:243–256, 2006). It is not polynomial, as it is based upon a recursion, and includes a rejection phase but can be used for practical purposes on small contingency tables as illustrated in a classical 4×4 example.


Markov chains Perfect sampling Contingency tables Coupling from the past 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. Chen, Y., Diaconis, P., Holmes, S., Liu, J.S.: Sequential Monte Carlo methods for statistical analysis of tables. J. Am. Stat. Assoc. 100, 109–120 (2005) zbMATHCrossRefMathSciNetGoogle Scholar
  2. Cryan, M., Dyer, M., Goldberg, L.A., Jerrum, M., Martin, R.: Rapidly mixing Markov chains for sampling contingency tables with constant number of rows. In: Proceedings of the 43rd Annual Symposium on Foundations of Computer Science (FOCS 2002), pp. 711–720 (2002) Google Scholar
  3. Diaconis, P., Efron, B.: Testing for independence in a two-way table: New interpretations of the chi-square statistic (with discussion). Ann. Stat. 13, 845–913 (1985) zbMATHCrossRefMathSciNetGoogle Scholar
  4. Diaconis, P., Saloff-Coste, L.: Random walk on contingency tables with fixed row and column sums. Technical report, Department of Mathematics, Harvard University (1995) Google Scholar
  5. Fisher, R.A.: The logic of inductive inference (with discussion). J. R. Stat. Soc. 98, 39–54 (1935) CrossRefGoogle Scholar
  6. Kijima, S., Matsui, T.: Polynomial time perfect sampling algorithm for two-rowed contingency tables. Rand. Struct. Algorithms 29, 243–256 (2006) zbMATHCrossRefMathSciNetGoogle Scholar
  7. Propp, J., Wilson, D.: How to get a perfectly random sample from a generic Markov chain and generate a random spanning tree of a directed graph. Rand. Struct. Algorithms 9, 223–252 (1996) zbMATHCrossRefMathSciNetGoogle Scholar
  8. Snee, R.D.: Graphical display of two-way contingency tables. Am. Stat. 38, 9–12 (1974) CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC 2009

Authors and Affiliations

  1. 1.Laboratoire de Bioinformatique et Génomique IntégrativeInstitut de Génétique et de Biologie Moléculaire et CellulaireIllkirch CedexFrance

Personalised recommendations