How to Test Goodness of Fit on TI-89
Copyright © 2001–2020 by Stan Brown
Copyright © 2001–2020 by Stan Brown
In a goodness-of-fit or GOF test (also known as a multinomial experiment), you have three or more possible responses and you check whether the observed counts in your sample are consistent with the expected counts computed from the proportions in your model.
To compute the test statistic χ², your textbook sets up some columns and goes through a series of calculations that involve lots of writing and copying figures. This page shows you how to do all these calculations in statistics lists on your calculator, which is easier and more accurate.
Use this procedure:
mand the observed values in a list
m×sum(b)/sum(m)→eand check that they meet the requirements
b, expected is
e, and degrees of freedom is (number of cells)−1.
See also: A separate TI-83/84 procedure is also available; see MATH200A Program part 6. The test can also be done with native TI-83/84 commands, though it’s harder; see How to Test Goodness of Fit on TI-83/84.
An example in Dabes & Janik [full citation at https://BrownMath.com/swt/sources.htm#so_Dabes1999] had to do with the offspring of hybrid fruit flies; see figures at right. The null hypothesis H0 is that the 9:3:3:1 model is good, and the alternative H1 is that the model is bad. To compute the p-value, as always, you assume the model is good (assume H0 is true) and then compute the probability of getting the sample you got, or a sample even further from the model. Use α = 0.05.
The test statistic χ² is a measure of how far the observations differ from the model. You’ve already learned to compute it by hand. Now you’ll learn the TI-89 procedure by working the same example. At each stage you can compare the TI-89 numbers with the ones you did by hand, so that you can be confident you’re doing everything right.
|On the home screen, create a list called
(Any previous contents of the list are automatically erased.)
|Create a second list called
Now you need to compute the expected numbers. This will be the
total of observed numbers from list
b, redistributed in the
proportions of the model in list
To find each Expected number, multiply each number in the model by the
fraction ∑observed / ∑model.
To select “sum”, press [
Select “sum” again: press [
Finish with [
|Here’s the output I got, with my calculator in Auto mode. If yours is in Approximate mode, you’ll see decimals here instead; either way is fine.|
Check that the expected values meet the requirements: none are <1, and no more than 20% of them are <5. Here, the expected values are all 217/16≈13.6 or greater, so the requirements for a χ² test are met.
Now you’re ready to compute the test statistic and the p-value.
|Get to the Stats/List Editor application.||Press [|
|Select the χ² goodness-of-fit test.||[|
The observed list is [
The test statistic is χ² = 2.4531 and the p-value is 0.4838. Since p>α, you fail to reject H0 and you can’t reach a conclusion about the model. (Some researchers will say “the model is not inconsistent with the data”.)
Sometimes you want to know whether unequal frequencies are in fact significantly unequal. In that case your model is a series of 1’s, indicating equal ratios. Here’s an example adopted from Johnson & Kuby 2003 [full citation at https://BrownMath.com/swt/sources.htm#so_Johnson2003] page 463.
Suppose 119 college students registered for seven sections of a course in these numbers: 18, 12, 25, 23, 8, 19, 14. At the 0.05 level, do the data indicate that the students had a preference for certain sections, or was each section equally likely to be chosen?
H0 is that each section was equally likely to be chosen, and H1 is that students had a preference. Your model for H0 is equal ratios of 1:1:1:1:1:1:1 (one 1 for each of the seven categories). Enter this in L1, enter the observed numbers in L2, and proceed as above.
You should find χ² = 12.9412. Since there are seven categories, df = 6 and you compute p = 0.0440. This is less than α and you conclude that there was a preference shown.
You can always draw a χ² distribution with the appropriate part shaded and the p-value displayed.
Lower Value= the χ² statistic you computed
Upper Value= ∞
Degrees of Freedom= one less than the number of categories
Updates and new info: https://BrownMath.com/ti83/