Before running the test, you must activate Weight Cases, and set the frequency variable as the weight.You should have three variables: one representing each category, and a third representing the number of occurrences of that particular combination of factors.The value in the "frequency" column for a given row is the number of unique subjects with that combination of categories.Each row in the dataset represents a distinct combination of the categories.Cases represent the combinations of categories for the variables.If you have frequencies (each row is a combination of factors):Īn example of using the chi-square test for this type of data can be found in the Weighting Cases tutorial.
The categorical variables used in the test must have two or more categories.
Your data may be formatted in either of the following ways: If you have the raw data (each row is a subject): The categorical variables must include at least two groups. At minimum, your data should include two categorical variables (represented in columns) that will be used in the analysis.
#HOW TO RUN A CHI SQUARE TEST IN SPSS HOW TO#
The format of the data will determine how to proceed with running the Chi-Square Test of Independence. There are two different ways in which your data may be set up initially.