E-Code

Chi-square test of independence — a TI-84 Plus CE program

By E-Code · updated

CHIIND is a TI-BASIC program for the TI-84 Plus CE. Type a contingency table row by row: the chi-square statistic from the expected counts, degrees of freedom, p-value and Cramér's V, with a warning when any expected count is under 5.

What it asks for and what it shows

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

Example run

One of its oracle test cases: “2x2: smoking vs condition”. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Input 12
Input 22
Input 3{30,70}
Input 4{45,55}
The screen shows
CHI²=4.8
DF=1
V=0.1549193338
MIN E=37.5
N=200
P=0.02845973692

How it's checked

4 test cases, each checked against an independent method. Replayed key by key on a virtual TI-84 Plus CE, they make 27 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-84 Plus CE statistics programs · All TI-84 Plus CE programs