Login

Chi-Square Test for Association using SPSS Statistics

Introduction

The chi-square test for independence, also called Pearson's chi-square test or the chi-square test of association, is used to discover if there is a relationship between two categorical variables.

SPSS Statistics

Assumptions

When you choose to analyse your data using a chi-square test for independence, you need to make sure that the data you want to analyse "passes" two assumptions. You need to do this because it is only appropriate to use a chi-square test for independence if your data passes these two assumptions. If it does not, you cannot use a chi-square test for independence. These two assumptions are:

In the section, Procedure, we illustrate the SPSS Statistics procedure to perform a chi-square test for independence. First, we introduce the example that is used in this guide.

SPSS Statistics

Example

Educators are always looking for novel ways in which to teach statistics to undergraduates as part of a non-statistics degree course (e.g., psychology). With current technology, it is possible to present how-to guides for statistical programs online instead of in a book. However, different people learn in different ways. An educator would like to know whether gender (male/female) is associated with the preferred type of learning medium (online vs. books). Therefore, we have two nominal variables: Gender (male/female) and Preferred Learning Medium (online/books).

SPSS Statistics

Setup in SPSS Statistics

In SPSS Statistics, we created two variables so that we could enter our data: Gender and Preferred_Learning_Medium. In our enhanced chi-square test for independence guide, we show you how to correctly enter data in SPSS Statistics to run a chi-square test for independence. Alternately, see our generic, "quick start" guide: Entering Data in SPSS Statistics.

Testimonials
TAKE THE TOUR


SPSS Statistics

Test Procedure in SPSS Statistics

The 13 steps below show you how to analyse your data using a chi-square test for independence in SPSS Statistics. At the end of these 13 steps, we show you how to interpret the results from your chi-square test for independence.

  1. Click Analyze > Descriptives Statistics > Crosstabs... on the top menu, as shown below:
    Shows the menu for the chi-square test of independence in SPSS Statistics

    Published with written permission from SPSS Statistics, IBM Corporation.

  2. You will be presented with the following Crosstabs dialogue box:
    'Crosstabs' dialogue box for the chi-square test of independence in SPSS Statistics

    Published with written permission from SPSS Statistics, IBM Corporation.

  3. Transfer one of the variables into the Row(s): box and the other variable into the Column(s): box. In our example, we will transfer the Gender variable into the Row(s): box and Preferred_Learning_Medium into the Column(s): box. There are two ways to do this. You can either: (1) highlight the variable with your mouse and then use the relevant Right arrow button buttons to transfer the variables; or (2) drag-and-drop the variables. How do you know which variable goes in the row or column box? There is no right or wrong way. It will depend on how you want to present your data.

    If you want to display clustered bar charts (recommended), make sure that Display clustered bar charts checkbox is ticked.

    You will end up with a screen similar to the one below:
    'Crosstabs' dialogue box. 'Gender' & 'Preferred_Learning_Medium' transferred into 'Row(s)' & 'Column(s)' boxes respectively

    Published with written permission from SPSS Statistics, IBM Corporation.

  4. Click on the Statistics button. You will be presented with the following Crosstabs: Statistics dialogue box:
    'Crosstabs: Statistics' dialogue box for the chi-square test of independence in SPSS Statistics
  5. Select the Chi-square and Phi and Cramer's V options, as shown below:
    'Crosstabs: Statistics' where the aforementioned options have been selected

    Published with written permission from SPSS Statistics, IBM Corporation.

  6. Click on the Continue button.
  7. Click on the Cells button. You will be presented with the following Crosstabs: Cell Display dialogue box:
    'Crosstabs: Cell Display' dialogue box for the chi-square test of independence in SPSS Statistics

    Published with written permission from SPSS Statistics, IBM Corporation.

  8. Select Observed from the –Counts– area, and Row, Column and Total from the –Percentages– area, as shown below:
    'Crosstabs: Cell Display' dialogue box where the aforementioned options have been selected

    Published with written permission from SPSS Statistics, IBM Corporation.

  9. Click on the Continue button.
  10. Click on the Format button.

    Note: This next option is only really useful if you have more than two categories in one of your variables, but we will show it here in case you have. If you don't, you can skip to STEP 12.

  11. You will be presented with the following:
    'Crosstabs: Table Format' dialogue box for the chi-square test of independence in SPSS Statistics showing 'Row Order' options

    Published with written permission from SPSS Statistics, IBM Corporation.

    This option allows you to change the order of the values to either ascending or descending.

  12. Once you have made your choice, click on the Continue button.
  13. Click on the OK button to generate your output.
Join the 10,000s of students, academics and professionals who rely on Laerd Statistics.TAKE THE TOUR
SPSS Statistics

Output

You will be presented with some tables in the Output Viewer under the title "Crosstabs". The tables of note are presented below:

The Crosstabulation Table (Gender*Preferred Learning Medium Crosstabulation)

'Crosstabulation' table for the chi-square test of independence in SPSS Statistics

Published with written permission from SPSS Statistics, IBM Corporation.

This table allows us to understand that both males and females prefer to learn using online materials versus books.

The Chi-Square Tests Table

'Chi-Square Tests' table for the chi-square test of independence in SPSS Statistics. Shows statistics for Pearson Chi-Square

Published with written permission from SPSS Statistics, IBM Corporation.

When reading this table we are interested in the results of the "Pearson Chi-Square" row. We can see here that χ(1) = 0.487, p = .485. This tells us that there is no statistically significant association between Gender and Preferred Learning Medium; that is, both Males and Females equally prefer online learning versus books.

The Symmetric Measures Table

'Symmetric Measures' table for the chi-square test of independence in SPSS Statistics. Shows Phi and Cramer's V

Published with written permission from SPSS Statistics, IBM Corporation.

Phi and Cramer's V are both tests of the strength of association. We can see that the strength of association between the variables is very weak.

Bar chart

Chi-square test of independence bar chart where: y-axis = 'Counts', a-axis = 'Gender', grouped on 'Preferred Learning Medium'

Published with written permission from SPSS Statistics, IBM Corporation.

It can be easier to visualize data than read tables. The clustered bar chart option allows a relevant graph to be produced that highlights the group categories and the frequency of counts in these groups.

Join the 10,000s of students, academics and professionals who rely on Laerd Statistics.TAKE THE TOUR
1