If your null and alternative hypothesis are:

H0:p1=p2\displaystyle {H}_{{0}}:{p}_{{1}}={p}_{{2}}
H1:p1p2\displaystyle {H}_{{1}}:{p}_{{1}}≠{p}_{{2}}



Then the test is: