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