Introduction to Probability and Statistics for Engineers and Scientists

(Sean Pound) #1

12.4The Two-Sample Problem 527


Starting with the boundary condition


P(1, 0,K)=

{
0 K≤ 0
1 K> 0 , P(0, 1,K)=

{
0 K< 0
1 K≥ 0

Equation 12.4.3 can be solved recursively to obtainP(n,m,t−1) andP(n,m,t).


EXAMPLE 12.4b Suppose we wanted to determineP(2, 1, 3). We use Equation 12.4.3 as
follows:


P(2,1,3)=^23 P(1,1,0)+^13 P(2,0,3)

and


P(1,1,0)=^12 P(0, 1,−2)+^12 P(1,0,0)= 0
P(2,0,3)=P(1,0,1)
=P(0,0,0)= 1

Hence,


P(2,1,3)=^13

which checks since in order for the sum of the ranks of the twoXvalues to be less than
or equal to 3, the largest of the valuesX 1 ,X 2 ,Y 1 , must beY 1 , which, whenH 0 is true, has
probability^13. ■


Since the rank sum test calls for rejection when either

2 P(n,m,t)≤α or α≥ 2 [ 1 −P(n,m,t−1)]

it follows that thep-value of the test statistic whenT=tis


p-value=2 min{P(n,m,t), 1−P(n,m,t−1)}

Program 12.4 uses the recursion in Equation 12.4.3 to compute thep-value for the
rank sum test. The input needed is the sizes of the first and second samples and the sum
of the ranks of the elements of the first sample. Whereas either sample can be designated
as the first sample, the program will run fastest if the first sample is the one whose sum of
ranks is smallest.


EXAMPLE 12.4c In Example 12.4a, the sizes of the two samples are 5 and 6, respectively,
and the sum of the ranks of the first sample is 21. Running Program 12.4 yields the
result:


p-value=.1255 ■
Free download pdf