Consider the variables sex (male or female) and political party affiliation (Democrat or Republican). In this case, the null hypothesis and alternative hypothesis would be:
- H0: Sex is independent from political party affiliation.
- H1: Sex and political party affiliation are related.
I understand that a chi square test of independence can be used if I'm checking whether two categorical variables are dependent, so that's what I would use here.
However, what if I want to perform a test such as the below:
- H0: Sex is independent from political party affiliation.
- H1: Men are more likely to be democrats than women.
Chi square only tests for independence so I feel like it wouldn't provide enough information. But then what kind of test could be used here? How would one go about solving this problem?