# K-S test of normality in NPAR TESTS and NPTESTS does not use Lilliefors correction prior to SPSS Statistics 21.0.0.1

## Technote (troubleshooting)

## Problem(Abstract)

I wish to test the fit of a variable to a normal distribution, using the 1-sample Kolmogorov-Smirnov (K-S) test in SPSS Statistics 21.0 or a prior version. There are three SPSS procedures that compute a K-S test for normality and they report two very different p (significance) values for the same data. If I choose 'Analyze->Descriptive Statistics->Explore' from the menus, click the Plots button and check "Normality plots with tests", then the EXAMINE command is run and the K-S test with Lilliefors correction (for sample-based parameters) is printed. If I choose 'Analyze->Nonparametric Tests->Legacy Dialogs->1-Sample K-S' and take the default test for a normal distribution, then the NPAR TESTS command is run and the K-S test results are also reported. (In versions prior to Statistics 18., the path to K-S in NPAR TESTS was

Analyze->Nonparametric Tests->1-Sample K-S.) If I choose

'Analyze->Nonparametric Tests->One Sample' and check the Kolmogorov-Smirnov test in the 'Settings-Choose Tests' dialog, with the 'Use sample data' default for parameters, then the NPTESTS command is run and the K-S results are presented in the model viewer. However, the significance levels reported in the Explore K-S results are typically smaller than the significance levels reported in the NPAR TESTS or NPTESTS (with sample parameters) results. I suspect that the discrepancy is due to the fact that the K-S test in EXAMINE incorporates the Lilliefors correction to reduce the likelihood of a Type II error when sample estimates of the parameters are used. Why is the Lilliefors correction not implemented in the K-S test in the Nonparametric Tests procedures (the NPAR TESTS and NPTESTS commands)?

## Resolving the problem

In SPSS Statistics 21.0.0.1 and later versions, both Nonparametric Tests procedures perform the Lilliefors correction if the user does not enter the population mean and standard deviation. A footnote will indicate that the K-S significance is Lilliefors corrected.

The "uncorrected" significance levels in the K-S test of normality under 'Analyze->Nonparametric Tests' are based on a null hypothesis that the variable has a normal distribution with a specific population mean and standard deviation (SD). If a mean and SD are not included in the command, then the sample mean and SD are used to compute the K-S test. If the sample mean and SD are used, then the fit of the data to the hypothesized distribution will be artificially improved and the power of the test to detect departures from the specified distribution will be reduced. The Lilliefors correction has been employed in the Explore procedure (EXAMINE command) to correct the significance value for use of the sample mean and SD in place of a hypothesized population mean and SD. If you have a specific population mean and SD that you wish to test against (for example, a normal distribution with mean of 50 and SD of 10), then the uncorrected K-S in Nonparametric Tests would be the appropriate test. If a test for normality without regard to a specific population mean and SD is required, then the corrected test in Explore (and now also Nonparametric Tests) is the proper choice.

Lilliefors, H. W. (1967). On the Kolmogorov-Smirnov tests for normality with mean and variance

unknown. Journal of the American Statistical Association, 62, 399–402.

If you wish to use the NPAR TESTS (Nonparametric Tests->Legacy Dialogs) version of the K-S test and enter a population mean and SD, then you must run the procedure with a syntax command, as parameter entry is not available through the dialogs for that procedure. A sample command is:

NPAR TESTS

/K-S(NORMAL,50,15)= x1

/MISSING ANALYSIS.

This command requests a K-S test of whether the variable X1 has a normal distribution with a population mean of 50 and SD of 15. A feature request has been filed with SPSS Development, suggesting that parameter entry options be added to the K-S section of the Nonparametric Tests->Legacy dialogs dialog box.

In Release 18, the NPTESTS procedure was introduced. The K-S test in this procedure is operated from the menu system at

'Analyze>Nonparametric Tests>One Sample'. The One-sample Kolmogorov-Smirnov test is requested from the Settings tab by checking the boxes beside "Customize Tests" and "Test observed distribution against hypothesized (Kolmogorov-Smirnov test)". If you click on the Options button for the K-S test, then you enter a dialog where you can specify one or more distributions from a list (Normal, Uniform, Exponential, and Poisson). This dialog also allows you to enter hypothesized values for the defining parameters in each of these distributions. So, it is now possible to run the one-sample K-S test with the required hypothesized parameters from the menu system. A sample syntax command is :

NPTESTS

/ONESAMPLE TEST (x1) KOLMOGOROV_SMIRNOV(NORMAL=CUSTOM(MEAN=50 SD=15) )

/MISSING SCOPE=ANALYSIS USERMISSING=EXCLUDE

/CRITERIA ALPHA=0.05 CILEVEL=95.

The NPAR TESTS procedure is still available in Release 18 and later versions of IBM SPSS Statistics and the dialogs for that procedure have not changed.

## Historical Number

24957

### Document information

**More support for:**
SPSS Statistics

**Software version:**
Not Applicable

**Operating system(s):**
Platform Independent

**Reference #:**
1477354

**Modified date:**
2014-01-26