If you specify the EDF option, PROC NPAR1WAY computes tests based on the empirical distribution function. These include the Kolmogorov-Smirnov and Cramér–von Mises tests, and also the Kuiper test for two-sample data. This section gives formulas for these test statistics. For further information about the formulas and the interpretation of EDF statistics, see Hollander and Wolfe (1999) and Gibbons and Chakraborti (2010). For information about the k-sample analogs of the Kolmogorov-Smirnov and Cramér–von Mises statistics, see Kiefer (1959).

The *empirical distribution function* (EDF) of a sample , , is defined as

where is an indicator function. PROC NPAR1WAY uses the subsample of values within the ith class level to generate an EDF for the class, . The EDF for the overall sample, pooled over classes, can also be expressed as

where is the number of observations in the ith class level, and n is the total number of observations.

The Kolmogorov-Smirnov statistic measures the maximum deviation of the EDF within the classes from the pooled EDF. PROC NPAR1WAY computes the Kolmogorov-Smirnov statistic as

The asymptotic Kolmogorov-Smirnov statistic is computed as

For each class level i and overall, PROC NPAR1WAY displays the value of at the maximum deviation from F and the value at the maximum deviation from F. PROC NPAR1WAY also gives the observation where the maximum deviation occurs.

If there are only two class levels, PROC NPAR1WAY computes the two-sample Kolmogorov-Smirnov test statistic D as

The p-value for this test is the probability that D is greater than the observed value d under the null hypothesis of no difference between class levels (samples). PROC NPAR1WAY computes the asymptotic p-value for D by using the approximation

where

For more information, see Hodges (1957).

If you specify the D
option, or if you request exact Kolmogorov-Smirnov p-values by specifying the KS
option in the EXACT statement, PROC NPAR1WAY also computes the one-sided Kolmogorov-Smirnov statistics *D+* and *D–* for two-sample data as

The asymptotic probability that *D+* is greater than the observed value , under the null hypothesis of no difference between the two class levels, is computed as

Similarly, the asymptotic probability that *D–* is greater than the observed value is computed as

To request exact p-values for the Kolmogorov-Smirnov statistics, you can specify the KS option in the EXACT statement. For more information, see the section Exact Tests.

The Cramér–von Mises statistic is defined as

where is the number of ties at the jth distinct value and p is the number of distinct values. The asymptotic value is computed as

PROC NPAR1WAY displays the contribution of each class level to the sum .

For data with two class levels, PROC NPAR1WAY computes the Kuiper statistic, its scaled value for the asymptotic distribution, and the asymptotic p-value. The Kuiper statistic is computed as

The asymptotic value is

PROC NPAR1WAY displays the value of for each class level.

The p-value for the Kuiper test is the probability of observing a larger value of under the null hypothesis of no difference between the two classes. PROC NPAR1WAY computes this p-value according to Owen (1962, p. 441).