I have a set of population distributions; I obtained them empirically, computing histograms from very large populations (about 1 million per distribution). The population distributions might not have the same shape. The populations are all continuous or all discrete.

I want to test if the distributions are located according to a certain order.

More formally, let $D_i,\ldots,D_k$ be our populations, ordered according to a given criteria. We want to test if their distributions (probability density function) $f_i, \ldots, f_k$ are located according to the order.

I temporarily formulated the problem as testing that $f_i$ is shifted to the left of $f_j$, for each pair of populations $(D_i,D_j)$ with $i <j$,

So far, I performed a Wilcoxon rank-sum test for each pair of populations; using the version for large samples and the correction for ties, I performed the test on the population distributions. However, my distributions do not have the same shape.

I am wondering weather there is a better way to check the orders of distributions.

  • 1
    $\begingroup$ If the distributions might not have the same shape, I'm having trouble figuring out what "order" means. It made sense in the context of one being a "shift" of another but outside of that, I'm confused. $\endgroup$
    – Macro
    Jun 19, 2012 at 12:49
  • 1
    $\begingroup$ @Macro, Igor's definition makes sense even when the distributions have different shapes. His concern about using the Wilcoxon test is valid: although it tests exactly this kind of ordering, it assumes the distributions are merely location-shifted. What I wonder is whether there is any issue here at all: the question says that the $f_i$ are population distributions, not sample distributions, so it appears that no inference is necessary and all one has to do is compute the relevant probabilities. Igor, is this the case, or do you actually have (large) samples of the populations? $\endgroup$
    – whuber
    Jun 19, 2012 at 13:10
  • 1
    $\begingroup$ Yes, Igor, except (perhaps because I don't know what your $f_i$ mean) that integral formula does not look right to me. A brute-force calculation to compare a dataset $(x_i)$ to another dataset $(y_j)$ would count all pairs $(i,j)$ where $x_i\lt y_j$, add half the count where $x_i=y_j$, and divide by the total number of pairs. An efficient way to do this comes down to manipulation of rank sums within the combined dataset: in effect, the Wilcoxon test statistic already tells you what you need to know. $\endgroup$
    – whuber
    Jun 19, 2012 at 14:57
  • 2
    $\begingroup$ Comparing/ranking variables using the stress-strength coefficient $P(X<Y)$ might not be a good choice. This has been discussed in terms of the Pitman closeness because this method leads to paradoxes and might not be transitive. $\endgroup$
    – user10525
    Jun 20, 2012 at 12:41
  • 1
    $\begingroup$ Do you want to test for stochastic ordering, specifically, first order stochastic ordering: $X \leq_{st} Y$ if $P(x\geq u) \leq P(y\geq u) \forall u \in(-\infty,\infty)$? $\endgroup$
    – jbowman
    Jun 20, 2012 at 22:44

1 Answer 1


The Kruskal-Wallis procedure is the multi-group equivalent of the Wilcoxon rank-sum test, which is akin to one-way ANOVA without the normality assumption.

A nonparametric ordered alternative equivalent of the Kruskal-Wallis test is the Jonckheere-Terpstra test.

That is, where the Kruskal-Wallis tests against a general alternative "at least one $\neq$", J-T tests against a specified order ($\theta_1 \leq \theta_2 \leq \ldots \leq \theta_k$), with "at least one $<$".

The test statistic basically consists of counting all the times the pairs of values (across groups) are in the anticipated order (the order specified in $H_1$), minus the times that pairs are "in the opposite order", though there are other, equivalent calculations (any calculation that yields a statistic with the same partial order will be equivalent).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.