Example 3: Observed vs. Expected Chi-Square
This example is based on a (fictitious) data set of traffic accidents on a particularly treacherous highway (the data for this example are contained in the example data file Accident.sta). The data are recorded for each month of the year, for two years: 1983 and 1985. Open this data file via the File - Open Examples menu; it is in the Datasets folder.
Imagine that a considerable amount of money had been spent in 1984 to improve the safety of traffic on that highway. If these improvements were in vain (the null hypothesis), then the number and distribution of traffic accidents in 1985 can be expected to be the same as in 1983 (provided that the overall amount and nature of traffic has not changed). Thus, the data for 1983 will serve as the expected values here, and the data for 1985 will serve as the observed values.


Apparently, there has been a highly significant drop in the number of traffic accidents between 1983 and 1985.
See also, Nonparametric Statistics - Index.