Page 283 - Statistics II for Dummies
P. 283
Chapter 15: Using Chi-Square Tests for Goodness-of-Fit 267
For example, if you roll a fair die, you expect the percentage of ones to be .
If you roll that fair die 600 times, the expected number of ones will be
. That number (100) is the expected cell count for the cell that
represents the outcome of one. If you roll this die 600 times and get 95 ones,
then 95 is the observed cell count for that cell.
The formula for the goodness-of-fit statistic is given by the following:
, where E is the expected number in a cell and O is the observed
number in a cell. The steps for this calculation are as follows:
1. For the first cell, find the expected number for that cell (E) by taking
the percentage expected in that cell times the sample size.
2. Take the observed value in the first cell (O) minus the number of
items that are expected in that cell (E).
3. Square that difference.
4. Divide the answer by the number that’s expected in that cell, (E).
5. Repeat steps one through four for each cell.
6. Add up the results to get the goodness-of-fit statistic.
The reason you divide by the expected cell count in the goodness-of-fit
statistic (step four) is to take into account the magnitude of any differences
you find. For example, if you expected 100 items to fall in a certain cell and
you got 95, the difference is 5. But in terms of a percentage, this difference is
only percent. However, if you expected 10 items to fall into that cell
and you observed 5 items, the difference is still 5, but in terms of a percentage,
it’s percent. This difference is much larger in terms of its impact. The
goodness-of-fit statistic operates much like a percentage difference. The only
added element is to square the difference to make it positive. (That’s done
because whether you expected 10 and got 15 or expected 10 and got 5 makes
no difference to others; you’re still off by 50 percent.)
Table 15-3 shows the step-by-step calculation of the goodness-of-fit statistic
for the M&M’S example, where O indicates observed cell counts and E indicates
expected cell counts. To get the expected cell counts, you take the expected
percentages shown in Table 15-1 and multiply by 56 because 56 is the
number of M&M’S I had in my sample. The observed cell counts are the ones
found in my sample, shown in Table 15-2.
22_466469-ch15.indd 267 7/24/09 9:52:20 AM

