Introduction to Probability and Statistics for Engineers and Scientists

(Sean Pound) #1

528 Chapter 12:Nonparametric Hypothesis Tests


The p-value in the Two-sample Rank Sum Test

Enter the size of sample 1:

Enter the size of sample 2:

Enter the sum of the ranks

9

13

72

The p-value is 0.03642

Start

Quit

This program computes the p-value for the two sample rank sum test.

of the first sample:

FIGURE 12.3


EXAMPLE 12.4d Suppose that in testing whether 2 production methods yield identical
results, 9 items are produced using the first method and 13 using the second. If, among all
22 items, the sum of the ranks of the 9 items produced by method 1 is 72, what conclusions
would you draw?


SOLUTION Run Program 12.4 to obtain the result shown in Figure 12.3. Thus, the hypo-
thesis of identical results would be rejected at the 5 percent level of significance. ■


It remains to compute the value of the test statisticT. It is quite efficient to compute
Tdirectly by first using a standard computer science algorithm (such as quicksort) to sort,
or order, then+mvalues. Another approach, easily programmed, although efficient for
only small values ofnandm, uses the following identity.


PROPOSITION 12.4.1 Fori=1,...,n,j=1,...,m, let


Wij=

{
1ifXi>Yj
0 otherwise

Then


T=

n(n+1)
2

+

∑n

i= 1

∑m

j= 1

Wij

Proof

Consider the valuesX 1 ,...,Xnof the first sample and order them. LetX(i)denote the
ith smallest,i=1,...,n. Now consider the rank ofX(i)among alln+mdata values.

Free download pdf