The Sign Test

 SIGNTEST.83p SIGNTEST.86p signtest.89p

The sign test can be used to test the hypothesis that there is "no difference" between two continuous distributions X and Y. Formally, we let p = P(X > Y), and then test the null hypothesis Ho: p = 0.50. This hypothesis implies that given a random pair of measurements (xi, yi), then both xi and yi are equally likely to be larger than the other.

To perform the test, we first collect independent pairs of sample data from the populations {(x1, y1), (x2, y2), . . ., (xn, yn)}. We omit pairs for which there is no difference so that we have a possibly reduced sample of m pairs. We then let w be the number of pairs for which yi - xi > 0. Assuming that Ho is true, then W follows a binomial distribution B ~ b(m, 0.5).

The left-tail value is computed by P(B <= w), which is the p-value for the alternative Ha: p < 0.50. This alternative means that the X measurements tend to be higher.

The right-tail value is computed by P(B >= w), which is the p-value for the alternative Ha: p > 0.50. This alternative means that the Y measurements tend to be higher.

For a two-sided alternative Ha: p does not equal 0.50, the p-value is twice the smallest tail-value.

Using the SIGNTEST Program

Before executing the SIGNTEST program, enter the X measurements into list L1 on the TI-83, (xStat on the TI-86, c1 in a list called dist on the TI-89) and enter the Y measurements into list L2 (yStat on the TI-86, c2 in a list called dist on the TI-89).

Next, execute the program by entering 1, 2, or 3 for the desired alternative X > Y, X < Y, or X does not equal Y. After running, the program displays the number of positive changes and the total number of changes (which becomes the reduced sample size), as well as the P-value for the desired alternative.

Example. A study is being conducted on whether entering college students gain weight during the freshman year. Below are the "Before" and "After" weights for a random sample of 30 students. Test to see whether there is a significant "gain" in weights after the freshman year in college.

 Before After Before After 133 135 121 125 152 160 144 140 169 180 106 108 156 154 182 175 178 185 122 120 220 226 110 114 145 150 130 134 138 140 165 165 218 225 158 160 140 140 106 105 148 143 160 166 98 102 122 125 142 138 146 155 170 182 112 115 108 112 145 144

Solution. We shall test the null hypothesis that there is "no difference" in the Before and After measurements, with the alternative being that the After measurements tend to be higher. (The alternative states that there should be an unusually large number of positive changes in the values "After - Before").

After entering the data in the appropriate lists and executing the SIGNTEST program by entering 2 for the alternative X < Y, we see that there are 20 persons who increased in weight (pos. changes) out of 28 persons who actually changed weight (changes). If there were "no difference" (i.e., if p = P(After > Before) = 0.5) ), then there would be only a 0.01785 probability (from the right-tail P-value) of there being as many as 20 people out of 28 who gained weight. This low p-value gives evidence to reject the claim that there is no difference in favor of the alternative that there is tendency to gain weight.

Exercises

1. A professor is trying to determine if there is a significant difference in the Verbal and Math ACT scores of students enrolled in General Math class. The respective scores for students in his class are given below. Using this class as a sample, test to see whether General Math students significantly tend to score higher on either Verbal or Math ACT.

 (24, 18) (22, 19) (18, 19) (20, 24) (14, 16) (18, 15) (24, 22) (15, 16) (23, 17) (22, 23) (26, 30) (28, 26) (16, 18) (22, 20) (19, 18) (20, 20) (24, 22) (18, 16) (24, 21) (18, 16) (19, 19) (20, 26) (15, 16) (19, 18) (21, 25) (28, 26) (25, 23) (24, 24)

2. In a blind taste test, 45 coffee drinkers sampled fresh-brewed coffee versus a gourmet instant coffee. When stating their preferences, 14 chose the instant, 26 chose the fresh-brewed, and 5 gave no preference. Test the claim that coffee drinkers tend to prefer fresh-brewed coffee.

Solutions

1. We shall test the null hypothesis that there is "no difference" in the Verbal and Math score distributions, with the two-sided alternative that there is a significant difference. After entering the data in the appropriate lists (L1, xStat, or c1 for the verbal score X, and L2, yStat, or c2 for the math score Y), we execute the SIGNTEST program by entering 3 for the alternative "not equal."

We see that there are 25 students who have a difference in score. Of these, 10 students scored higher on the Math ACT which gives a P-value of 0.424356.

The two-sided P-value means that if the P(Math > Verbal) = 0.50, then there would still be a 42.43% chance of either 10 or fewer students having a higher Math score or 10 or fewer students having a higher Verbal score. This p-value would usually not be considered low enough to reject the claim that there is no significant difference between Verbal and Math ACT scores among General Math students.

Note: If we used the one-sided alternative X > Y, then the P-value would be 0.212178. In this case, we would say: If there were no difference in distribution, then there would still be a 21.2178% chance just 10 or fewer students having a higher Math score.

2. If we choose to use the sign test in this situation, then we can let p be the probability that one chooses the fresh-brewed coffee. The null hypothesis is that p = 0.50 (no difference in preference), with a one-sided alternative p > 0.50 (more tend to choose fresh-brewed). If the null hypothesis were true, then the responses create a b(40, 0.50) distribution B. The p-value is P(B >= 26).

In this case we can use the BINOMIAL program to compute P(B >= 26). In this program, enter 40 for NUMBER OF TRIALS, enter .5 for Probability, then enter 26 for LOWER BOUND and 40 for UPPER BOUND. Enter 0 for COMPLETE DIST.

We receive a computed probability of about 0.0403 which is the p-value for the alternative that coffee drinkers tend to choose freshly-brewed coffee in a blind taste test. If people chose the instant coffee as often as fresh-brewed, then there would only be a 0.0403 probability of 26 or more out of 40 choosing the fresh-brewed. This rather low p-value gives evidence to reject the initial hypothesis in favor of the alternative.