→ TI-83/84/89 → Goodness of Fit (TI-89)
Updated 25 Apr 2013

Testing Goodness of Fit on TI-89

Copyright © 2001–2017 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:

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 Testing Goodness of Fit on TI-83/84.

Example 1: Fruit Flies

Green-eyed winged9120
Green-eyed wingless349
Red-eyed winged336
Red-eyed wingless112
  Total 217

An example in Dabes & Janik [full citation at] 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.

Computing the Test Statistic and p-Value

On the home screen, create a list called m (for model). Press [2nd ( makes {]. Then enter the model numbers 9, 3, 3, 1. Press [2nd ) makes }], then [STO→] [ALPHA 5 makes M] [ENTER].
(Any previous contents of the list are automatically erased.)
Create a second list called b (for observed). [2nd ( makes {], then the observed numbers 120, 49, 36, 12, then [2nd ) makes }] [STO→] [ALPHA ( makes B] [ENTER].
TI-89 with model and observed lists

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 m. To find each Expected number, multiply each number in the model by the fraction ∑observed / ∑model.

The formula m×sum(b)/sum(m) creates the list of expected values. [ALPHA 5 makes M] [×].
To select “sum”, press [CATALOG] [T]. Cursor up to “sum” (the one without the ∑ sign) and press [ENTER]. Press [ALPHA ( makes B] [)] [÷].
Select “sum” again: press [CATALOG], cursor if necessary, and press [ENTER].
Finish with [ALPHA 5 makes M] [)] [STO] [ALPHA ÷ makes E] [ENTER].
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. TI-89 with observed and expected lists

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 [] [APPS]. Cursor to “Stats/List Editor” if necessary. Press [ENTER]. If necessary, select the folder “main”.
Select the χ² goodness-of-fit test. [2nd F1 makes F6] [7] selects Chi2 GOF.
The observed list is [ALPHA ( makes B]. The expected list is [ALPHA ÷ makes E]. Degrees of freedom is 3, which is 1 less than the number of categories. Select “draw” or “calculate”.
TI-89 chi-squared input screen   TI-89 chi-squared output screen

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”.)

Example 2: Equal Class Registrations

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] 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.

Appendix: Drawing the Distribution

You can always draw a χ² distribution with the appropriate part shaded and the p-value displayed.

Press [F5] [1] [3].

Because this article helps you,
please click to donate!
Because this article helps you,
please donate at

Updates and new info:

Site Map | Home Page | Contact