Wiki Page, Math 13 - Perez Sandbox : Directions: Chi-square Test for Independence (Summarized Data)

Wiki Page
2026-01-17T21:14:56-08:00

These directions assume you are using summarized data to conduct the Chi-square test.

Open StatCrunch. You will not upload a datafile. With a blank worksheet open in StatCrunch:

In column 1, click on the title var1. Replace on the title var1 with the name of the explanatory variable. For example, if Gender is the explanatory variable, you will replace the title var1 with Gender.

Enter the categories (group names) for the explanatory variable in column 1. For example, if Gender is the explanatory variable, you would enter Male in row 1, column 1. And you would enter Female in row 2, column 1. Using Gender as the example, here is what the StatCrunch worksheet would look like.

In the next columns we will record the responses.

In column 2, replace the title var2 with a description of one value of the response variable. For example, if the response variable is Drank Alcohol with the values yes/no, you would replace var2 with Alcohol - Yes. In this column enter the values of this response for each row. Using Gender / Drank Alcohol as the example, here is what the StatCrunch worksheet would look like.

In column 3, replace the title var3 with a description of next value of the response variable. For example, if the response variable is Drank Alcohol with the values yes/no, you would replace var3 with Alcohol - No. In this column enter the values of this response for each row. Using Gender / Drank Alcohol as the example, here is what the StatCrunch worksheet would look like.

Do not include the totals. Now we are ready to conduct the Chi-square test.

Choose Stat Tables Contingency With Summary

Under the Select column(s): heading click on each group associated with the response variable. For example, if Drank Alcohol is the response variable, you would click Alcohol Yes and then Alcohol No one at a time to move each to the white box on the right. (Note: you may need to hold down the ctrl key or the command key to select groups.)

Use the Row labels: drop-down menu to select the explanatory variable.

Under the Display: heading select Expected Count

Under the Hypothesis tests: heading select Chi-Square test for independence

Press Compute!