I'm trying to solve the second question of problem 3 of this problem set and having touble finding asymptotic covariance matrix of the three estimators (question 2(b)).
To summarize, there are two random variables $X_i\sim Ber(p), iid$ and $Y_i\sim Ber(q), iid$. Three estimators $\hat{p}=\frac{1}{n}\sum_{i=1}^{n}{X_i}, \hat{q}=\frac{1}{n}\sum_{i=1}^{n}{Y_i}$ and $\hat{r}=\frac{1}{n}\sum_{i=1}^{n}{X_{i}Y_{i}}$ for $p=P[X=1]$, $q=P[Y=1]$ and $r=P[X=1,Y=1]$. The goal of the problem is to find a test that could determine whether the two random variables are independent, which is equivalent to $r=pq$. Asymptotic covariance of the three estimators is required inorder to form the pivotal distribution for some statistic that would be used for the test.
I understand that diagonal components of the asymptotic covariance matrix can be obtained from central limit theorem. For the non-diagonal components, I tried finding them individually.
From CLT as $n\rightarrow \inf$, $$ \sqrt{n}(\hat{p}-p) \rightarrow N(0, Var[X])$$ So I know that the first diagonal element of the asymptotic covariance matrix is $\Sigma_{1,1}=Var[X]=p(1-p)$. Same goes for $\hat{q}$ and $\hat{r}$.
Now for other components of $\Sigma$, \begin{align} Cov(\hat{p}, \hat{q}) & = E[\hat{p}\hat{q}]-E[\hat{p}]E[\hat{q}] \\ & = E[\frac{1}{n}\sum_{i=1}^{n}{X_i}\frac{1}{n}\sum_{i=1}^{n}{Y_i}]-pq \\ & = \frac{1}{n^2}E[n^2X_1Y_1]-pq\quad(\text{because of iid}) \\ & = r-pq \end{align} and \begin{align} Cov(\hat{p}, \hat{r}) & = E[\hat{p}\hat{r}]-E[\hat{p}]E[\hat{r}] \\ & = \frac{1}{n^2}E[{\sum_{i=1}^{n}X_i}{\sum_{i=1}^{n}X_{i}Y_{i}}]-pr \\ & = \frac{1}{n^2}E[nX_1X_1Y_1+n(n-1)X_1X_2Y_2]-pr\quad(\text{because of iid}) \\ & = \frac{1}{n^2}[nr + n(n-1)\frac{r^2}{q}]-pr \end{align}
I have a three questions:
- Is this the correct way of finding asymptotic covariance?
- Is my $Cov(\hat{p}, \hat{q})=r-pq$ asymptotic?
- $Cov(\hat{p}, \hat{q})$ seems correct because if I substitute $r=pq$, it becomes $0$. However, my calculation of $Cov(\hat{p}, \hat{r})$ seems to be off using the same logic and I'm not sure why.