13.2 Sign Test
The sign test can be used for both one sample or for two dependent groups. The sign test uses a Binomial Distribution and looks at the probability of a success as 50%. The median is the 50th percentile, so many times we will state our null hypothesis as the median is equal to a certain value. However, sometimes we will state the hypothesis in terms of a proportion.
| Two-Tailed Test | Right-Tailed Test | Left-Tailed Test |
|---|---|---|
| Median Median | Median Median | Median Median |
is a placeholder for the number for the hypothesized median.
The Sign Test Procedure
For the single-sample test, compare each value with the conjectured median. If a data value is larger than the hypothesized median, replace the value with a positive sign. If a data value is smaller than the hypothesized median, replace the value with a negative sign. If the data value equals the hypothesized median, replace the value with a 0.
The sample size is the number of plus and minus signs added together (do not include data values that tie with the median). For the paired-sample sign test, subtract the group 2 values from the group 1 values and indicate the difference with a positive or negative sign, or 0 (if they tie) and = total number of positive and negative signs (do not include differences of zero).
Use the binomial distribution to find the p-value using technology.
- For a two-tailed test, the test statistic, , is the smaller of the plus or minus signs. If is the test statistic, the p-value for a two-tailed test is the .
- For a right-tailed test, the test statistic, , is the number of plus signs. For a left-tailed test, the test statistic, , is the number of minus signs. The p-value for a one-tailed test is the .
The sign test is an alternative to the one sample t-test when you have a small sample size, but the population is not normally distributed. The sign test is also an alternative to the paired sample t-test when you have a small sample size and the difference in the pairs is not normally distributed. The sign test does not detect the magnitude of the difference between the hypothesized value and is not as efficient as the t-test.
Example 2
A professor believes that a new online learning curriculum is increasing the median final exam score from the previous year, which was 75. A random sample of final exam scores were collected for students that went through the new curriculum. Test to see if the new curriculum is effective using .
Try it in XYZ Crunch
Read a right-tailed critical value off the binomial
Binomial(n = 11, p = 0.5) opens with the cumulative computed. The panel reports P(X <= k), so the upper tail is 1 - P(X <= 8) = 0.03272 from the first link. Subtract the two links to recover the book's next term, P(X = 8) = 0.96729 - 0.88672 = 0.08057; adding it would push the tail past alpha = 0.05, which is why the critical value stops at 9.
78 100 75 64 87 80 72 91 89 70 82 76
Show solution
The hypotheses are:
Median
Median
Find the test statistic. Compare each value to the median. If the value is below the median then give it a negative sign, if the value is above the mean then give it a positive sign. If the value is tied with the median then give it a zero.
| 78 + | 100 + | 75 0 | 64 - | 87 + | 80 + | 72 - | 91 + | 89 + | 70 - | 82 + | 76 + |
Count the number of positive and negative signs. Positive signs = 8, Negative signs = 3. The sample size is then .
The test statistic for a right tailed test is the number of plus signs. Therefore, in this case, the test statistic is 8.
To find the critical value, use technology to find the probabilities for to for a binomial distribution with and . See Figure 13-3 for the results. Since , add up the areas starting at the bottom at until you get a sum of no more than 0.05.
If we add in the next value of , the sum would exceed 0.05, so we would stop at a critical value of . See Figure 13-4.


Since the test statistic is not in the rejection area, we would fail to reject .
At the 5% significance level, there is not enough evidence to support the claim that there is a statistically significant difference in final exam scores for the new online curriculum.
Example 3
The median annual salary for high school teachers in the United States was $60,320. A teacher believes that the median high school salary in Oregon is significantly less than the national median. A sample of 100 high school teacher’s salaries found that 58 were below $60,320, 40 were above $60,320 and 2 were $60,320. Use to test their claim.
Try it in XYZ Crunch
"A lot of work by hand" is one cumulative read
58 salaries below the national median and 40 above give n = 98 and x = 58. The first link opens Binomial(n = 98, p = 0.5) at k = 57, because a P(X >= 58) tail is 1 - P(X <= 57) = 0.0427, the book's p-value. The second link uses k = 58 instead - the argument the book's TI screenshot shows - and returns 0.0272, which is P(X >= 59). Same distribution, one index apart.
Show solution
The hypotheses are:
Median = $60,320
Median < $60,320 (claim)
The sample size .
We will use . The p-value is found by taking . This is a lot of work by hand, so use technology. For a TI-84 calculator use

The p-value = 0.0427, which is less than , so reject .
There is enough evidence to support the claim that the median high school salary in Oregon is significantly less than the national median of $60,320.
The sign test can also be used for dependent samples when the assumptions for a paired t-test are not met.
Example 4
A manufacturer believes that if routine maintenance (cleaning and oiling of machines) is increased to once a day rather than once a week, the number of defective parts produced by the machines will decrease. Nine machines are selected, and the number of defective parts produced over a 24-hour operating period is counted. Maintenance is then increased to once a day for a week, and the number of defective parts each machine produces is again counted over a 24-hour operating period. The data are shown here. At , can the manufacturer conclude that the additional maintenance reduces the number of defective parts manufactured by the machines?
Try it in XYZ Crunch
The paired sign test uses the very same binomial
Differencing Before - After gives 6 plus signs, 2 minus and one tie dropped, so n = 8 and x = 6. The link opens Binomial(n = 8, p = 0.5) at k = 5, since a right-tailed P(X >= 6) is 1 - P(X <= 5) = 0.1445. Slide k to 6 and the panel answers P(X >= 7) = 0.0352 instead - a useful reminder that the cumulative always stops one below the value you want in the tail.
Machine 1 2 3 4 5 6 7 8 9 Before 6 18 5 4 16 13 20 9 3 After 5 16 7 4 18 12 14 7 1
Show solution
The additional maintenance does not reduce the number of defective parts manufactured by the machines.
The additional maintenance reduces the number of defective parts manufactured by the machines.
Next, for each pair, take . If this difference is positive then put a sign next to it, if the difference is negative then put a sign next to it and if the difference is zero then put a 0 next to it.
| Machine | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|
| Before | 6 | 18 | 5 | 4 | 16 | 13 | 20 | 9 | 3 |
| After | 5 | 16 | 7 | 4 | 18 | 12 | 14 | 7 | 1 |
| Sign of Difference | 0 |
Count the number of positive and negative signs. Positive signs = 6, Negative signs = 2. The sample size is then .
Note that this is a right-tailed test, since we are looking at “reducing” defective parts so that . The test statistic is the number of plus signs, .
, which is the p-value.
For a TI calculator, use . The p-value = 0.1445, which is greater than ; therefore do not reject .
There is not enough evidence to support the claim that the additional maintenance reduces the number of defective parts manufactured by the machines.
Adapted from Mostly Harmless Statistics by Rachel Webb (Portland State University), hosted on LibreTexts (stats.libretexts.org) and licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.