This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# MannWhitneyTest

 MannWhitneyTesttests whether the medians of and are equal. MannWhitneyTesttests the median difference against . MannWhitneyTestreturns the value of .
• MannWhitneyTest performs a hypothesis test on and with null hypothesis that the true median difference against that .
• By default a probability value or -value is returned.
• A small -value suggests that it is unlikely that is true.
• The data in dspec can be univariate or multivariate .
• The argument can be a real number or a real vector with length equal to the dimension of the data.
• MannWhitneyTest assumes that the data is elliptically symmetric about a common spatial median in the multivariate case.
• Properties related to the reporting of test results include:
 "DegreesOfFreedom" the degrees of freedom used in a test "PValue" list of -values "PValueTable" formatted table of -values "ShortTestConclusion" a short description of the conclusion of a test "TestConclusion" a description of the conclusion of a test "TestData" list of pairs of test statistics and -values "TestDataTable" formatted table of -values and test statistics "TestStatistic" list of test statistics "TestStatisticTable" formatted table of test statistics
• For univariate samples MannWhitneyTest performs the Mann-Whitney -test for median differences of independent samples. A correction for ties is applied for both asymptotic and permutation-based -values. By default, the test statistic is corrected for continuity and is assumed to follow a NormalDistribution.
• For multivariate samples, MannWhitneyTest performs an extension of the Mann-Whitney -test using spatial ranks. The test statistic is assumed to follow a ChiSquareDistribution[dim] where dim is the dimension of dspec.
• The following options can be used:
 AlternativeHypothesis "Unequal" the inequality for the alternative hypothesis MaxIterations Automatic max iterations for multivariate median tests Method Automatic the method to use for computing -values SignificanceLevel 0.05 cutoff for diagnostics and reporting
• For the MannWhitneyTest, a cutoff is chosen such that is rejected only if . The value of used for the and properties is controlled by the SignificanceLevel option. This value is also used in diagnostic tests of assumptions including tests for symmetry. By default is set to .
Test whether the medians of two independent populations differ:
The median difference :
At the level the medians are significantly different:
Compare the locations of multivariate populations:
The median difference vector :
At the level is not significantly different from :
Test whether the medians of two independent populations differ:
The median difference :
 Out[2]=
 Out[3]=
At the level the medians are significantly different:
 Out[4]=

Compare the locations of multivariate populations:
The median difference vector :
 Out[2]=
 Out[3]=
At the level is not significantly different from :
 Out[4]=
 Scope   (9)
Test versus :
The -values are generally small when the locations are not equal:
The -values are generally large when the locations are equal:
Test versus :
The order of the datasets affects the test results:
Test whether the median difference vector of two multivariate populations is the zero vector:
Alternatively, test against :
Create a HypothesisTestData object for repeated property extraction:
The properties available for extraction:
Extract some properties from a HypothesisTestData object:
The -value and test statistic:
Extract any number of properties simultaneously:
The -value and test statistic from a Mann-Whitney test:
Tabulate the test results:
Retrieve the entries from a test table for customized reporting:
Tabulate -values or test statistics:
The -value from the table:
The test statistic from the table:
 Options   (10)
A two-sided test is performed by default:
Test versus :
Perform a two-sided test or a one-sided alternative:
Test versus :
Test versus :
Test versus :
Perform tests with one-sided alternatives when is given:
Test versus :
Test versus :
Set the maximum number of iterations to use for multivariate tests:
By default, 250 iterations are allowed:
Setting the maximum number of iterations may result in lack of convergence:
The -values are not equivalent:
By default -values are computed using asymptotic test statistic distributions:
Permutation methods can be used:
Set the number of permutations to use:
By default random permutations are used:
Set the seed used for generating random permutations:
The significance level is used for and :
 Applications   (3)
Test whether the medians of some populations are equal:
The medians of the first two populations are similar:
The median of the third population is different from the first:
It has been observed that the duration of Old Faithful geyser eruptions is proportional to the time elapsed since the previous eruption:
Assuming one hour is a long wait for an eruption, test the statement that long waits lead to long eruption durations.
Two hundred Australian crabs were collected and five morphological measures were taken for each crab. The data is organized by type and gender:
Determine if there is a difference in the first four morphological measures for the two varieties:
Compare the morphological measures across the genders:
For univariate data the test statistic follows a NormalDistribution under :
A large sample approximation to the NormalDistribution:
For multivariate data the test statistic follows a ChiSquareDistribution[p] under :
The test statistic is computed by pooling and ranking the data:
In the absence of ties, Ordering can compute the ranks:
New in 8