11428

# A Signed Rank Test of Hypotheses about a Median

The statistic on which this test is based is computed by assigning to each value in the dataset its ranking in the list of the absolute differences multiplied by the sign of (so values below get assigned a negative rank). These signed ranks are then summed to produce . If the null hypothesis is true, that is, if is the median of the distribution from which the sample comes, then the signs of the differences can be regarded as Bernoulli trials. Using this to assign probabilities to all the possible signed rank sums gives the distribution which is shown in blue in the upper image above. The mean of this distribution is zero and its variance is . The purple curve is the density of a normal distribution with this mean and variance, which gives a good approximation to this distribution for all but very small sample sizes.
You can control the mean of the underlying population and the size of this sample with the top two sliders, and you can draw new samples of the same size from the same underlying population with the bottom slider.
The lower image shows the scatterplot of the points with a horizontal line at the point . The degree to which the points in the plot are above or below this line is evidence for the median of the underlying distribution being above or below .

### DETAILS

The fact that the signs of the values can be regarded as independent Bernoulli random variables can serve as the basis of a sign test of the hypothesis . An objection to such a test is that it fails to account for the magnitudes of the differences . Signed rank tests like the one above address this objection. Some tests—generally called "Wilcoxon Signed Rank Tests"—use the statistic obtained by summing only those absolute values for which the difference is positive or negative. These two statistics together with the statistic used in this Demonstration are referred to in various places as "Wilcoxon statistics". These tests can be used to assess the statistical evidence for one variable being larger than another by using the data and taking .

### PERMANENT CITATION

 Share: Embed Interactive Demonstration New! Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details » Download Demonstration as CDF » Download Author Code »(preview ») Files require Wolfram CDF Player or Mathematica.

#### Related Topics

 RELATED RESOURCES
 The #1 tool for creating Demonstrations and anything technical. Explore anything with the first computational knowledge engine. The web's most extensive mathematics resource. An app for every course—right in the palm of your hand. Read our views on math,science, and technology. The format that makes Demonstrations (and any information) easy to share and interact with. Programs & resources for educators, schools & students. Join the initiative for modernizing math education. Walk through homework problems one step at a time, with hints to help along the way. Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet. Knowledge-based programming for everyone.