(note that the data must be put in order) comes from a CDF is where The test statistic can then be compared against the critical values of the theoretical distribution. In this case, no parameters are estimated in relation to the cumulative distribution function . Tests for families of distributions Essentially the same test statistic can be used in the test of fit of a family of distributions, but then it must be compared against the critical values appropriate to that family of theoretical distributions and dependent also on the method used for parameter estimation. Test for normality Empirical testing has found that the Anderson–Darling test is not quite as good as the Shapiro–Wilk test, but is better than other tests. Stephens found to be one of the best empirical distribution function statistics for detecting most departures from normality. The computation differs based on what is known about the distribution: Case 0: The mean and the variance are both known. Case 1: The variance is known, but the mean is unknown. Case 2: The mean is known, but the variance is unknown. Case 3: Both the mean and the variance are unknown. The n observations, , for , of the variable must be sorted such that and the notation in the following assumes that Xi represent the ordered observations. Let The values are standardized to create new values , given by With the standard normal CDF , is calculated using An alternative expression in which only a single observation is dealt with at each step of the summation is: A modified statistic can be calculated using If or exceeds a given critical value, then the hypothesis of normality is rejected with some significance level. The critical values are given in the table below for values of . Note 1: If = 0 or any (0 or 1) then cannot be calculated and is undefined. Note 2: The above adjustment formula is taken from Shorack & Wellner (1986, p239). Care is required in comparisons across different sources as often the specific adjustment formula is not stated. Note 3: Stephens notes that the test becomes better when the parameters are computed from the data, even if they are known. Note 4: Marsaglia & Marsaglia provide a more accurate result for Case 0 at 85% and 99%. Alternatively, for case 3 above (both mean and variance unknown), D'Agostino (1986) in Table 4.7 on