E-Code

Chi-square goodness of fit — a TI-89 Titanium program

By E-Code · updated

CHISQ89 is a TI-89 BASIC program for the TI-89 Titanium. Observed counts and expected counts (or proportions) as lists: chi-square, degrees of freedom, the p-value from your own Define'd function (exact series for whole-number df), and a warning when an expected count is under 5.

What it asks for and what it shows

It asks for 2 values at its prompts. In the example below it shows CHI², DF, P, MIN E.

Example run

One of its oracle test cases: “fair die, 120 rolls (5 df)”. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Input 1{18,24,16,25,17,20}
Input 2{20,20,20,20,20,20}
The screen shows
CHI²=3.5
DF=5
P=0.6233876277
MIN E=20

How it's checked

4 test cases, each checked against an independent method. Replayed key by key on a virtual TI-89 Titanium, they make 22 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-89 Titanium statistics programs · All TI-89 Titanium programs