How to create a crosstabulation and associated chi-square test in SPSS

From WikiEducator
Jump to: navigation, search


A crosstabulation (crosstabs for short) requires two categorical variables. There are two ways the data may be organized in the data file:

  1. As raw data, wherein each row (representing each individual in the sample) includes values for the two categorical variables. No data prep is needed before running the crosstabs.
  2. As summarized data, wherein each row in the dataset represents one cell of the crosstabs. In this instance there are three variables, one for each of the categorical variables and one containing the count/frequency for each combination of values. For example, one row might indicate that the variable sex is "M", the variable status is "pass", and the variable count is "37". (If a dataset with the data is unavailable, it is straightforward to enter this data into SPSS in the data window from a reported table of counts.)
    In this case you will need to weight each row with the count before running the crosstabs.
    • Select Data > Weight Cases..."'.
    • Choose the Weight cases by option.
    • Move the count variable into the Frequency Variable window.
    • Click OK.

Before running the analysis you should check to be sure that each of the variables has a well worded label and that the values for each variable have been defined. You can define variable labels and values in the Variables tab in the data window, or by clicking Data > Define Variable Properties... and then using the resulting dialog boxes.

Now you are set to run the Crosstabs and chi square analysis.

  • Select Analyze > Descriptives Statistics > Crosstabs...

The Crosstabs dialog displays.

  • Select the variable that will serve as the explanatory variable and use the arrow button to move it to the Columns window.
  • Select the variable that will serve as the response variable and use the arrow button to move it to the Rows window.
  • Click the option Display clustered bar charts at the bottom.

To include a chi-square analysis:

  • Click the Statistics... button.

The Crosstabs:Statistics dialog box displays.

  • Check the Chi-square option.
  • Click Continue.

To include expected counts and conditional and cell percents in the crosstabs:

  • Click the Cells... button.

The Crosstabs: Cell Display dialog displays. Check the relevant boxes. These additional statistics, in particular expected counts and column percentages, will be useful in interpreting a significant chi-square.

  • When you have completed the selections, click Continue.

The analyses have been fully specified.

  • Click OK to run the analysis.