Suppose I have random variables $$ W_i = \begin{cases} w_1 &\text{with prob. } p_1, \\ w_2 &\text{with prob. } p_2, \\ w &\text{with prob. } 1-p_1-p_2,\end{cases} \qquad i = 1, \dots, 2n+1. $$ The values $w_1, w_2$ and $w$ are distinct. I am interested whether the ordered pair $(w_1,w_2)$ occurs unusually often. Specifically, I would like to test whether $$ P(W_i = w_1, W_{i+1} = w_2) = P(W_i = w_1) P(W_{i+1} = w_2) \quad \text{ for all } i = 1, \dots, 2n. $$ Edit: The null hypothesis is that the $W_i$ are independent.
My approach is to define the random variables $$ X_i = \begin{cases} 1 &\text{if } W_i = w_1 \text{ and } W_{i+1} = w_2, \\ 0 &\text{otherwise,} \end{cases} \quad i = 1, \dots, 2n. $$ Let $p = p_1 p_2 = P(W_i = w_1) P(W_{i+1} = w_2).$ Then (under the null hypothesis) $E[X_i] = p$ and $\text{Var}(X_i) = p(1-p).$ With $\overline{X} = \frac1{2n} \sum_{i=1}^{2n} X_i,$ I can define my $t$-statistic $$ T = \sqrt{2n} \frac{\overline{X}-p}{\sqrt{p(1-p)}}. $$ But is it indeed true that $T \xrightarrow{d} \mathcal{N}(0,1)$? Possibly not! To see this, suppose that $X_i = 1.$ Then $W_{i+1} = w_2 \neq w_1$, which implies $X_{i+1} = 0.$ Hence neighboring $X_i$ are not independent, and the (standard) central limit theorem is inapplicable.
Is it still possible to determine the approximate distribution of $T$?
I had the following idea: Define $\overline{X}_1 = \frac1n \sum_{i=1}^{2n} X_{2i-1}$ and $\overline{X}_2 = \frac1n \sum_{i=1}^{2n} X_{2i}.$ These sums do not contain neighboring random variables, hence the $t$-statistics $$ T_1 = \sqrt{n} \frac{\overline{X}_1 - p}{\sqrt{p(1-p)}} \quad \text{ and } \quad T_2 = \sqrt{n} \frac{\overline{X}_2 - p}{\sqrt{p(1-p)}} $$ satisfy $T_1, T_2 \xrightarrow{d} \mathcal{N}(0,1).$ Furthermore, $T = (T_1 + T_2) / \sqrt{2}.$
By the arguments above, $P(X_i = X_{i+1} = 1) = 0,$ hence $$ \text{Cov}(X_i, X_{i+1}) = E[X_i X_{i+1}] - p^2 = - p^2. $$ Similarly, $\text{Cov}(X_i, X_{i-1}) = -p^2.$ All other covariances are zero. Since every $X_i$ has two neighbors, except for $X_1$ and $X_{2n}$, $$ \text{Cov}\Big(\frac{T_1}{\sqrt{2}},\frac{T_2}{\sqrt{2}}\Big) = \frac1{2np(1-p)} \sum_{i,j=1}^{2n} \text{Cov}(X_{2i-1},X_{2j}) = - \frac{(2n-2)p^2}{2np(1-p)} = - \frac{(n-1)p}{n(1-p)}. $$
I now thought of the following result: If $A,B \sim \mathcal{N}(0,1),$ then $(A+B)/\sqrt{2} \sim \mathcal{N}(0,1+\rho_{A,B}),$ where $\rho_{A,B}$ is the correlation coefficient of $A$ and $B$.
Hence my question:
Is the distribution of $T / \sqrt{p(1-p)-\frac{(n-1)}{n}p^2}$$T / \sqrt{1-\frac{(n-1)p}{n(1-p)}}$ approximately standard normal?