i have a categorical variable lets say  variable "sex" : levels (Male,Female)
 and data is divided into two groups "treated" and "not treated". which test used to find correlation for a categorical variable("sex") between two groups?


i am thinking "chi square test for independence" can be used in this case to find p.value(correlation) between two groups  but not sure whether it is  right or wrong.