E Algorithm for the DDP statistic For the DDP statistic, the algorithm is very similar to that for the ADP statistic, except that only DDP are considered on the grid of ranked data { 1 , . . . , N } $^{2}$. The algorithm is slightly more complex because the number of partitions that include a cell C depends on the partition size m , on the data, and on the type of cell, with four possible types. Specifics follow for internal cells. The first type is a cell C for which there is a sample point that falls on the boundary of C but not on one of its corners. Then no DDP can ever have C as a cell, and therefore the number of DDP that include C is zero. For example, in Figure 7 (middle panel), if the open circle is an observation, and therefore the filled circle with the same y value is not, since there are no ties, then any DDP with this y value will necessarily partition C at the x value of the open circle observation, and thus C cannot be a cell in any DDP. For the remaining three types of cells, if there are sample points that fall on the boundary of C they are necessarily on the corners of C . These types of cells differ by the number of observations that determine the cell. The second type is a cell C defined by two observed points. Then, the number of DDP that include C is the number of ways to choose m − 3 points from the points in the four outer areas defined by (0 , r$_{l}$ ) × (0 , s$_{l}$ ), (0 , r$_{l}$ ) × ( s$_{h}$, N ], ( r$_{h}$, N ] × (0 , s$_{l}$ ), and ( r$_{h}$, N ] × ( s$_{h}$, N ], see Figure 7 (left panel) for illustration. The number of points in the four areas is calculable in O (1) using A , as defined in equation (3.3). Specifically, the count of samples that fall strictly inside any cell with rank ranges r ∈ [ r$_{l}$, r$_{h}$ ] and s ∈ [ s$_{l}$, s$_{h}$ ] is: The third and fourth type are cells defined by three or four observed points, respec- tively, see Figure 7 (middle and right panels). Now the number of DDP that include o$_{C}$ = A ( r$_{h}$ − 1 , s$_{h}$ − 1) − A ( r$_{l}$, s$_{h}$ − 1) − A ( r$_{h}$ − 1 , s$_{l}$ ) + A ( r$_{l}$, s$_{l}$ ) . 62