On the dimensionality reduction of a contingency table