It is possible to show examples where medians are numerically equal while the test rejects the null hypothesis with a small p-value.
The Wilcoxon signed-rank test is applied to matched or dependent samples.
The corresponding Mann–Whitney U statistic is defined as the smaller of: with The U statistic is related to the area under the receiver operating characteristic curve (AUC):[8] Note that this is the same definition as the common language effect size, i.e. the probability that a classifier will rank a randomly chosen instance from the first group higher than a randomly chosen instance from the second group.
The test involves the calculation of a statistic, usually called U, whose distribution under the null hypothesis is known: Alternatively, the null distribution can be approximated using permutation tests and Monte Carlo simulations.
Some books tabulate statistics equivalent to U, such as the sum of ranks in one of the samples, rather than U itself.
Method one: For comparing two small sets of observations, a direct method is quick, and gives insight into the meaning of the U statistic, which corresponds to the number of wins out of all pairwise contests (see the tortoise and hare example under Examples below).
Suppose that Aesop is dissatisfied with his classic experiment in which one tortoise was found to beat one hare in a race, and decides to carry out a significance test to discover whether the results could be extended to tortoises and hares in general.
He collects a sample of 6 tortoises and 6 hares, and makes them all run his race at once.
In reporting the results of a Mann–Whitney U test, it is important to state:[12] In practice some of this information may already have been supplied and common sense should be used in deciding whether to repeat it.
A typical report might run, A statement that does full justice to the statistical status of the test might run, However it would be rare to find such an extensive report in a document whose major topic was not statistical inference.
mU and σU are given by The formula for the standard deviation is more complicated in the presence of tied ranks.
The computer statistical packages will use the correctly adjusted formula as a matter of routine.
It is a widely recommended practice for scientists to report an effect size for an inferential test.
A statistic called ρ that is linearly related to U and widely used in studies of categorization (discrimination learning involving concepts), and elsewhere,[21] is calculated by dividing U by its maximum value for the given sample sizes, which is simply n1×n2.
The usefulness of the ρ statistic can be seen in the case of the odd example used above, where two distributions that were significantly different on a Mann–Whitney U test nonetheless had nearly identical medians: the ρ value in this case is approximately 0.723 in favour of the hares, correctly reflecting the fact that even though the median tortoise beat the median hare, the hares collectively did better than the tortoises collectively.
There is a simple difference formula to compute the rank-biserial correlation from the common language effect size: the correlation is the difference between the proportion of pairs favorable to the hypothesis (f) minus its complement (i.e.: the proportion that is unfavorable (u)).
This simple difference formula is just the difference of the common language effect size of each group, and is as follows:[18] For example, consider the example where hares run faster than tortoises in 90 of 100 pairs.
The Mann–Whitney U test will give very similar results to performing an ordinary parametric two-sample t-test on the rankings of the data.
[32] As a result, it has been suggested to use one of the alternatives (specifically the Brunner–Munzel test) if it cannot be assumed that the distributions are equal under the null hypothesis.
[33] In that situation, the unequal variances version of the t-test may give more reliable results.
Similarly, some authors (e.g., Conover[full citation needed]) suggest transforming the data to ranks (if they are not already ranks) and then performing the t-test on the transformed data, the version of the t-test used depending on whether or not the population variances are suspected to be different.
The Brown–Forsythe test has been suggested as an appropriate non-parametric equivalent to the F-test for equal variances.
[34] The Mann–Whitney U test is a special case of the proportional odds model, allowing for covariate-adjustment.
For example, it is equivalent to Kendall's tau correlation coefficient if one of the variables is binary (that is, it can only take two values).
[citation needed] In many software packages, the Mann–Whitney U test (of the hypothesis of equal distributions against appropriate alternatives) has been poorly documented.
Some packages incorrectly treat ties or fail to document asymptotic techniques (e.g., correction for continuity).
A 2000 review discussed some of the following packages:[36] The statistic appeared in a 1914 article[40] by the German Gustav Deuchler (with a missing term in the variance).
In a single paper in 1945, Frank Wilcoxon proposed [41] both the one-sample signed rank and the two-sample rank sum test, in a test of significance with a point null-hypothesis against its complementary alternative (that is, equal versus not equal).
A thorough analysis of the statistic, which included a recurrence allowing the computation of tail probabilities for arbitrary sample sizes and tables for sample sizes of eight or less appeared in the article by Henry Mann and his student Donald Ransom Whitney in 1947.
[1] This article discussed alternative hypotheses, including a stochastic ordering (where the cumulative distribution functions satisfied the pointwise inequality FX(t) < FY(t)).