CHISQGOF (
c2 Goodness of Fit) Program for TI-83 or TI-83 PLUS
Purpose: As you may know, your calculator handles two types of c2 tests with a built-in function, namely STAT TESTS C, which covers the tests for independence and for homogeneity of proportions. However, there is a third type of c2 test, the "goodness of fit" test, which TI apparently felt was too elementary to include as a separate function. Here is a short program that fills this gap. Be sure to enter your expected counts (not proportions!) in list L2 and your observed counts in list L3 before you run the program. |
Program Listing:
:Disp "L
2=EXP./L3=OBS."When the program ends, list L4 holds the contributions to c2, variable C holds the value of the c2 statistic, variable D holds the degrees of freedom (i.e., number of categories minus 1), and variable P holds the P-value of the test. You can then use these in other computations if you wish.
As you are entering the program above, you may find the following hints to be helpful: