In a chi-square test of association, what are the "dependent" variables? The chi-square test of association is used to determine if there is an association between two categorical variables.
In statistics, we call "dependent variable" a variable that is supposed to depend on the values of other variables, which are called "independent variables".
In regression, it is really clear which variable is dependent (the y that we are trying to predict) and which ones are independent (the xs predictors)
However it is not at all clear to me what are the "independent" and "dependent" variables in a chi-square test of association between variable A and B.
The options I see are:

*

*Both A and B are dependent variable; there is no independent variable

*Either A is dependent and B is independent, or A is independent and B is dependent. The variable that is hypothesized to cause the other is the independent variable, and the other is the dependent variable. If we don't know which one causes which, we pick randomly.

*Both A and B are independent variables; the dependent variable is actually the frequency (count) of each combination of A & B.

*The independent / dependent variable framework is inappropriate for chi-square tests of association

I read some support for all of these positions, so I'm confused as to which interpretation is preferable.
 A: It is always difficult to deal with the issues of statistical dependence and causality.
In a regression (or other data analysis models) one (or more) variable "depends" on others. With regression models, we are looking for statistical dependence (and maybe causality).
The chi-squared test is an association test between two categorical variables.
Let's take a couple of examples:

*

*the presence of cinema and McDonald's on the same street. Surely you will find an association between the two variables but with the chi-square test, you cannot establish which is the independent.


*If, on the other hand, you study the association between gender and the propensity to use medicines, the association is less obvious (to be tested with the chi-square test) but certainly, gender is to be considered independent as it is a temporal antecedent.
However, the chi-square test puts the two variables (gender and propensity) on the same level, without defining a priori the independent and the dependent one.
A: For the Chi-Square test you assume (the Null Hypothesis) the two variables are independent.  If you reject the Null then you conclude the two variables are dependent on each other.
