Instructions for Doing Some Ch. 9 Tests Using StatXact


One can start by stacking the two samples on top of one another in the first column (Var1) of the CaseData editor. Since there are 15 x values and 10 y values, in the second column (Var2) put 15 1s followed by 10 2s.

Mood Test

Use
Nonparametrics > Two Independent Samples > Mood...
Click Var1 into the Response Box and Var2 into the Population box. Then, click the exact button under Compute, and finally click OK. The exact p-value for a two-sided test rounds to 0.63.

(Note: For this test, and others from Ch. 9 that we can do on StatXact, use the Exact p-value under 2-sided and not the one under 2*1-Sided. In this case they both round to 0.63, but they are different if more significant figures are given, and with some other data sets the differences in the two will be larger.)

Ansari-Bradley Test

Same as above, only use
Nonparametrics > Two Independent Samples > Ansari-Bradley...
The exact p-value for a two-sided test rounds to 0.63.

Siegel-Tukey Test

Same as above, only use
Nonparametrics > Two Independent Samples > Siegel-Tukey...
The exact p-value for a two-sided test rounds to 0.59.

Klotz Test

Same as above, only use
Nonparametrics > Two Independent Samples > Klotz...
The exact p-value for a two-sided test rounds to 0.63.

Conover Test

Same as above, only use
Nonparametrics > Two Independent Samples > Conover...
The exact p-value for a two-sided test rounds to 0.94.

Percentile Modified Rank Test (for a dispersion difference)

First one needs to create the scores. Go to the CaseData editor and then select
DataEditor > Compute Scores...
Type Var3 in the Target Variable box, select/highlight Var1 (the column of data values) and click it into the Response box, click the button to choose Wilcoxon (Mid-Rank) in the Score area, and then click OK. This puts the ranks into Var3, and these values can be used as you enter the scores for the percentile modified rank test (for a dispersion difference) into the next column (Var4). If you want to assign nonzero scores to the smallest 3 (12%) values and the largest 3 (12%) values in the ordered combined sample, you type 3 in the Var 4 column beside the Wilcoxon rank of 1 in Var 3, type 2 in the Var4 column beside the Wilcoxon rank of 2, and type 1 in the Var4 column beside the Wilcoxon rank of 3. Then type 3 in the Var 4 column beside the Wilcoxon rank of 25 in Var 3, type 2 in the Var4 column beside the Wilcoxon rank of 24, and type 1 in the Var4 column beside the Wilcoxon rank of 23. Finally, enter 0 as the score for the remaining positions in Var4 (corresponding to ranks/midranks ranging from 4 to 22).

Now use
Nonparametrics > Two Independent Samples > Permutation...
Click Var4 (the percentile modified rank test scores) into the Response Box and Var2 into the Population box. Then, click the exact button under Compute, and finally click OK. The exact p-value for a two-sided test rounds to 0.70. (As a check that you entered the scores correctly, in the Summary of the Test Statistic near the top of the output, the values for Minimum, Maximum, and Mean should be 0, 12, and 7.2 (respectively).)

Westenberg's Test

The Wilcoxon ranks in Var3 can again be used as you enter the scores corresponding to the Westenberg test into the next column (Var5). If you want to assign scores of 0 to the smallest 6 (24%) values and the largest 6 (24%) values in the ordered combined sample, you type 0 in the Var 5 column beside the Wilcoxon ranks of 1 through 6 and 20 through 25 in Var 3. Then type 1 in the Var 5 column beside the Wilcoxon ranks of 7 through 19.

Now use
Nonparametrics > Two Independent Samples > Permutation...
Click Var5 (the Westenberg scores) into the Response Box and Var2 into the Population box. Then, click the exact button under Compute, and finally click OK. The exact p-value for a two-sided test is exactly 1. (As a check that you entered the scores correctly, in the Summary of the Test Statistic near the top of the output, the values for Minimum, Maximum, and Mean should be 3, 13, and 7.8 (respectively).)

Alternatively, one can enter the correct counts (7, 8, 5, and 5) into a 2 by 2 table using StatXact's TableData editor, and perform Fisher's exact test using
Nonparametrics > Two Independent Binomials > Fisher's Exact Test...
(clicking OK to make it run). The same exact p-value of 1 is obtained.