EXAMPLE 9 Calculating the Wilcoxon signed ranks

The California Community Colleges Chancellor's Office publishes enrollment data for each of its community colleges. Table 7 contains the number of students enrolled in the Spring 2013 and the Spring 2014 semesters at a random sample of six community colleges in California. We are interested in testing whether the median number of enrolled students has declined from 2013 to 2014. That is, we are interested in testing whether the population median of the differences (2014 – 2013) is less than zero.

  1. Calculate the signed rank for each community college.
  2. Find the sums of the positive signed ranks and the negative signed ranks.

Solution

Calculate the signed ranks as follows:

    1. For each data value, find the difference between the data values for each matched pair. That is, for each community college, we find d = the number of enrolled students in 2014 minus the number of enrolled students in 2013. Omit observations where . These differences are shown in Column 4 of Table 7.
    2. Find the absolute values of the differences. The absolute values of the differences are shown in Column 5 of Table 7.
    3. Rank the absolute values of the differences from smallest to largest. If two or more data values are tied with the same rank, assign to each the mean value of their ranks had they not been tied. (There are no ties in this data set. See Example 11 to see how ties are handled.) The ranks of the absolute differences are shown in Column 6 of Table 7.
    4. Attach to each rank the sign of its corresponding value of . This is its signed rank. For example, the rank of for Los Angeles Community College is 3, but the sign of for Los Angeles is negative (–). We attach this negative sign to the rank to give us Los Angeles's signed rank of −3. Replace each original data value with its corresponding signed rank. The signed ranks are shown in the last column of Table 7.
      Table 14.26: Table 7 Students enrolled at California community colleges
      Community
      college
      Enrollment
      Spring 2013
      Enrollment
      Spring 2014
      Difference
      (2014 – 2013)
      Rank of

      Signed
      rank
      Los Angeles CC 148,754 148,362 –392 392 3 –3
      Santa Monica CC 31,719 31,437 –282 282 2 –2
      El Camino CC 22,657 22,791 134 134 1 1
      North Orange CC 51,780 53,993 2,213 2,213 5 5
      Foothill CC 34,415 33,574 –841 841 4 –4
      Los Rios CC 75,230 71,911 –3,319 3,319 6 –6
  1. The sum of the positive sign ranks is

    The sum of the negative signed ranks is