Testing significance for two groups with dichotomous variables Is a 2x2 table/Chi-square test an appropriate method if I have a set of data with two dichotomous variables like so:




Location
Heavy User
Very Heavy User




Urban
10
5


Rural
20
30




or similarly




Location
Male
Female




Urban
10
5


Rural
20
30




I want to test to see if either group is significantly more likely to be in a certain location (e.g. those in rural locations are more likely to be female, or those in rural locations are more likely to be very heavy users).
I am slightly confused as neither variable is a simple positive or negative, which most examples work through (e.g. smoking or non-smoking status).

Yes, this is perfectly fine, as this would constitute a chi-square test of independence. For some examples of chi-square tests, check this link. The one very minor caveat I would make here is that you should be certain that the "urban" and "rural" populations are actually distinct. It is one of a handful of assumptions required for chi-square testing that the groups are totally independent. With geographical location, this might be a bit gray, but I think this would still be reasonable to run.
Remember though that chi-square tests don't speak much about the directionality of relationships, only that the frequencies are different than what we would expect under the null hypothesis. You can say that some groups constitute more weight in the relationship by looking at the observed frequencies and seeing which are abnormally high/low, but this isn't formally tested under the chi-square test. As an example of why, check this answer.
