We show how to construct nonparametric tests for two factor designs. These tests depend on whether or not the factors are ordered. Pearson’s X2 statistic is decomposed into components of orders 1, 2, ... . These components may be further decomposed, the decomposition depending on the design. If neither factor is ordered, the components reflect linear, quadratic etc main and interaction effects. The approach is demonstrated with reference to the latin squares design.