Page 288 - Statistics II for Dummies
P. 288
272 Part IV: Building Strong Connections with Chi-Square Tests
To find the p-value for the test statistic in the M&M’S example (7.55),
find the row for 5 degrees of freedom on the Chi-square table (Table A-3
in the appendix) and look at the numbers (the degrees of freedom is
k – 1 = 6 – 1 = 5, where k is the number of categories). You see that the
number 7.55 is less than the first value in the row (9.24), which has a
p-value of 0.10. (Find the p-value by looking at the column heading above
the number.) So the p-value for 7.55, which is the area to the right of
7.55 on Figure 15-1, must be greater than 0.10, because 7.55 is to the left of
9.24 on that Chi-square distribution.
Many computer programs exist (online or via a graphing calculator) that
will find exact p-values for a Chi-square test, saving time and headaches
when you have access to them (the technology, not the headaches).
Using one such online p-value calculator, I found that the exact p-value for
the goodness-of-fit test for the M&M’S example (test statistic 7.55 with 5
degrees of freedom for Chi-square) is 0.1828. To find online p-value calcu-
lators, simply type the name of the distribution and the word “p-value” in
an Internet search engine. For this example, search “Chi-square p-value.”
6. If your p-value is less than your predetermined cutoff (α), reject Ho;
the model doesn’t hold. If your p-value is greater than α, you can’t
reject the model.
A typical value of α is 0.05. Some data analysts may use a higher value
(up to 0.10), and others may go lower (for example, 0.010). See Chapter 3
for more information on choosing α and comparing your p-value to it.
Going again to the M&M’S example, the p-value, 0.18, is greater than 0.05,
so you fail to reject Ho. You can’t say the model is wrong. So, Mars does
appear to deliver on the percentages of M&M’S of each color as advertised.
At least, you can’t say it doesn’t. (I’m sure Mars already knew that.)
Although some hypothesis tests are two-sided tests, the goodness-of-fit test is
always a right-tailed test. You’re only looking at the right tail of the Chi-square
distribution when you’re doing a goodness-of-fit test. That’s because a small
value of the goodness-of-fit statistic means that the observed data and the
expected model don’t differ much, so you stick with the model. If the value of the
goodness-of-fit statistic is way out on the right tail of the Chi-square distribution,
however, that’s a different story. That situation means the difference between
what you observed and what you expected is larger than what you should get by
chance, and therefore, you have enough evidence to say the expected model is
wrong.
You use the Chi-square goodness-of-fit test to check to see whether a spec-
ified model fits. A specified model is a model in which each possible value of
the variable x is listed, along with its associated probability according to
the model. For example, if you want to test whether three local hospitals
take in the same percentage of emergency room patients, you test Ho: p
1
= p = p , where each p represents the percentage of ER patients going to
3
2
each hospital, respectively. In this case each p must equal 0.30 if the hos-
pitals share the ER load equally.
22_466469-ch15.indd 272 7/24/09 9:52:22 AM

