# A question about the test statistic for testing the difference in two population proportions

For independent samples $$X_1,\cdots,X_n$$from $$\textit{Bernoulli }(p_1)$$ and $$Y_1,\cdots,Y_m$$ from $$\textit{Bernoulli }(p_2)$$,where $$n$$ and $$m$$ are large. Then,the Central Limit Theorem tell us $$\frac{\bar X_n-p_1}{\sqrt{\frac{p_1(1-p_1)}{n}}}$$ converges in distribution to $$\textit{Normal }(0,1)$$ and $$\frac{\bar Y_m-p_2}{\sqrt{\frac{p_2(1-p_2)}{m}}}$$ converges in distribution to $$\textit{Normal } (0,1)$$.Can we get $$\frac{(\bar X_n-\bar Y_m)-(p_1-p_2)}{\sqrt{\frac{p_1(1-p_1)}{n}+\frac{p_2(1-p_2)}{m}}}$$ converges in distribution to $$\textit{Normal }(0,1)$$, when $$n$$ and $$m$$ are large enough?

I cannot find some conclusions said that if $$X_n$$ converges in distribution to $$X$$ and $$Y_n$$ converges in distribution to $$Y$$,then $$X_n\pm Y_{n}$$ converges in distribution to $$X\pm Y.$$

In hypothesis test concerning the difference between two population proportions, we consider two binomial populations with parameters $$n$$, $$p_1$$ and $$m$$, $$p_2$$, respectively, where $$n$$ and $$m$$ are large. Then, we are usually interested in testing hypotheses such as $$H_0: p_1 − p_2 \leq 0 \quad\textrm{versus}\quad H_1: p_1 − p_2 > 0 \quad (a)$$$$H_0: p_1 − p_2 \geq 0 \quad\textrm{ versus}\quad H_1: p_1 − p_2 < 0 \quad (b)$$$$H_0: p_1 − p_2 = 0 \quad\textrm{ versus}\quad H_1: p_1 − p_2 \ne 0 \quad (c)$$ Why we assume that the test statistic $$T= \frac{(\hat{p}_1-\hat{p}_2)-(p_1-p_2)}{\sqrt{\frac{p_1(1-p_1)}{n}+\frac{p_2(1-p_2)}{m}}}$$,where $$\hat{p}_1=\frac{1}{n}\sum_{i=1}^{n}x_{i}$$and $$\hat{p}_2=\frac{1}{m}\sum_{k=1}^{m}y_{k}$$, is approximately distributed by the standard normal $$\textit{Normal }(0, 1)$$?

• There are several versions of this test. One uses the separate variances estimate of the standard error of your $T$ and another uses $p_1 = p_2$ from the null hypothesis. The latter estimates $p$ by $\tilde p = \frac{\sum X_i+\sum Y_i}{n+m}$ and gets the denominator of the test statistic from there. // The first version has the advantage that one 95% CI for $p_1-p_2$ does not contain $0$ precisely when $H_0$ is rejected at the 5% level. (That is, 'inverting the test' at 5% level, gives a 95% CI.) This version seems to be equivalent to prop.test in R, if 'continuity correction' is declined. Mar 7, 2022 at 7:53
• Not sure, but maybe halfway through your question, you're looking for Slutsky's Theorem. Also, the second version of the test is discussed on this page of the NIST Handbook. (Notation differs from yours, but it's the same thing.) Mar 7, 2022 at 8:11

Comments continued to show Examples of prop.test and chisq.test in R:

(1) $$\hat p_1 = 20/100$$ is not significantly different from $$\hat p_2 = 48/200$$ at 5% level.

prop.test(c(20,48), c(100,200), cor=F)

2-sample test for equality of proportions
without continuity correction

data:  c(20, 42) out of c(100, 200)
X-squared = 0.040661, df = 1, p-value = 0.8402
alternative hypothesis: two.sided
95 percent confidence interval:
-0.10660654  0.08660654
sample estimates:
prop 1 prop 2
0.20   0.21


This test is equivalent to a chi-squared test on a $$2\times 2$$ table of counts. The P-values are identical.

prop.test(c(20,42), c(100,200), cor=F)$$p.val [1] 0.8401929 TAB1 = rbind(c(20,42),c(80,158)); TAB1 [,1] [,2] [1,] 20 42 [2,] 80 158 chisq.test(TAB1,cor=F)$$p.val
[1] 0.8401929


(2) $$\hat p_1 = 20/100$$ is significantly different from $$\hat p_2 = 66/200$$ at 5% level.

prop.test(c(20,66), c(100,200), cor=F)

2-sample test for equality of proportions
without continuity correction

data:  c(20, 66) out of c(100, 200)
X-squared = 5.5097, df = 1, p-value = 0.01891
alternative hypothesis: two.sided
95 percent confidence interval:
-0.23194639 -0.02805361
sample estimates:
prop 1 prop 2
0.20   0.33

• In the output of prop.test, the use of uppercase chi, X, rather than $\chi$ is probably due to ubiquitous availability of the X font. If you were publishing the $\chi$-squared statistic you would use $\chi$? Mar 7, 2022 at 10:31
• Yes, for a symbol I'd use $\chi$ or $\chi^2,$ but maybe better to say 'chi-squared statistic'. As you've noted there is no standard symbol. Sometimes I've seen $Q$ or $H.$ Mar 7, 2022 at 15:56