![]() Thus the square root of the chi-square statistic is the Z statistic (up to a sign) that you get from the test of equality of two proportions. ![]() Of no association at the 0.05 significance level.Īs stated in the SAS Usage Note, this association test is equivalent to a Z test for whether the proportion of males who responded "Yes" equals the proportion of females who responded "Yes." The equivalence relies on a fact from probability theory:Ī chi-square random variable with 1 degree of freedom is the square of a random variable from the standard normal distribution. The test indicates that we should reject the null hypothesis The results show that the chi-square statistic (for 1 degree of freedom) is 4.8, which corresponds to a p-value of 0.0285. You can create the data by using the following DATA step, then call PROC FREQ to analyze the association between the response variable and gender.Īs explained in the PROC FREQ documentation, the Pearson chi-square statistic indicates an association between the variables in the 2 x 2 table. The number of men responding "Yes" is observed to be 30 and the number of women responding Yes was 45. The SAS Usage Note poses the following problem: Suppose you want to compare the proportions responding "Yes" to a question in independent samples of 100 men and 100 women. It also shows how to get this test directly from PROC FREQ by using the RISKDIFF option. This article implements the well-known test for proportions in the DATA step and compares the results to the chi-square test results. You might also wonder if there is a direct way to test the equality of proportions. You might wonder why a chi-square test for association is equivalent to a Z test for the equality of proportions. ![]() The note says to "specify the CHISQ option in the TABLES statement of PROC FREQ to compute this test," and then adds "this is equivalent to the well-known Z test for comparing two independent proportions." He was directed to the SAS Usage Note "Testing the equality of two or more proportions from independent samples." A SAS customer asked how to use SAS to conduct a Z test for the equality of two proportions. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |