Where \(g_1\) and \(g_2\) are the two proportions, \(n\) is the sample size, and \(s_{g_1 - g_2} \) is an estimate of the standard error of the difference between the proportions:
\[\begin{align} t=\frac{g_1-g_2}{s_{g_1-g_2}} \end{align}\]
where:
\(p = 2\Pr(t_v \ge |t|)\),
\(v = n - 1\),
\(s_{g_1 - g_2} \) is computed as the Standard Error (see Statistics) of \(d\),
the value for the \(i\)th observation is computed as \(d_i = x_1 - x_2\),
\(x_1,x_2 \in {\{0,1\}}\) are the observed values on the two variables.