Partition of the Chi-Squared Statistic in a Contingency Table