# Two Sample test of proportions with dependent trials

I have data $$X_1,\ldots,X_T \qquad Y_1,\ldots,Y_T$$ where $X_i \sim \text{Categorical}(a_1,\ldots,a_k)$ and $Y_i \sim \text{Categorical}(b_1,\ldots,b_k)$, but the $X_i$ are not independent of one another (neither are $Y_i$). The $X_i$ ARE independent of $Y_i$ though.

I want to test whether $(a_1,\ldots,a_k)=(b_1,\ldots,b_k)$. Now if the $X_i$ and $Y_i$ were indepdnent then I would simply do Pearson Chi-square Test. What options do I have? What would you do?

• What data are they? Can you be more specific with an example, if there is one? What caused the dependence? Is it due to MCMC or time series? – mac Dec 15 '15 at 23:15
• dependence is due to the fact that the data come from MCMC (which you can view as a time series). – bdeonovic Dec 15 '15 at 23:23
• What about adjusting the rows (X) and columns (Y) of the table by the effective sample size of X and the effective sample size of Y? – mac Jan 11 '16 at 1:23
• thats actually what I ended up doing! – bdeonovic Jan 11 '16 at 1:26
• Ha! Is that the correct way to do it? How did you get the effective sample sizes? By fitting AR(p)? – mac Jan 11 '16 at 1:48