chi-squared test with fixed marginal totals