Let $X_1, \ldots, X_{n_X}$ and $Y_1, \ldots, Y_{n_Y}$ be $n_x$ and $n_Y$ iid observations from two independent Bernoulli populations with probabilities of success $p_X$ and $p_Y$. Define the statistics $T_X = \sum_{i=1}^{n_X}X_i$ and $T_Y = \sum_{i=1}^{n_Y}Y_i$. I am testing the hypothesis:

$$ H_0 : p_X = p_Y \ \ \ \text{and} \ \ \ H_1 : p_X \neq p_Y $$

Consider the test statistic:

$$ T = \dfrac{\hat{p}_X-\hat{p}_Y}{\sqrt{\hat{p}(1-\hat{p})\left(\frac{1}{n_X}+\frac{1}{n_Y}\right)}} $$

where $\hat{p}_X = \frac{T_X}{n_X}$ and $\hat{p}_Y = \frac{T_Y}{n_Y}$, and $\hat{p} = \frac{T_X+T_Y}{n_X+n_Y}$.

I would like to derive the asymptotic distribution of $T$ under $H_0$ as both $n_X$ and $n_Y$ go to infinity. My works is as follows: By the asymptotic properties of the MLE:

$$ \sqrt{n_X}(\hat{p}_X-p_X) \to_{D}N(0,p_X(1-p_X)) $$


$$ \sqrt{n_Y}(\hat{p}_Y-p_Y) \to_{D}N(0,p_Y(1-p_Y)) $$

I would like to find the distribution of $\hat{p}_X-\hat{p}_Y$, but am not sure how. In general two "in distribution" results are not additive. That is, it is genreally NOT the case that $X_n+Y_n \to_{D} X+Y$. Does anyone have any ideas?

I know in general that under the null:

$$ T = \dfrac{\hat{p}_X-\hat{p}_Y}{\sqrt{\hat{p}(1-\hat{p})\left(\frac{1}{n_X}+\frac{1}{n_Y}\right)}} \to_D N(0,1) $$


1 Answer 1


The OP is correct that you just cannot "add" convergence in distribution, for this you have to be aware of the covariance structure, which is fortunately enough trivial in this case.

update: Thanks for pointing out the earlier, crucial (and pretty bad) mistake. Hopefully the following answer is more or less correct...

Suppose, for the moment, that $n_Y = \lceil c n_X \rceil$, for some $c > 0$.

Define $$ \theta_X = \frac {\hat p_X - p} { \sqrt{ \left(\frac 1 {n_X} + \frac 1 {n_Y}\right) p(1-p)}} \quad \mbox{and} \quad \theta_Y = \frac {\hat p_Y - p} { \sqrt{ \left(\frac 1 {n_X} + \frac 1 {n_Y}\right) p(1-p)}},$$ so that $$T = \sqrt{\frac{p(1-p)}{\hat p(1 - \hat p)}} (\theta_X - \theta_Y).$$

Now $\theta_X$ converges in distribution to $N\left(0,\frac c {1+c} \right)$, whereas $\theta_Y$ converges in distribution to $N\left(0, \frac 1 {1 + c} \right)$, and jointly they converge to the independent product of these two distributions.

It follows that $\theta_X - \theta_Y$ converges (using the continuous mapping theorem, hopefully correctly this time) to a $N(0,1)$ distribution. Since $\hat p(1-\hat p) \rightarrow p(1-p)$ almost surely, it follows that $T \stackrel{d}{\rightarrow} N(0,1)$.

In a similar way, when e.g. $n_Y = n_X^2$ you can find that $\theta_X \stackrel{d}{\rightarrow} N(0,1)$ and $\theta_Y \stackrel{a.s.}{\rightarrow} 0$, so that again $T \stackrel{d}{\rightarrow} N(0,1)$.

Unfortunately I don't see how to avoid making some assumption on the relative growth of $n_X$ and $n_Y$, but perhaps a more general argument is possible.

  • 1
    $\begingroup$ There seems to be a gap in this argument. It has been pointed out by Sam Davenport at stats.stackexchange.com/questions/294707, who notes that standard versions of the continuous mapping theorem do not apply to functions $\phi$ that depend on the indexes $n_X$ and $n_Y$. $\endgroup$
    – whuber
    Jul 27, 2017 at 15:52
  • 1
    $\begingroup$ @whuber thanks for pointing this out; hopefully the gap in the argument has now been resolved to some extent, see the updated answer. $\endgroup$ Jul 31, 2017 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.