# What test to use to compare two categorical variables in groups

#### chryant

##### New Member
Hi everyone. I am a university student and I am trying to find the appropriate test to compare two categorical variables.
The independent variable is Sexual orientation which has 4 possible selections (0,1,3,4) and the dependent is the shopping category which has 2 possible selections (0 or 1).
What is want to compare is if 0 and 1 from the independent variable have any statistically significant difference as to their selection of 0 and 1's for the dependent variable and if 3 and 4 from the independent variable have any statistically significant difference as to their selection of 0 and 1's for the dependent variable.

For the dependent variable 1 stands for selected and 0 stands for not selected I want to know if there is any statistical significance among the two groups of the independent variables selections mentioned above.

#### Karabiner

##### TS Contributor
Höhe large are the four sexual orientation groups? How frequent were selection and nomselection?

With kind regards

Karabiner

#### chryant

##### New Member
Höhe large are the four sexual orientation groups? How frequent were selection and nomselection?

With kind regards

Karabiner
I had around 315 responses and the four sexual groups are from 50 - 120 depending (not evenly distributed) the aim is to actually see if there are any differences among the frequency of selection (with statistical significance) and non-selection among the groups ( let's say if Gay Men shop more groceries than Straight men). The other part of the question is whether sexual orientations spend differently for each category so the independent variable is again sexual orientation and the dependent will be the amount spent (with four distinct selections).

Any ideas?

#### Karabiner

##### TS Contributor
So two 2*2 tables with Chi square tests for your focused comparisons seem appropriate.

With kind regards

Karabiner

#### chryant

##### New Member
So two 2*2 tables with Chi square tests for your focused comparisons seem appropriate.

With kind regards

Karabiner

Thank you for your support! A 4x4 will also do correctl? The tests are run individually anyway right?

Last edited: