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 ?