If you specify the EDF option, PROC NPAR1WAY computes tests based on the empirical distribution function. These include the KolmogorovSmirnov and Cramér–von Mises tests, and also the Kuiper test for twosample 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 details about the ksample analogs of the KolmogorovSmirnov 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 KolmogorovSmirnov statistic measures the maximum deviation of the EDF within the classes from the pooled EDF. PROC NPAR1WAY computes the KolmogorovSmirnov statistic as

The asymptotic KolmogorovSmirnov 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 twosample KolmogorovSmirnov test statistic D as

The pvalue 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 pvalue for D with the approximation

where

See Hodges (1957) for information about this approximation.
If you specify the D option, or if you request exact KolmogorovSmirnov pvalues with the KS option in the EXACT statement, PROC NPAR1WAY also computes the onesided KolmogorovSmirnov statistics D+ and D– for twosample 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 pvalues for the KolmogorovSmirnov statistics, you can specify the KS option in the EXACT statement. See the section Exact Tests for more information.
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 pvalue. The Kuiper statistic is computed as

The asymptotic value is

PROC NPAR1WAY displays the value of for each class level.
The pvalue 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 pvalue according to Owen (1962, p. 441).