A.2 The ADP test We want to show that if H$_{0}$ is false, then for an arbitrary fixed α , lim$_{N}$$_{→∞}$ P r ( S ADP m × m > S tab 1 − $_{α}$) = 1, where S tab 1 − α denotes the 1 − α quantile of the null distribution of S ADP m × $_{m}$. We use A , c, A$_{1}$ , A$_{2}$ , f$_{1}$, f$_{2}$ as defined in the beginning of Appendix A of the main text. For the ADP test, recall that the partitioning is based on selecting m − 1 points from 1 . 5 , . . . , N − 0 . 5 for the partitions of the ranked x -values, and separately for the partitions of the ranked y -values. For a fixed rectangle, we say a grid point ( i + 0 . 5 , j + 0 . 5) is in the rectangle if the two x -values with ranks i and i + 1, and the two y -values with ranks j and j + 1, are in the rectangle, for ( i, j ) ∈ { 1 , . . . , N } $^{2}$. Let Γ { ( x$_{1}$, y$_{1}$ ) , . . . , ( x$_{N}$, y$_{N}$ ) } be the set of partitions of size m with at least one grid point in A$_{1}$ and at least one grid point in A$_{2}$ . Let N$_{ix}$ be the number of x-coordinates of the grid points in A$_{i}$ , i ∈ { 1 , 2 } , and N$_{iy}$ be the number of y-coordinates of the grid points in A$_{i}$ , i ∈ { 1 , 2 } . Let I ∈ Γ { ( x$_{1}$, y$_{1}$ ) , . . . , ( x$_{N}$, y$_{N}$ ) } define an (arbitrary fixed) ADP partition in Γ. There exist two x -values in A$_{1}$ that are separated by a grid point in I , and two x - values in A$_{2}$ that are separated by a grid point in I , denote the average of these two x -values by x ∗ 1 and x ∗ $_{2}$. Let y ∗ 1 and y ∗ 2 be similarly defined for the y -values. Let C be the cell defined by the points ( x ∗ $_{i}$, y ∗ $_{i}$) , i = 1 , 2. The fraction of observed counts in the cell C is a linear combination of empirical cumulative distribution functions and the expected fraction under the null, is a function of the cumulative marginal 49 o$_{C}$ N = ˆ F$_{XY}$ ( x ∗ $_{1}$, y ∗ $_{1}$) + ˆ F$_{XY}$ ( x ∗ $_{2}$, y ∗ $_{2}$) − ˆ F$_{XY}$ ( x ∗ $_{1}$, y ∗ $_{2}$) − ˆ F$_{XY}$ ( x ∗ $_{2}$, y ∗ $_{1}$) ,