# Is there a reference that legitimises the use of the unpooled z-test to compare two proportions?


$$\v(\p_1-\p_2)=\p(1-\hat{p})(1/n_1+1/n_2),$$

where

$$\p=\frac{n_1 \p_1+n_2 \p_2}{n_1+n_2}.$$

Is there any written reference that legitimizes me instead to use the unpooled variance, that is

$$\v(\p_1-\p_2)=\frac{\p_1(1-\p_1)}{n_1}+\frac{\p_2(1-\p_2)}{n_2}?$$

-

You can use whatever statistic you want, provided that you are clear about what you do and look at the appropriate null distribution to calculate p-values or thresholds.

But some statistics are better than others; in this case you'd be looking for (a) null distribution easily calculated and (b) power to detect difference.

But I don't know why you'd favor the unpooled variance over the pooled variance for the test, though it could be preferred in calculating a confidence interval for the difference.

-
 +1 That's a good discussion you found. However, it seems to fall short of really addressing the question, which is whether somehow the pooled statistic could be corrected to give the desired test size and--perhaps--yield greater power. To resolve this issue, I have provided a separate reply. – whuber♦ Oct 18 '11 at 16:05

The unpooled variance tends to be too small. This is because under the null hypothesis there will still be chance variation in the two observed proportions, although the underlying probabilities are equal. This chance variation contributes to the pooled variance but not to the unpooled variance.

As a result, $z$ for the unpooled statistic does not even approximately have a standard normal distribution. For instance, when $n_1 = n_2$ and the true probabilities are both $1/2$, the variance of $z$ is only $1/2$ instead of $1$. By using tables of the standard normal distribution, you will get incorrect p-values: they will tend to be artificially small, too often rejecting the null when the evidence is not really there.

Nevertheless, one wonders whether this could be corrected. It can. The question becomes whether a corrected value of $z$, based on unpooled estimates, could have greater power to detect deviations from the null hypothesis. A few quick simulations suggest this is not the case: the pooled test (compared to a properly adjusted unpooled test) has a better chance of rejecting the null whenever the null is false. Therefore I haven't bothered to work out the formula for the unpooled correction; it seems pointless.

In summary, the unpooled test is wrong, but with an appropriate correction, it can be made legitimate. However, it appears to be inferior to the pooled test.

-
 You say "For instance, when $n_1=n_2$ and the true probabilities are both 1/2, the variance of z is only 1/2 instead of 1." But if the unpooled variance is too small, the variance of z should be too large, and I would think it would be only slightly too large. – Karl Oct 18 '11 at 16:35 Forgive me but I am unable to follow your example. Why should the variance of $z$ be 1? Which values are you assuming for $\hat{p}_1$ and $\hat{p}_2$? – glassy Oct 20 '11 at 11:46 @glassy $z$ has (asymptotically) unit variance by construction: the difference $\hat{p_1}-\hat{p_1}$ has been standardized by dividing it by its estimated variance. – whuber♦ Oct 20 '11 at 15:23 I don't want to bother you but really I do not undertand why if $z$ has unit variance by construction you state that its variance can be $1/2$. It seems to me that its variance is equal to $\hat{p}(1-\hat{p})\frac{2}{n}$ in a case and $\frac{\hat{p}_1(1-\hat{p}_1)}{n}+\frac{\hat{p}_2(1-\hat{p}_2)}{n}$ in the other. Sorry, I do not understand how these quantities have a 2:1 ratio. Indeed, in the case $\hat{p}_1=\hat{p}_2$ they are the same. – glassy Oct 20 '11 at 20:23 @glassy It's a good question. By construction, z for the pooled data has asymptotically unit variance (and an approximate Student t distribution). When you use the unpooled estimate of variance, $z$ no longer has that variance, nor does it have the Student t distribution. This can be corrected by rescaling $z$, but it doesn't lead to a good test, because it's not as good at discriminating small differences in proportions. – whuber♦ Oct 20 '11 at 20:59