1

Using the traditional formula, a $95\%$ CI for $p_1 - p_2$ is to be constructed based on equal sample sizes from the two populations. For what value of $n ( = m)$ will the resulting interval have width at most $0.1$ irrespective of the results of the sampling?

The CI in question is: $\hat{p}_1 - \hat{p}_2 \pm z_{0.025} \sqrt{\frac{\hat{p_1}\hat{q_1}}{m} + \frac{\hat{p_2}\hat{q_2}}{n} } $

$\hat{p_1} = X/m$ and $\hat{p_2} = Y/n$ , where $X \in bin(m,p_1)$ and $Y \in bin(n,p_2)$, The CI given above is for the difference between population proportions!

My attempt is this:

$\Bigg \vert \hat{p}_1 - \hat{p}_2 + z_{0.025} \sqrt{\frac{\hat{p_1}\hat{q_1} +\hat{p_2}\hat{q_2} }{m} } - \Big ( \hat{p}_1 - \hat{p}_2 - z_{0.025} \sqrt{\frac{\hat{p_1}\hat{q_1} +\hat{p_2}\hat{q_2} }{m} + } \Big ) \Bigg\vert \leq 0.1 $

what i come to is:

$2 \cdot z_{0.025}\sqrt{\frac{\hat{p_1}\hat{q_1} +\hat{p_2}\hat{q_2} }{m} } \leq 0.1$

The problem is the $\hat{p}_1\hat{q}_1$ and $\hat{p}_2\hat{q}_2$, since they are: $(x/m) \cdot(1-x/m) $ and $(y/m) \cdot(1- y/m)$ i need the values of $x$ and $y$ unless i can cancel them somewhere in the calculations but i can't see how.

Danny
  • 1,547

1 Answers1

1

Starting from the expression giving the interval width $w$ as

$$w=2 \cdot z_{0.025}\sqrt{\frac{\hat{p_1}\hat{q_1} +\hat{p_2}\hat{q_2} }{m} }$$

we can note that $w$ is positively related with the quantity $j=\hat{p_1}\hat{q_1} +\hat{p_2}\hat{q_2}$. Since the problem asks to find a value of $m$ for which the interval width is at most $0.1$, we can substitute to $j$ its maximal possible value $j_{max}$ and find the value of $m$ that, under this condition, gives $w=0.1$. This value of $m$ ensures that the interval width is at most $ 0.1$ irrespective of $j$ (in fact, because of the positive relation between $w$ and $j$, for any value of $j \leq j_{max}$ we necessarily have $w \leq 0.1$).

To calculate $j_{max}$, we can observe that both $\hat{p_1}\hat{q_1} $ and $\hat{p_2}\hat{q_2} $ range between $0$ (when $p=0$ and $q=1-p=1$ or vice versa) and $ \frac{1}{4}$ (when $p=q= \frac{1}{2}$). The value of $j_{max}$ is then $ \frac{1}{4}+\frac{1}{4}=\frac{1}{2}$.

Now it remains to make the substitution $\hat{p_1}\hat{q_1} +\hat{p_2}\hat{q_2}=\frac{1}{2}$ in the last equation reported in the OP:

$$2 \cdot z_{0.025}\sqrt{\frac{1}{(2m)} } \leq 0.1$$

and then

$$m\geq \frac{ 4 \cdot z^2_{0.025} }{2 \cdot 0.10^2}$$

from which the value of $m$ is obtained.

Anatoly
  • 17,079