Guide to Chapter 12
Copyright © 2008–2012 by Stan Brown, Oak Road Systems
Copyright © 2008–2012 by Stan Brown, Oak Road Systems
This is your guide to what’s important in the chapter, with comments on some things that the chapter leaves out or doesn’t explain well. Page numbers refer to Sullivan, Michael, Fundamentals of Statistics 3/e (Pearson Prentice Hall, 2011), which is equivalent to the “second custom edition” for TC3.
Always check Corrections to Sullivan’s Fundamentals of Statistics, 3rd Edition for known mistakes in the textbook. Caution: your calculator is more accurate than the book because the book rounds values and uses tables. When the book disagrees with your answer, check the errata.
Big picture: Now we turn to inferences about categorical data. Once again, our HT asks, Could chance account for the sample we got, or is it too far from H0?
MATH200A: Use MATH200A part 7 for all calculations in section 12.1.
Announce: Fall and spring students, sign up this week if you want to present your projects next week for extra credit. (Only those with an approved Project Plan are eligible to present.)
A GoF test or multinomial experiment works with one population, one categorical variable.
558 “Hypotheses regarding a probability distribution” could be expressed as decimals, percent, or ratios. What do we mean by hypotheses regarding a probability distribution? More simply, we have a model and we have data, and we want to see whether the data disprove the model.
558 Note properties of χ² distribution.
No LH tail means the only possible test is for difference from a model. Despite the name, you’re actually testing the badness of the fit!
Interesting factoids (which you don’t have to know): mean = df, mode = df−2, median ≈ df–2/3
558–9 Skip Example 1, because there’s no need to find critical values in a p-value approach
560Understand the concept of expected values.
If you’re not given pi then you could compute it as you did for the M&Ms: pi = (model row) ÷ ∑model. However, MATH200A part 7 computes expected values for you.
560–3 We’ll do Examples 2&3 (one hypothesis test) by hand, then use MATH200A part 7 after that.
561 The formula at top takes each category and computes a scaled difference between observed and expected counts, then adds them all up to get an overall measure of badness of fit. That χ² test statistic with the degrees of freedom (number of categories minus 1) gives you a p-value. The p-value, as usual, tells you the chances of getting this much of a discrepancy if the model is right.
Caution: You must have observed counts, even if model is in percents.
Expected “counts” may have fractional parts — don’t round.
561 It’s more practical to test the requirements after running MATH200A part 7 because the program gives you the expected counts in L3.
A stronger requirement than the one stated is “all E’s ≥5”. If that’s true, as it often is, then you don’t need to test the more particular requirements in the book.
562 Note: Hypotheses are usually words in Case 6 (and Case 7).
564–5 Example 5
Special form of conclusion on “fail to reject”: the double negative is an okay alternative to neutral language in Cases 6 and 7 because it’s commonly done that way in science and medicine.
566 Do exercises 1–4
Do M&Ms from class data.
Not in book, and optional: If you reject H0, can you say anything about which categories are most “responsible” for the overall deviation from the model? Yes. According to De Veaux, Velleman, and Bock, Intro Stats (Pearson Addison Wesley, 2009), pages 699–700, you can look at the standardized residuals (observed−expected)/√expected. These are essentially z-scores, and you recall that z has only a 5% chance of being outside −2 to +2 if the null hypothesis is true.
MATH200A part 7 already computes the squares of the residuals for you in list L4. The square of −2 or +2 is 4, so when you look at list L4 after running the program, you can be pretty sure that any row with a value above 4 indicates a category that doesn’t match the model. (It’s more complicated, but that’s a decent rule of thumb.)
You can’t do 1-PropZTest on each category after rejecting H0 on your GoF test, because that would greatly increase your chance of a Type I error above your stated α. And you can’t do 1-PropZInt confidence intervals on the category proportions, because a confidence interval is just the inverse of a hypothesis test. A procedure does exist to do a confidence interval, but it’s much, much more complicated than any CI we’ve done.
A test of independence is one population, two qualitative variables. A test of homogeneity is two or more populations, one qualitative variable.`They’re sometimes lumped together as “2-way test” or “contingency table”.
Don’t get hung up on whether a particular situation is a test of independence or homogeneity, because it’s not always clear which is which. Anyway, they’re computed exactly the same.
A 2×2 table in Case 7 is equivalent to Case 5 and is more easily tested with a 2-PropZTest, though the χ² test gives the same p-value.
571 Remember the 2-way table from chapter 5
Independence means all columns are distributed in the same proportions in every row (and vice versa). Symbolically, P(row|column) = P(row), which is our definition of independence from Chapter 5.
571–3 Read through Example 1 to understand what expected values means in Case 7. But don’t worry about the computations because the TI-83’s χ²-Test will find expected values for you.
574The requirements are the same as for Case 6. Again, check them after computing χ² and the p-value.
575–6 Work Example 2 using your calculator.
Caution: use χ²-Test on TI-83/84, not χ²GOF-Test.
Interesting factoid (which you don’t have to know): df = (rows–1)×(columns–1)
577–8 Read through Example 3 to make sure you can interpret such distributions and graphs, but we won’t be constructing them in this class.
FYI, the formula your book uses for the conditional distribution is P(row | column) = (cell count)/(column total)
579–80 Work Example 5.
Caution: the query after the data table is badly phrased. See Corrections to Sullivan’s Fundamentals of Statistics, 3rd Edition.
The hypotheses shown are OK, but also OK are:
H0: People on the three medications are equally likely to
experience abdominal pain.
H1: People on the three medications are not equally likely to
experience abdominal pain.
Practice: page 584 problem 16.
This page is used in instruction at Tompkins Cortland Community College in Dryden, New York; it’s not an official statement of the College. Please visit www.tc3.edu/instruct/sbrown/ to report errors or ask to copy it.
For updates and new info, go to http://www.tc3.edu/instruct/sbrown/stat/