# Invariants of categorical contingency table data?

1. Sep 14, 2011

### Stephen Tashi

Is there a way to characterize the set of real valued functions of catagorical contingency tables that are invariant under pairwise interchanges of rows and columns of the table and also independent of permutations of the labels used for the categories?

In statistics a "contingency table" of "categorical" data is something like this:

--------Condition ----I---II---III---IV
subject
1--------------------------A--A--B---C
2--------------------------B--B--C---A
3--------------------------A--A---C---D

The table says that subject 1 had a result of category 'A' when tested under condition 1, a result of type 'A' when tested under condition II, etc.

The labels for the categories A,B,C,D are not numbers and there is not any particular order to them. (i.e. they need not repesent concepts like "cold", "luke warm", "hot" )

One way to informally define a function invariant under the permutations stated above is to let S be the total number of rectangles in the table that have the same letter at each vertex. In the example above, i see only one such rectangle, whose vertices happen to be A's. Swapping two rows or swapping two columns would change the visual dimension of the rectangle(s), but not alter the total count. Changing the labeling scheme so that all A's become B's and all B's become A's would not change the total count.