Let's say I have two samples of results of two bernoulli experiments.
$H_0: p_1 = p_2$
$H_1: p_1 \neq p_2$
And I want to try to reject $H_0$ at a confidence level.
I already know a proper way to solve this, but I was wondering, if I have a confidence interval for $p_1$ and $p_2$, at the same level of significance. Can I just check if the intervals overlaps each other to test this ?
Suppose the confidence intervals $I_j$ have the property that $p \in I_j$ with probability $\ge 1-\alpha$. Then under the null hypothesis, $p \in I_1 \cap I_2$ with probability $\ge (1-\alpha)^2 = 1 - 2 \alpha + \alpha^2$, so this is a lower bound for the probability that $I_1$ and $I_2$ intersect. Thus if they don't intersect, you can reject H_0 with confidence level at most $2 \alpha - \alpha^2$. The true confidence level is presumably better than that, but without more analysis we don't know how much better.