wilcoxon signed-ranks test for the median difference [PDF]

is zero can be two-tail or one-tail. CD10-2 CD MATERIAL. TWO-TAIL TEST. ONE-TAIL TEST. ONE-TAILED TEST. H0: MD = 0. H0:

5 downloads 17 Views 527KB Size

Recommend Stories


Wilcoxon Mann Whitney Test
Do not seek to follow in the footsteps of the wise. Seek what they sought. Matsuo Basho

Chapter 13 The Wilcoxon signed rank test
When you do things from your soul, you feel a river moving in you, a joy. Rumi

Five-Point Likert Items: t Test versus Mann-Whitney-Wilcoxon
You have survived, EVERY SINGLE bad day so far. Anonymous

RediPave Modular Median Modular Median
There are only two mistakes one can make along the road to truth; not going all the way, and not starting.

[PDF] The Psychopath Test
Raise your words, not voice. It is rain that grows flowers, not thunder. Rumi

The Median Isn't the Message
Happiness doesn't result from what we get, but from what we give. Ben Carson

The arc-transversal median algorithm
Be like the sun for grace and mercy. Be like the night to cover others' faults. Be like running water

Group-wise Median vs Element-wise Median
Every block of stone has a statue inside it and it is the task of the sculptor to discover it. Mich

On stochastic orderings of the Wilcoxon Rank Sum test statistic–with applications to reproducibility
Ask yourself: What is one thing I could start doing today to improve the quality of my life? Next

Test Techniques For The Test Analyst
We must be willing to let go of the life we have planned, so as to have the life that is waiting for

Idea Transcript


10-5: Wilcoxon Signed-Ranks Test for the Median Difference

CD10-1

10-5: WILCOXON SIGNED-RANKS TEST FOR THE MEDIAN DIFFERENCE For situations involving either matched items or repeated measurements of the same item, the nonparametric Wilcoxon signed-ranks test for the median difference can be used when the t test for the mean difference described in section 10.3 is not appropriate. The Wilcoxon signed-ranks test can be chosen instead of the t test when the assumptions of the t test have not been met. When the assumptions of the t test are violated, the Wilcoxon signed-ranks procedure, which makes fewer and less stringent assumptions, is likely to be the more powerful in detecting the existence of significant differences. Moreover, even under conditions appropriate to the t test, the Wilcoxon signed-ranks test has proved to be almost as powerful. To perform the Wilcoxon signed-ranks test for the median difference, you first obtain the test statistic W. As listed in Exhibit 10.1, this is accomplished in six steps.



EXHIBIT

10.1



Steps in Obtaining the Wilcoxon Signed-Ranks Test Statistic W 1. For each item in a sample of n items obtain a difference score Di between two measurements. 2. Neglect the “+” and “–” signs and obtain a set of n absolute differences Di. 3. Omit from further analysis any absolute difference score of zero, thereby yielding a set of n nonzero absolute difference scores, where n ≤ n. Thus, n becomes the actual sample size—after we have removed observations with absolute difference scores of zero. 4. Then assign ranks Ri from 1 to n to each of the Di such that the smallest absolute difference score gets rank 1 and the largest gets rank n. Owing to a lack of precision in the measuring process, if two or more Di are equal, they are each assigned the average rank of the ranks they would have been assigned individually had ties in the data not occurred. 5. Now reassign the symbol “+” or “–” to each of the n ranks Ri, depending on whether Di was originally positive or negative. 6. The Wilcoxon test statistic W is obtained as the sum of the positive ranks [see Equation (10.11)].

WILCOXON SIGNED-RANKS TEST STATISTIC W The Wilcoxon test statistic W is obtained as the sum of the positive ranks. n

W=

R(+) i i=1

(10.11)

Because the sum of the first n integers (1, 2, . . . , n) is given by n(n – 1)/2, the Wilcoxon test statistic W ranges from a minimum of 0 (where all the observed difference scores are negative) to a maximum of n(n – 1)/2 (where all the observed difference scores are positive). If the null hypothesis is true, the test statistic W is expected to take on a value close to its mean W = n(n – 1)/4. If the null hypothesis is false, the observed value of the test statistic is expected to be close to one of the extremes.

CD10-2

CD MATERIAL

The test of the null hypothesis that the population median difference MD is zero can be two-tail or one-tail. TWO-TAIL TEST

H0: MD = 0 H1: MD ≠ 0

–Z

0

+Z

WL

µW

WU

Panel A H1: MD ≠ 0

ONE-TAIL TEST

ONE-TAILED TEST

H0: MD ≥ 0 H1: MD < 0

H0: MD ≤ 0 H1: MD > 0

Table E.9 is used for obtaining the critical values of the test statistic W for both oneand two-tail tests at various levels of significance for samples of n ≤ 20. For a two-tail test and for a particular level of significance, if the observed value of W equals or is greater than the upper critical value or is equal to or less than the lower critical value, the null hypothesis is rejected (panel A of Figure 10.30). For a one-tail test in the negative direction, the decision rule is to reject the null hypothesis if the observed value of W is less than or equal to the lower critical value (panel B of Figure 10.30). For a one-tail test in the positive direction, the decision rule is to reject the null hypothesis if the observed value of W equals or is greater than the upper critical value (panel C of Figure 10.30). For samples of n > 20, the test statistic W is approximately normally distributed with mean W and standard deviation W . Note that W , the mean of the test statistic W, is computed from W =

–Z

0

WL

µW

n(n + 1) 4

and W , the standard deviation of the test statistic W, is obtained from W =

Panel B H1: MD < 0



n(n + 1)(2n + 1) 24

Therefore, the standardized Z-test statistic is defined as in Equation (10.12). LARGE-SAMPLE WILCOXON SIGNED-RANKS TEST Z=

0

+Z

µW

WU

Panel C H1: MD > 0 Region of Nonrejection Region of Rejection

FIGURE 10.30 Regions of rejection and nonrejection using the Wilcoxon signed-ranks test

W – W W

(10.12)

This large-sample approximation formula is used for testing the null hypothesis when sample sizes are outside the range of Table E.9. Based on , the level of significance selected, the null hypothesis is rejected if the computed Z-value falls in the appropriate region of rejection, depending on whether a two-tail or a one-tail test is used—as shown in Figure 10.30. To demonstrate how to use the Wilcoxon signed-ranks test, return to the example concerning the financial applications packages discussed in section 10.3. If you do not wish to make the assumption that the differences were taken from populations that are normally distributed, the Wilcoxon signed-ranks test can be used for evaluating whether the current market leader uses more processing time than the new package. The null and alternative hypotheses are: H0: MD ≤ 0 H1: MD > 0 and the test is a one-tail test.

10-5: Wilcoxon Signed-Ranks Test for the Median Difference

CD10-3

To compute the test statistic W and perform the paired-sample test, the first step of the six-step procedure is to obtain a set of difference scores Di between each of the n paired observations: Di = X1i – X2i where i = 1, 2, . . . , n. In this example, you obtain a set of n difference scores from Di = Xcurrent – Xnew. If the new software package is effective, the computer processing time is expected to drop, so that the difference scores will tend to be positive values (and H0 will be rejected). On the other hand, if the new software package is not effective, you can expect some Di values to be positive, others to be negative, and some to show no change (that is, Di = 0). If this is the case, the difference scores will average near zero (that is, D ≅ 0) and H0 will not be rejected. The remaining steps of the six-step procedure are developed in Table 10.8. TA B L E 1 0 . 8 Setting up the Wilcoxon signed-ranks test for the median difference

PROCESSING TIME (IN SECONDS) Project Applications User

C.B. T.F. M.H. R.K. M.O. D.S. S.S. C.T. K.T. S.Z.

Current Leader X1i

New Package X2i

Di = X1i – X2i

Di

Ri

Sign of Di

9.98 9.88 9.84 9.99 9.94 9.84 9.86 10.12 9.90 9.91

9.88 9.86 9.75 9.80 9.87 9.84 9.87 9.86 9.83 9.86

+0.10 +0.02 +0.09 +0.19 +0.07 0.00 –0.01 +0.26 +0.07 +0.05

0.10 0.02 0.09 0.19 0.07 0.00 0.01 0.26 0.07 0.05

7.0 2.0 6.0 8.0 4.5 — 1.0 9.0 4.5 3.0

+ + + + + Discard – + + +

From this table note that project applications user D.S. is discarded from the study because his difference score is zero and that eight of the remaining n = 9 difference scores have a positive sign. The test statistic W is obtained as the sum of the positive ranks: n

W=

R(+) i = 7 + 2 + 6 + 8 + 4.5 + 9 + 4.5 + 3 = 44 i=1

Because n = 9, Table E.9 is used to determine the upper-tail critical value for this one-tail test with a level of significance , selected at 0.05. As shown in Table 10.9 (which is a portion of Table E.9), this upper-tail critical value is 37. TA B L E 1 0 . 9 Obtaining upper-tail critical value for the Wilcoxon signed-ranks test statistic W where n = 9 and  = 0.05

ONE-TAIL: TWO-TAIL:

 = 0.05  = 0.10

 = 0.025  = 0.05

n

5 6 7 8 9 10

 = 0.01  = 0.02

 = 0.005  = 0.010

— — 0,28 1,35 3,42 5,50

— — — 0,36 1,44 3,52

(Lower, Upper)

0,15 2,19 3,25 5,31 8,37 10,45

Source: Extracted from Table E.9.

— 0,21 2,26 3,33 5,40 8,47

CD10-4

CD MATERIAL

Because W = 44 > 37, the null hypothesis is rejected. There is evidence to support the contention that the median processing time using the new finance software package is significantly faster than that using the current market leader. From the Minitab output in Figure 10.31, observe that the p-value is 0.006, which is less than 0.05.

FIGURE 10.31 Wilcoxon signed-ranks test obtained from Minitab for the financial applications software example

Note that Table E.9 (lower and upper critical values of the Wilcoxon signed-ranks test statistic W) provides critical values only for situations involving small samples (where n is less than or equal to 20). If the sample size n is greater than 20, the large-sample Z approximation formula [Equation (10.12)] must be used to perform the test of hypothesis. To demonstrate the effectiveness of the large-sample Z approximation formula, even for sample sizes as small as 9, it will be used for the software applications developer’s data. Using the large-sample Z approximation formula given by Equation (10.12): Z=

W – W W

where W =

n(n + 1) 9(10) = 22.5 = 4 4

W =



n(n + 1)(2n + 1) = 24



9(10)(19) = 8.44 24

and Z=

44 – 22.5 = +2.55 8.44

The decision rule is Reject H0 if Z > +1.645; otherwise do not reject H0. Because Z = +2.55 > +1.645, the decision is to reject H0. The null hypothesis is rejected because the test statistic Z has fallen into the region of rejection. The p-value, or probability of obtaining a test statistic W even greater than what was observed here, which translates to a test statistic Z with a distance even farther from the center of the standard normal distribution than 2.55 standard deviations, is 0.0054 if the null hypothesis of a median difference of zero were true. Because the p-value is less than  = 0.05, you reject the null hypothesis. Thus, without having to make the assumption of normality in the original population of difference scores, the software applications developer can conclude that there is evidence of a significant median difference in the time to run the programs and that the new financial applications program is superior to the current market leader.

10-5: Wilcoxon Signed-Ranks Test for the Median Difference

CD10-5

The Wilcoxon signed-ranks test for the median difference makes fewer and less stringent assumptions than does the t test for the mean difference. The assumptions for the Wilcoxon signed-ranks test are listed in Exhibit 10.2.



EXHIBIT

10.2



Wilcoxon Signed-Ranks Test for the Median Difference The assumptions necessary for performing the test are that: 1. The observed data either constitute a random sample of n independent items or individuals, each with two measurements (X11, X21),(X12, X22), . . . , (X1n, X2n), one taken before and the other taken after the presentation of some treatment or the observed data constitute a random sample of n independent pairs of items or individuals so that (X1i, X2i) represents the observed values for each member of the matched pair (i = 1, 2, . . . , n). 2. The underlying variable of interest is continuous. 3. The observed data are measured at a higher level than the ordinal scale—i.e., at the interval or ratio level. 4. The distribution of the population of difference scores between repeated measurements or between matched items or individuals is approximately symmetric.

PROBLEMS FOR SECTION 10.5 Learning the Basics 10.77 Using Table E.9, determine the lower- and upper-tail critical values for the Wilcoxon signed-ranks test statistic W in each of the following two-tail tests: a.  = 0.10, n = 11 b.  = 0.05, n = 11 c.  = 0.02, n = 11 d.  = 0.01, n = 11 e. Given your results in parts (a)–(d), what do you conclude about the width of the region of nonrejection as the selected level of significance  gets smaller? 10.78 Using Table E.9, determine the upper-tail critical value for the Wilcoxon signed-ranks test statistic W in each of the following one-tail tests: a.  = 0.05, n = 11 b.  = 0.025, n = 11 c.  = 0.01, n = 11 d.  = 0.005, n = 11 e. Given your results in parts (a)–(d), what do you conclude about the width of the region of nonrejection as the selected level of significance  gets smaller?

10.79 Using Table E.9, determine the lower-tail critical value for the Wilcoxon signed-ranks test statistic W in each of the following one-tail tests: a.  = 0.05, n = 11 b.  = 0.025, n = 11 c.  = 0.01, n = 11 d.  = 0.005, n = 11 e. Given your results in parts (a)–(d), what do you conclude about the width of the region of nonrejection as the selected level of significance  gets smaller? 10.80 Suppose that the following information is available on the n = 12 difference scores from two related samples: Difference scores (Di): +3.2, +1.7, +4.5, 0.0, +11.1, –0.8, +2.3, –2.0, 0.0, +14.8, +5.6, +1.7 What is the value of the test statistic W if you are testing the null hypothesis H0: MD = 0? 10.81 In problem 10.80 what are the lower- and upper-tail critical values for the test statistic W from Table E.9 if the level of significance  is chosen to be 0.05 and the alternative hypothesis is H1: MD ≠ 0?

CD10-6

CD MATERIAL

10.82 In Problems 10.80 and 10.81 what is your statistical decision? 10.83 Suppose that the following information is available on the n = 12 signed ranks (Ri) obtained from the difference scores (Di) from two related samples: Signed ranks (Ri): +5, +6.5, +4, +11, –8, +2.5, –2.5, +1, +12, +6.5, +10, +9 What is the value of the test statistic W if you are testing the null hypothesis H0: MD ≤ 0? 10.84 From problem 10.83, at a level of significance of 0.05, determine the upper-tail critical value for the Wilcoxon signed-ranks test statistic W if you want to perform a test of the hypothesis H0: MD ≤ 0 against the one-tail alternative H1: MD> 0. 10.85 From Problems 10.83 and 10.84 what is your statistical decision?

Applying the Concepts 10.86 On-line grocery stores provide customers with the convenience of shopping at home, but this convenience often comes with a lofty price tag due to the high costs on-line grocers incur related to handling and delivery. In 1998 the largest on-line grocer was Peapod, Inc., with over $69 million in revenue. A new company, Webvan Group, Inc., began operations in 1999 (George Anders, “Co-Founder of Borders to Launch Online Megagrocer” Wall Street Journal, April 22, 1999, B1). A nine-item shopping list from the two on-line grocers in Burlington, California, for April 21, 1999, is given in the following table. ONLINE ITEM

Milk, 1 gallon of 2% Tide Ultra liquid detergent Fuji apples, 3 lbs. Chips Ahoy! cookies, 18 oz. T-bone steak, 1 lb. Tropicana Pure Premium orange juice, 64 oz. Huggies, size 3 overnight diapers Häagen Dazs ice cream,1 pint Colgate, regular toothpaste, 6.4 oz

WEBVAN

PEAPOD

$2.94 7.58 2.41 3.16 5.77 3.67

$3.33 8.79 2.97 3.39 7.99 3.99

7.76

7.99

2.94 2.08

3.19 2.19

a. At the 0.05 level of significance, is there evidence of a difference in the median price for items purchased from Webvan and Peapod? b. Compare the results of (a) with those of problem 10.31. 10.87 HomeGrocer.com is an on-line grocery store in the Seattle area with more than 10,000 customers. The following table reports May 1999 prices for a shopping list of 8 items from HomeGrocer.com and local Seattle supermarkets (Rachel Beck, “A trip to the virtual grocery,” Cincinnati Enquirer, May 30, 1999, E6). ONLINE2

PRODUCTS

HOMEGROCER

SUPERMARKETS

6.99 3.29 2.59

6.99 3.49 2.69

10.79 3.99 3.49 3.59

10.99 3.59 3.49 3.49

4.29

3.99

Tide High Efficiency detergent, 64 oz Oreo cookies, 20 oz. Formula 409 cleaner, 22 oz. Pampers Newborn diapers, 40 count Coke Classic, dozen 12 oz. cans Colgate Total toothpaste, 7.8 oz. Tropicana orange juice, 64 oz. Cheerios Whole Grain cereal, 20 oz.

a. At the 0.05 level of significance, is there evidence of a difference in the median price for products purchased from HomeGrocer.com and Seattle Supermarkets? b. Compare the results of (a) with those of problem 10.32. 10.88 In order to measure the effect of a storewide sales campaign on nonsale items, the research director of a national supermarket chain took a random sample of 13 pairs of stores that were matched according to average weekly sales volume. One store of each pair (the experimental group) was exposed to the sales campaign, and the other member of the pair (the control group) was not. The following data indicate the results over a weekly period: SALESCMP

STORE

1 2 3 4 5 6 7 8 9 10 11 12 13

WITH SALES CAMPAIGN

WITHOUT SALES CAMPAIGN

67.2 59.4 80.1 47.6 97.8 38.4 57.3 75.2 94.7 64.3 31.7 49.3 54.0

65.3 54.7 81.3 39.8 92.5 37.9 52.4 69.9 89.0 58.4 33.0 41.7 53.6

a. At the 0.05 level of significance, can the research director conclude that there is evidence the sales campaign has increased the median sales of nonsale items? b. Compare the results of (a) with those of problem 10.33. 10.89 A professor in the school of business wants to investigate the prices of new textbooks in the campus bookstore and the competing off-campus store, which is a branch of a national chain. The professor randomly chooses the required texts for 12 business school courses and compares the prices in the two stores. The results are as follows: BKPRICE

10-5: Wilcoxon Signed-Ranks Test for the Median Difference BOOK

1 2 3 4 5 6 7 8 9 10 11 12

CAMPUS STORE

OFF-CAMPUS STORE

$55.00 47.50 50.50 38.95 58.70 49.90 39.95 41.50 42.25 44.95 45.95 56.95

$50.95 45.75 50.95 38.50 56.25 45.95 40.25 39.95 43.00 42.25 44.00 55.60

a. At the 0.01 level of significance, is there evidence of a difference in the median price of business textbooks between the two stores? b. Compare the results of (a) with those of problem 10.34. 10.90 Over the past year the vice president for human resources at a large medical center ran a series of threemonth programs and lectures aimed at increasing

CD10-7

worker motivation and performance. As a check on the effectiveness of the programs, she selected a random sample of 35 employees from the personnel files and recorded their most recent annual performance ratings along with the ratings attained prior to attending the programs. The data are stored in the PERFORM file. a. At the 0.05 level of significance, is there evidence of a difference in the median performance ratings between the two programs? b. Compare the results of (a) with those of problem 10.35. 10.91 The data in the file CONCRETE1 represent the compressive strength in thousands of pounds per square inch (psi) of 40 samples of concrete taken two and seven days after pouring. Source: O. Carrillo-Gamboa and R. F. Gunst, “ Measurementerror-model collinearities,” Technometrics, 34, 1992, 454–464.

a. At the 0.01 level of significance, is there evidence that the median strength is less at two days than at seven days? b. Compare the results of (a) with those of problem 10.36.

CD10-8

CD MATERIAL

USING MINITAB FOR THE WILCOXON SIGNED-RANKS TEST To illustrate the use of Minitab for the Wilcoxon signed-ranks test, open the COMPTIME.MTW worksheet. To compute the differences, select CalcCalculator. In the Store result in variable: edit box, enter C3. In the Expression: edit box, enter C1–C2. Click the OK button, Enter the column label Difference for C3.

FIGURE 10.32 Minitab 1-Sample Wilcoxon dialog box

Select StatNonparametrics1-Sample Wilcoxon test. In the 1-Sample Wilcoxon dialog box (see Figure 10.32), in the Variables: edit box, enter C3 or Difference. Select Test median:, and enter 0 in the edit box. In the Alternative: dropdown list box, select greater than to perform the one-tail test. Click the OK button.

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.