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

# SignedRankTest

 SignedRankTest[data] tests whether the median of data is zero. SignedRankTesttests whether the median of is zero. SignedRankTesttests a location measure against . SignedRankTestreturns the value of .
• SignedRankTest performs a hypothesis test on data with null hypothesis that the true population median is some value , and alternative hypothesis that .
• Given and , SignedRankTest performs a test on the paired differences of the two datasets.
• 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 .
• If two samples are given, they must be of equal length.
• The argument can be a real number or a real vector with length equal to the dimension of the data.
• SignedRankTest assumes that the data is symmetric about the median in the univariate case and elliptically symmetric in the multivariate case. For this reason, SignedRankTest is also a test of means.
• 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 SignedRankTest performs the Wilcoxon signed rank test for medians of paired samples. A correction for ties is applied for permutation-based -values. By default, the test statistic is corrected for continuity and an asymptotic result is returned.
• For multivariate samples, SignedRankTest performs an affine invariant test for paired samples using standardized spatial signed ranks. The test statistic is assumed to follow a ChiSquareDistribution[dim] where dim is the dimension of the data.
• 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 VerifyTestAssumptions Automatic what assumptions to verify
• For the SignedRankTest, 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 a test for symmetry. By default is set to .
 "Symmetry" verify that all data is symmetric
Test whether the median of a population is zero:
Compare the median difference for paired data to a particular value:
Report the test results in a table:
Test whether the spatial median of a multivariate population is some value:
Compute the test statistic:
Create a HypothesisTestData object for repeated property extraction:
A list of available properties:
Extract a single property or a list of properties:
Test whether the median of a population is zero:
 Out[2]=
 Out[3]=

Compare the median difference for paired data to a particular value:
 Out[2]=
 Out[3]=
Report the test results in a table:
 Out[4]=

Test whether the spatial median of a multivariate population is some value:
 Out[2]=
Compute the test statistic:
 Out[3]=

Create a HypothesisTestData object for repeated property extraction:
 Out[2]=
A list of available properties:
 Out[3]=
Extract a single property or a list of properties:
 Out[4]=
 Out[5]=
 Scope   (13)
Test versus :
The -values are typically large when the median is close to :
The -values are typically small when the location is far from :
Using Automatic is equivalent to testing for a median of zero:
Test versus :
The -values are typically large when median is close to :
The -values are typically small when the location is far from :
Test whether the median vector of a multivariate population is the zero vector:
Alternatively, test against :
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:
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   (14)
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, 500 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:
Set the significance level for diagnostic tests:
By default, is used:
The significance level is also used for and :
Diagnostics can be controlled as a group using All or None:
Verify all assumptions:
Check no assumptions:
Diagnostics can be controlled independently:
Check for symmetry:
It is often useful to bypass diagnostic tests for simulation purposes:
The assumptions of the test hold by design, so a great deal of time can be saved:
The results are identical:
 Applications   (1)
Twelve sets of identical twins were given psychological tests to measure aggressiveness. It is hypothesized that the first-born twin will tend to be more aggressive than the second-born:
There is insufficient evidence to reject that birth order has no effect on aggressiveness:
The SignedRankTest is generally more powerful than the SignTest:
The univariate Wilcoxon signed rank test statistic:
In the absence of ties, Ordering can be used to compute ranks:
The asymptotic two-sided -value:
For univariate data the test statistic is asymptotically normal:
For multivariate data the test statistic follows a ChiSquareDistribution under :
The degree of freedom is equal to the dimension of the data:
For multivariate data the SignedRankTest effectively tests uniformity about a unit sphere:
A function for computing the spatial signed ranks of a matrix:
Deviations from yield clustering of spatial signed ranks and larger test statistics:
The test statistic is affine invariant for multivariate data:
SignedRankTest requires that the data be symmetric about a common median:
Use SignTest if the data is not symmetric:
New in 8