Usage Notes
The routines in this chapter are used to test for goodness of fit and randomness. The goodness‑of‑fit tests are described in Conover (1980). There are two goodness‑of‑fit tests for general distributions, a Kolmogorov‑Smirnov test and a chi‑squared test. The user supplies the hypothesized cumulative distribution function for these two tests. There is one routine (Lilliefors) that can be used to test specifically for exponential distributions and five routines (Shapiro‑Wilk, Lilliefors, Mardia, Anderson‑Darling, and Cramer‑von Mises) that can be used to test specifically for normal distributions.
The tests for randomness are often used to evaluate the adequacy of pseudorandom number generators. These tests are discussed in Knuth (1981).
The Kolmogorov‑Smirnov routines in this chapter compute exact probabilities in small to moderate sample sizes. The chi‑squared goodness‑of‑fit test may be used with discrete as well as continuous distributions.
The Kolmogorov‑Smirnov and chi‑squared goodness‑of‑fit test routines allow for missing values (NaN, not a number) in the input data. The routines that test for randomness do not allow for missing values.
Published date: 03/19/2020
Last modified date: 03/19/2020