Solved – Large overlap between confidence intervals, although z test for difference was significant

confidence intervalproportion;z-test

I have calculated a z test to examine the difference between two proportions. I found differences to be significant. The formula I used was:

$$z = (p_1-p_2)/SE$$
where
$$SE = \sqrt{ p ( 1 – p ) ( \frac{1}{n_1} + \frac{1}{n_2} ) }$$

and $n_1$ is the sample size of sample 1, $n_2$ sample size of sample 2.

I have also plotted a bar graph of my proportions with 95% confidence intervals around each of the two proportions based on this equation:

For proportion 1:
$p_1 \pm 1.96SE$

$SE = \sqrt{p(p-1)/ n_1}$; $n_1$: size of the sample 1

For proportion 2:

$p_2 \pm 1.96SE$

$SE = \sqrt{p(p-1)/ n_2}$; $n_2$: size of the sample 2

I would not expect the CIs to overlap much based on significant of z test. However, they overlap by more than 25%. Am I using the correct formula for the confidence intervals? If so why does there seem to be discrepancy between the results of the z test and the visual depiction of the difference

Best Answer

Statistics is a pretty large field and it is good to invest in understanding the fundamentals before attempting to use statistics. What you stated is a common misconception about statistics. Individual confidence intervals make an inference about one quantity of interest. You need a confidence interval for the difference in two such quantities. There are many confidence intervals developed for the difference in two probabilities. It is easy to have individual intervals overlap whereas the interval for the difference excludes zero. The converse is not true however. If the interval for the difference includes zero, the two individual intervals must overlap. Note that it is not typical for the two individual intervals to be of much interest in study in which subjects are not a simple random sample from the population to which inference is desired.

Related Question