Bayesian analysis of contingency tables