
ANSARI-BRADLEY TEST FOR SCALE PARAMETER 21
PROC NPAR1WAY DATA=data name AB;
CLASS sample name;
VAR variable name;
EXACT;
RUN;
• Here the option AB stands for the Ansari-Bradley test.
• Besides the exact P-value, SAS also outputs an approximate P-value based on
asymptotic normality of the test statistic C, the mean and variance of which are
computed as follows. Assuming n
1
≤ n
2
, if n = n
1
+ n
2
is even, then E(C) =
n
1
(n + 2)/4 and Var(C) = n
1
n
2
(n
2
−4)/[48(n − 1)] (more generally, Var(C) =
n
1
n
2
16
m
∑
j=1
T
j
r
2
j
−n(n + 2)
2
/[16n(n −1)] in case of m groups of tied observations
of sizes T
1
,...,T
m
with associated ranks r
1
,...,r
m
, respectively); and if n = n
1
+ n
2
is odd, ...