An example of the one category situation is when we have a random sample
of size n from a continuous population and we
want to test whether the population has a particular distribution
(such as normal). In this case we could divide the range of the data
into K intervals and count how many of the X's fall into each
interval. For example, if the hypothesis is that the X's come from
a uniform distribution on the interval [0,1], we could divide [0,1]
into the 10 intervals [0,.1), [.1,.2), and so on and then count how many
X's are in each interval. Again we call the observed
counts
.
From the hypothesized distribution, we can calculate how many X's
should be in each interval (for the uniform example, 10% of the X's
should fall in each interval). Again we have
where
is the probability that an X falls in the ith interval.
In some cases, we need to estimate the parameters of the hypothesized
distribution. In testing for normality for example, in order to
find the
's, we need to know the mean and variance of the population.
If we use
and
as estimates of the true mean and variance,
then we must further reduce the degrees of freedom of the
statistic
by 2 (one for each estimated parameter).
EXAMPLE:\
To see if there is a seasonal effect for homicide, 1361 crimes were
classified into the four seasons, where 334 of them happened in
spring, 372 in summer, 327 in Fall and 328 in winter. Do we have
enough evidence to show that the crime frequencies are different for
different seasons? Let
,
be the proportions of
crimes for the four seasons, respectively.