532 Chapter 12:Nonparametric Hypothesis Tests
Simulation Approximation to the p-value in Rank Sum TestEnter the size of sample 1:Enter the size of sample 2:Enter the sum of the ranksEnter the desired number562110000The p-value is 0.125StartQuitThis program approximates the p-value for the two sample rank sum test
by a simulation study.of the first sample:of simulation runs:FIGURE 12.4
Simulation Approximation to the p-value in Rank Sum TestEnter the size of sample 1:Enter the size of sample 2:Enter the sum of the ranksEnter the desired number9137210000The p-value is 0.0356StartQuitThis program approximates the p-value for the two sample rank sum test
by a simulation study.of the first sample:of simulation runs:FIGURE 12.5
EXAMPLE 12.4f Running the text disk program on the data of Example 12.4c yields
Figure 12.4, which is quite close to the exact value of .1225. Running the program using
the data of Example 12.4d yields Figure 12.5, which is again quite close to the exact value
of .0364. ■
Both of the approximation methods work quite well. The normal approximation, when
nandmboth exceed 7, is usually quite accurate and requires almost no computational time.