A Proof of Theorem 2.2 A.1 The DDP test Denote S$_{m}$$_{×}$$_{m}$ = S DDP m × $_{m}$. For simplicity, we show the proof using Pearson’s test statis- tic. The proof using the likelihood ratio test statistic is very similar and therefore omitted. We want to show that for an arbitrary fixed α ∈ (0 , 1), if H$_{0}$ is false, then lim$_{N}$$_{→∞}$ Pr ( S$_{m}$$_{×}$$_{m}$ > S tab 1 − $_{α}$) = 1, where S tab 1 − α denotes the 1 − α quantile of the null distribution of S$_{m}$$_{×}$$_{m}$ . If H$_{0}$ is false, then without loss of generality h ( x$_{0}$, y$_{0}$ ) > f ( x$_{0}$ ) g ( y$_{0}$ ). Moreover, there exists a distance R > 0 such that h ( x, y ) > f ( x ) g ( y ) for all points ( x, y ) in the set A = { ( x, y ) : x$_{0}$ ≤ x ≤ x$_{0}$ + R, y$_{0}$ ≤ y ≤ y$_{0}$ + R } . The set A has positive probability, and moreover Denote this minimum by c > 0. Clearly, the following two subsets of A have positive probability as well: Denote the probabilities of A$_{1}$ and A$_{2}$ by f$_{1}$ and f$_{2}$ , respectively. Let Γ { ( x$_{1}$, y$_{1}$ ) , . . . , ( x$_{N}$, y$_{N}$ ) } be the set of partitions of size m based on at least one sample point in A$_{1}$ and on at least one sample point in A$_{2}$ . Let N$_{i}$ denote the number of sample points in A$_{i}$ , i ∈ { 1 , 2 } . Let I ∈ Γ { ( x$_{1}$, y$_{1}$ ) , . . . , ( x$_{N}$, y$_{N}$ ) } be such a (arbitrary fixed) partition. So for I there exists ( i, j ) ⊆ I such that ( x$_{i}$, y$_{i}$ ) ∈ A$_{1}$ and ( x$_{j}$, y$_{j}$ ) ∈ A$_{2}$ . Consider the cell C defined by the two points ( i, j ). 42 A$_{1}$ = { ( x, y ) : x$_{0}$ ≤ x ≤ x$_{0}$ + R/ 4 , y$_{0}$ ≤ y ≤ y$_{0}$ + R/ 4 } A$_{2}$ = { ( x, y ) : x$_{0}$ + 3 R/ 4 ≤ x ≤ x$_{0}$ + R, y$_{0}$ + 3 R/ 4 ≤ y ≤ y$_{0}$ + R } . min A [ h ( x, y ) − f ( x ) g ( y )] > 0 .