There are two kinds of Chi Squared Tests we should be familiar with:


Goodness of Fit Test (GOF)

Goodness of Fit Test is used to determine whether the distribution of a sample is consistent with a hypothesized distribution.

Think of it as a comparison between the observed distribution and the expected distribution.

We use a GOF Test when we have a single categorical variable, and we want to compare the distribution of the observed data to an expected distribution.


Test of Independence

Test of Independence is used to determine whether there is a significant association between two categorical variables.

Think of it as a comparison between the observed frequencies and the expected frequencies.

We use a Test of Independence when we have two categorical variables, and we want to determine whether they are independent of each other.


Math Behind the Tests

Both the GOF Test and the Test of Independence use the Chi Squared Test statistic, which is calculated as follows:

Where:

  • = Chi Squared Test Statistic
  • = Observed Frequency
  • = Expected Frequency
  • = Summation over all categories or cells

Calculating Expected Frequencies

For Goodness of Fit:

The expected frequency for each category is calculated as:

For Test of Independence:

The expected frequency for each cell in the contingency table is calculated as:

Where:

  • = Expected Frequency
  • = Total count for the row
  • = Total count for the column
  • = Total count of all observations

Performing Test on a TI-84 Calculator

To perform these tests on a TI-84 calculator, follow these steps:

  1. Enter the observed frequencies into a matrix (e.g., [A]).
  2. Enter the expected frequencies into a matrix (e.g., [B]).
  3. Use the Test function to calculate the test statistic and p-value:
    • Press STAT > TESTS > χ²-Test.
    • Assign the observed and expected matrices.
  4. Interpret the results:
    • Compare the p-value to the significance level () to make a decision.
    • A low p-value (typically ) indicates that the observed and expected distributions differ significantly.

Example: Goodness of Fit Test

Let’s perform a Goodness of Fit test on the following data:

ColorFrequencyObserved CountsExpected Counts
Brown.125339335.0
Blue.25583670.0
Yellow.125359335.0
Orange.25493670.0
Green.125515335.0
Red.125391335.0
Total126802680.0

Step 1: Calculate

Using the formula:

We calculate for each color:

  1. Brown:
  2. Blue:
  3. Yellow:
  4. Orange:
  5. Green:
  6. Red:

Summing these gives:

Step 2: Interpret Results

Compare to the critical value from the Chi Squared table (or use the p-value from your calculator).

If is greater than the critical value, or if the p-value is less than , reject the null hypothesis that the distributions are the same.