Introduction to Probability and Statistics for Engineers and Scientists

(Sean Pound) #1

12.4The Two-Sample Problem 531


=2(1−.9498)
=.1004

which can be compared with the exact value, as given in Example 12.4c, of .1225.
In Example 12.4d,n=9,m=13, and so


n(n+m+1)
2

=103.5

nm(n+m+1)
12

=224.25

SinceT=72, we have that


d=| 72 −103.5|=31.5

Thus, the approximatep-value is


p-value≈ 2 P

{
Z>

31.5

224.25

}

= 2 P{Z>2.103509}
=2(1−.9823)=.0354

which is quite close to the exactp-value (as given in Example 12.4d) of .0364.
Thus, in the two examples considered, the normal approximation worked quite well in
the second example — where the guideline that both sample sizes should exceed 7 held —
and not so well in the first example — where the guideline did not hold. ■


(b)Simulation If the observed value of the test statistic isT=t, then thep-value is
given by

p-value=2 min

{
PH 0 {T≥t},PH 0 {T≤t}

}

We can approximate this value by continually simulating a random selection ofn
of the values 1, 2,...,n+m— noting on each occasion the sum of thenvalues.
The value ofPH 0 {T≥t}can be approximated by the proportion of time that the
sum obtained is greater than or equal tot, andPH 0 {T≤t}by the proportion of
time that it is less than or equal tot.
A Chapter 12 text disk program approximates thep-value by performing the
preceding simulation. The program will run most efficiently when the sample
of smallest size is designated as the first sample.
Free download pdf