252meanx2 11/04/07 (Open this document in 'Outline' view!)D. COMPARISON OF TWO SAMPLES (CTD.)5. Rank Tests.a. The Wilcoxon-Mann-Whitney Test for Two Independent Samples.b. Wilcoxon Signed Rank Test for Paired Samples.6. Proportions.7. Variances.8. Summary252meanx2 11/04/07 (Open this document in 'Outline' view!)D. COMPARISON OF TWO SAMPLES (CTD.)5. Rank Tests. Especially in the case where samples are small and the underlying distributions are not normal, it is not appropriate to compare means. a. The Wilcoxon-Mann-Whitney Test for Two Independent Samples. If samples are independent, This test is appropriate to test whether the two samples come from the same distribution. If the distributions are similar, it is often called a test of equality of medians.Example: Let us assume that we have two very small samples from New York 62nand Pennsylvania41nand we wish to compare their medians. Let us call the smaller sample (Pennsylvania) ‘sample 1’ and the larger sample ‘sample 2’, so that .21nn If we use for the median, our hypotheses are211210::HH and 05..Assume that our data is as below: Pennsylvania New York 11000 17000 16000 30000 80000 50000 85000 70000 80000 90000Our first step is to rank the numbers from 1 to .106421 nnn note that the 7th and 8th numbers are tied, so that both are numbered 7.5. These can be ordered from the largest to the smallest or from the smallest to the largest. To decide which to do, look at the smaller sample. If the smallest number is in the smaller sample, order from smallest to largest, if the largest number is in the smallest sample, order from the largest to the smallest. Since 11000 is the smallest number, let that be 1. 1x Pennsylvania 1r 2x New York 2r11000 1 17000 316000 2 30000 480000 7.5 60000 585000 9 . 70000 6 19.5 80000 7.590000 10 . 35.5Now compute the sums of the ranks. 5.35,5.1921 SRSR. As a check, note that these two rank sums must add to the sum of the first n numbers, and that this is 552111021nn, and that555.355.1921 SRSR.1252meanx2 11/04/07 (Open this document in 'Outline' view!)The smaller of 1SRand 2SRis called Wand is compared with Table 5 or 6. {Wpval} {WCV} To use Table 5, first find the part for 62n, and then the column for 41n. Then try to locate5.19Win that column. In this case, since for 19W the p-value is .3048, and for 20W the p-value is .3810, we can say that .3810.3048. pvalueSince both are above the significance level, we cannot reject the null hypothesis. This can also be compared against the critical values for LT andUT in table 6b; these are 13 and 31. Since 5.19W it is between these values and we cannot reject the null hypothesis.For values of 1n and 2nthat are too large for the tables, Whas the normal distribution with mean 121121 nnnW and variance WWn2612. Though the example above is too small for this treatment, for continuity its data will be used here. If the significance level is 5% and the test is one-sided,we reject our null hypothesis if WWWzlies below 645.105. z. In this case then 22164412121121 nnnWand WWn2612 2222661so that.53.022225.19WWWz Since this is not below –1.645, we cannot reject 0H.b. Wilcoxon Signed Rank Test for Paired Samples. This is a test for equality of medians when the data is paired. It can also be used for the median of a single sample. The Sign Test for paired data is a simpler test to use in this situation, but it is less powerful.As in many tests for measures of central tendency with paired data, the original numbers are discarded, and the differences between the pairs are used. If there are n pairs, these are ranked according to absolute value from 1 to n, either top to bottom or bottom to top. After replacing tied absolute values with their average rank, each rank is marked with a + or – sign and two rank sums are taken, T andT. The smaller of these is compared with Table 7.Example: We wish to compare sales of a product before and after an advertisement appeared in a nationally televised football game. Sales in a sample of eight stores before the game are 1x and sales after are 2x. Define 12xxd as the improvement in sales. Though the appropriate test here would be one-sided, a two sided test is demonstrated here instead. 211210::HH 8n and 05.. The data are below: The column d is the absolute value of d, the column r ranks absolute values, and the column *ris the ranks corrected for ties and marked with the signs on the differences.2252meanx2 11/04/07 (Open this document in 'Outline' view!) 1x 2x12xxd d r *r7600 8600 +1000 1000 8 8+8700 8900 +200 200 2 2.5+9600 9400 -200 200 3 2.5-8400 8700 +300 300 4 4+7600 8100 +500 500 6 6+6900 7500 +600 600 7 7+7300 7700 +400 400 5 5+8200 8100 -100 100 1 1-If we add together the numbers in *r with a + sign we get .5.32T. If we do the same for numbers with a – sign, we get .5.3T To check this, note that these two numbers must sum to the sum of the first n numbers, and that this is 3629821nn, and that 365.35.32 TT.We check 3.5, the smaller of the two rank sums against the numbers in table 7. {wsignedr} For a two-sided 5% test, we use the 025. column. For 8n, the critical value is 4, and we reject the null hypothesis only if our test statistic is below this critical value. Since our test statistic is 3.5, we reject the null hypothesis.For values of n that are too large for the table, LT, the smaller of Tand T, has the normal distribution with mean 141 nnT and variance TTn12612. Though the example above is too small for this treatment, for continuity its data will be used here. If the significance level is 5% and the test is two-sided, we reject our null hypothesis if TTLTzdoes not lie between960.1025.2 zz. In this case then 1818814141 nnTand TTn12612 511811661so that .03.251185.3TTLTz Since this isnot between 960.1, we reject 0H.6. Proportions. 6a. Independent
View Full Document