

Given a random sample of measurements, x1, x2, . . . , xn from a population A, we would like to test the hypothesis that A is normally distributed. Assuming that A is normal with mean µ and standard deviation s, and that X denotes a random measurement from A, then (X  µ) / s follows a standard normal distribution Z ~ N(0,1). If we let yi = (xi  µ) / s, for 1<= i <= n, then data y1, y2, . . . , yn would be a random sample from this standard normal distribution.
To test the "goodness of fit," we will divide the real line (Infinity, Infinity) into m subdivisions, or bins, U1, U2, . . . ,Um1, Um, where m is usually chosen to be from 1 / 5 to 1 / 10 of the sample size. The division is as follows: U1 = (Infinity, 3], U2 = (3, 3 + 6 / (m  2) ], . . . , Um1 = (3 + 6(m  3) / (m  2), 3], and Um = (3, Infinity). The m  2 middle bins are of equal length 6 / (m  2).
We then count how many of the measurements yi lie in each subdivision and denote this frequency by fk, for 1 <= k <= m.
Since Z ~ N(0,1), the expected number of measurements that should fall in Uk is ek = n*P(Z in Uk ). We wish to compare the actual frequencies fk with these expected frequencies ek. If the differences are too large, then we must reject the null hypothesis that A is Normal. To measure the differences, we use a test statistic W defined by
For large sample sizes n, W follows an approximate Chi Square distribution with m  1 degrees of freedom.
However if µ is unknown or unspecified, then we must replace it with Xbar in the definition of yi. Likewise if s is unknown or unspecified, then we must replace it with its maximum likelihood estimate sigma(x) in the definition of yi. That is, we may instead have to let yi = (xi  Xbar ) / sigma(x), or yi = (xi  µ ) / sigma(x) , or yi = (xi  Xbar) / s.
In these cases, W is still defined as above, but now W follows an approximate ChiSquare distribution with m  1  e degrees of freedom, where e = 1 or e = 2 denotes the number of (maximum likelihood estimate) replacements made in the definition of yi. We then use this ChiSquare distribution to compute the pvalue (righttail value) created by the test statistic.
Note: Here we are using sigma(x) to denote the expression
Sqrt[ Sum[ (xi  Xbar)^2 , {i, 1, n} ] / n ], or Sqrt[ Sum[ (xi  µ)^2 , {i, 1, n} ] / n ] if µ is specified, to denote the maximum likelihood estimate of the standard deviation.
Suppose we obtain a small pvalue p. If A were normally distributed, then the chance of the test statistic W being as large as it is would only be p. In other words, the probability is approximately p that the frequencies of occurrences in the various bins differ by as much as they do from the expected numbers of occurrences. For p small enough (perhaps below a specified level of significance), we reject the null hypothesis that A is normally distributed (with the stated parameters).
The TESTNORM program performs this goodness of fit test. Before executing the program:
On TI83+, enter the data points into list L1 in the STAT Edit screen.
On TI86, enter the data points into list L1 in the LIST EDIT screen.
On TI89, enter the data points into column c1 in a Data Editor called dist.
Then call up the TESTNORM program.
On TI83+, a drop down menu appears which allows you to specify which parameters you wish to enter.
On TI86, a toolbar appears which allows you to specify which parameters you wish to enter.
On TI89, press F1 to obtain a drop down menu which allows you to specify which parameters you wish to enter.
The program will sort the data, then compute the frequencies and the expected number of occurrences for each bin. The program displays the test statistic W and the pvalue.
Warning: You might run out of memory with a large data set. If so, then you might be able to execute the program after clearing some memory space.
Example.The following measurements are a random sample of combined SAT scores from a group of students picked from a random university .
Using a collection of 12 bins, test the hypothesis that the distribution of all SAT scores of students at this university
(a) is normally distributed with mean 980,
(b) is normally distributed.
Solution. (a) After entering the data, call up the TESTNORM program and designate that you wish to specify the mean. Then enter 980 for MEAN and enter 12 for NUMBER OF BINS.
We obtain a right tail value of 0.00743 from a test statisitc of 26.064564. With the low pvalue, we have significant evidence to reject that the scores are normally distributed with a mean of 980. If so then there would only be a 0.00743 probability of the frequencies differing by as much as they do from the expected values.
Additional Feature:
On the TI83+, press STAT, press ENTER:
1. The data points have been sorted into increasing order in list L1.
2. The list L2 contains the frequency of the data yi occurring in each bin.
3. The list L3 contains the expected numbers of occurrences for each bin.
On the TI86, press LIST, press F4:
1. The data points have been sorted into increasing order in list L1.
2. The list L2 contains the frequency of the data yi occurring in each bin.
3. The list L3 contains the expected numbers of occurrences for each bin.
(You may have to add these list names into the LIST EDIT screen in order to see the results.)
On the TI89, press APPS, press 6, press 1:
1. The data points have been sorted into increasing order in column c1.
2. The column c2 contains the frequency of the data yi occurring in each bin.
3. The column c3 contains the expected numbers of occurrences for each bin.
By comparing the frequencies {0, 0, 0, 1, 8, 6, 14, 4, 11, 1, 0, 0} with the expected values {0.06075, 0.30814, 1.248, 3.5613, 7.1632, 10.159, 10.159, 7.1632, 3.5613, 1.248, 0.30814, 0.06075}, we can see that there is not much "goodness" of fit to the specified normal distribution.
So either the mean is not 980 or the scores do not come from a normally distributed population. For part (b), we simply test for normality without specifying any parameters. Reexecute the program, but initially enter 4 to designate that we are not entering any parameters (NEITHER).
We now obtain a pvalue of 0.657566. With the high pvalue, we do not have evidence to reject normality. The differences in the frequencies {0, 0, 1, 7, 5, 10, 9, 6, 6, 1, 0, 0} and the expected values are no longer significant.


The TESTNORM program requires that raw data be entered into specific lists (L1 on the TI83 and TI86, and c1 on the TI89). But often data is given in a frequency chart that gives the number of occurrences for each measurement. If so, then we can use the FREQ program above to enter the measurements into a list in order to run the TESTNORM program.
On the TI83: Enter the measurements into list L5 and the frequencies into list L6.
On the TI86; Enter the measurements into xStat and the frequencies into list yStat.
On the TI89: Enter the measurements into column c5 and the frequencies into column c6 in a DATA variable called dist.
After entering the data, execute the FREQ program, then execute the TESTNORM program.
Example. A number of households were surveyed as to how many children lived at home. The responses are below:
Test whether or not the number of childen per household follows a normal distribution.
Solution. Rather than enter all 275 measurements into the appropriate list required to execute the TESTNORM program, we enter the frequency chart into the proper lists described above. Then we execute the FREQ program.
Next, we shall execute the TESTNORM program without specifying the mean or standard deviation, using 7 bins. We obtain a low pvalue of 2.125 E11; thus, we can reject the hypothesis that the number of childen per household is normally distributed. If it were normally distributed, then there would no chance of the frequencies {0, 0, 102, 86, 81, 4, 2} differing so much from the expected values in each bin. Is the result any different for more bins?
The following measurements are weights (in pounds) from a random sample of men aged 40 to 49.
Using 11 bins, test whether or not the data comes from a normally distributed population
(a) with standard deviation 15,
(b) with mean 180 and standard deviation 30.
(a) Execute the TESTNORM program by specifying a standard deviation of 15 (using the third item on the menu) and 11 bins. We obtain a pvalue of 0 (from a test statistic of 276.198). If the weights of 4049 year old men were normally distributed with of standard deviation 15, then there would be no chance of the data set being distributed as it is with the frequencies {3, 1, 1, 7, 5, 4, 5, 5, 1, 2, 2} differing so much from the expected occurrences in each bin. Therefore we must reject the hypothesis of normality with a standard deviation of 15.
(b) Reexecute the program by specifying a mean of 180 and a standard deviation of 30 (using the first item on the menu) and again using 11 bins. We now obtain a pvalue of 0.9814 from frequencies {0, 0, 1, 3, 8, 10, 9, 3, 1, 1, 0}. Clearly we can now accept the hypothesis that the weights come from a normally distributed population having mean 180 and standard deviation 30.
Return to Table of Contents.