A two proportion z-test is used to test for a difference between two population proportions.
The easiest way to perform a two proportion z-test in SPSS is by using Analyze> Descriptive Statistics > Crosstabs.
The following example shows how to do so in practice.
Example: Two Proportion Z-Test in SPSS
Suppose a teacher believes that the proportion of her students in both of her classes who prefer a specific teaching method is equal.
To test this, she surveys the 30 students in each class and receives the following results:
- Class A Size: 30
- Count in Class A who prefer method: 23
- Class B Size: 30
- Count in Class B who prefer method: 18
Here is how to enter this data into SPSS:
Before we perform the two proportion z-test to determine if the two proportions are equal, we must first weight the cases.
To do so, click the Data tab, then click Weight Cases.
In the new window that appears, drag the Count variable into the Frequency variable panel:
Then click OK.
Then click the Analyze tab, then click Descriptive Statistics, then click Crosstabs:
In the new window that appears, drag the Class variable to the Rows panel and drag the Preference variable to the Columns panel:
Then click the Statistics button.
In the new window that appears, check the box next to Chi-square:
Then click Continue. Then click OK.
The following output will be generated:
The two-tailed p-value for the two proportion z-test is shown in the final table of the output in the Pearson Chi-Square row.
In this particular example the p-value for the two proportion z-test is .165.
The two proportion z-test uses the following hypotheses:
- H0: The two population proportions are equal.
- HA: The two population proportions are not equal.
Since our p-value (.165) is less than .05, we fail to reject the null hypothesis.
Thus, we do not have sufficient evidence to say that the proportion of students in each class who prefer the specific teaching method is different.
Bonus: You can also use the Statology Two Proportion Z-Test Calculator.
The following tutorials explain how to perform other common tasks in SPSS: