This is sometimes written as:
2
¼
X
n
i¼1
ðf
i
^
f
i
Þ
2
^
f
i
(18:2)
where f
i
is the observed frequency and
^
f
i
is the expected frequency.
It does not matter whether the difference between the observed and
expected frequencies is positive or negative because the square of any
difference will be positive.
If there is perfect agreement between every observed and expected fre-
quency, the value of chi-square will be zero. Nevertheless, even if the null
hypothesis applies, samples are unlikely to always contain the exact propor-
tions present in the population. By chance, small departures are likely and
larger departures will also occur, all of which will generate positive values of
chi-square. The most extreme 5% of departures from the expected ratio are
considered statistically significant and will exceed a critical value of chi-square.
For example, forams can be coiled either counter-clockwise (to the left) or
clockwise (to the right). The proportion of forams that coil to the left is close
to 0.1 (10%), which can be considered the proportion in the population
because it is from a sample of several thousand specimens. A paleontologist,
who knew that the proportion of left- and right-coiled forams shows some
variation among outcrops, chose 20 forams at random from the same
locality and found that four were left-coiled and 16 right-coiled. The ques-
tion is whether the proportions in the sample were significantly different
from the expected proportions of 0.1 and 0.9 respectively. The difference
between the population and the sample might be only due to chance, but it
might also reflect something about the environment in which the forams
lived, such as the water temperature. Table 18.1 gives a worked example of a
chi-square test for this sample of left- and right-coiled forams.
The value of chi-square in Table 18.1 has one degree of freedom because
the sample size is fixed, so as soon as the frequency of one of the two
categories is set the other is no longer free to vary. The 5% critical value of
chi-square with one degree of freedom is 3.84 (Appendix A), so the pro-
portions of left- and right-coiled forams in the sample are not significantly
different to the expected proportions of 0.1 to 0.9. The chi-square test for
goodness of fit can be extended to any number of categories and the degrees
of freedom will be k − 1 (where k is the number of categories). Statistical
packages will calculate the value of chi-square and its probability.
232 Non-parametric tests for nominal scale data