Data Intelligence, Business Analytics
I know this is a basic question. I'm learning and thanks for all your help (in advance.)
I have one variable and it's an indicator variable. Respondents get a 1 if they are in one category; 2 if they are in the other. I want to determine if the number of 1 is statistically different than 2.
What test do I use?
The two groups are to be compared for gender, a categorical variable in Nominal scale. The associated hypothesis may be any of the following depending upon observed proportions of male/female and the problem. If the problem is to compare the general belief that males and females are equally distributed, the hypothesis may be
1. Proportion of male is equal to proportion of females VS proportion of males is not equal to proportion of females. (A two tailed test for proportions withH0:P = 0.5 vs H1:P not= 0.5)
2. If Proportion of males is equal to proportion of females VS proportion of males is greater than proportion of females. (One tail/right tail test for proportions with H0: P=0.5 vs P > 0.5)
3. If Proportion of males is equal to proportion of females VS proportion of males is lessr than proportion of females. (One tail/left tail test for proportions with H0: P=0.5 vs P < 0.5)
The same test can be done for special situations replacing 0.5 by any other intended proportion. For example in a consumer preference survey, you may wish to test if proportion of males having preference for a product is more than 0.3 or proportion of females having preference for a product is more than 0.6 and the like.
What your trying to do is known as "Establishing relationship between two categorical variables" in the language of statistics.
Chi-square test is very popular technique to perform this test.
You can compare the means of 2 groups using a simple T-test (look up the ratio in the table of significance to decide if it is significant enough for chance findings)
Actually both answers are correct depending upon the assumptions: You can use a Z-test if you assume the probability of success is ~ .5 (coin flip) and you have a high number of responses. If you are not willing to make those assumptions, use a chi-square test.
There are two forms of the chi-square test. One is of them is the one-way (or goodness of fit) test. In this case, the goal is to determine whether a set of frequencies or proportions is similar to a hypothesized set of frequencies or proportions. So in that regard, this form of the chi-square test is akin to a one-sample t-test, but without the assumptions.