X — Array of length NOBS containing the observations. (Input)
W — Cramer‑von Mises statistic. (Output)
P — p‑value for a test of normality. (Output)
Optional Arguments
NOBS — Number of observations. (Input) NOBS must be greater than or equal to 3. Default: NOBS = size (X).
NMISS — Number of missing observations. (Output)
FORTRAN 90 Interface
Generic: CALLCVMNRM (X, W, P[, …])
Specific: The specific interface names are S_CVMNRM and D_CVMNRM.
Description
Given a data sample {Xi, i=1 .. n}, where n = NOBS and Xi = X(I), routine CVMNRM computes the Cramer‑von Mises (CvM) normality statistic W and the corresponding p‑value P = {probability that a normally distributed n element sample would have a CvM statistic > W}. If P is sufficiently small (e.g. P < .05), then the CvM test indicates that the null hypothesis that the data sample is normally‑distributed should be rejected. W is calculated as:
where is the cumulative distribution function of standard normal N(0,1) distribution, , and and s are the sample mean and standard deviation respectively. P is calculated by first transforming W to an “n‑adjusted” statistic W*:
and then calculating P in terms of W* using a parabolic approximation taken from Table 4.9 in Stephens (1986).
Comments
Informational errors
Type
Code
Description
3
1
The p‑value has fallen below the minimum value for which its calculation has any accuracy; zero is returned.
4
1
After removing the missing observations only n observations remain. The test cannot proceed.
Example
The following example is taken from Conover (1980, pages 364 and 195). The data consists of 50 two digit numbers taken from a telephone book. The CvM test fails to reject the null hypothesis of normality at the .05 level of significance.