Where \(g_t\) is the proportion in the total sample and \(g_s\) is the proportion in the sub-group, \(n_t\) and \(n_s\) are their respective effective sample sizes, and \(w_s\) is the proportion of the total population in sub-group \(s\):
\[\begin{align} t=\frac{g_t - g_s}{(1 - w_s)\sqrt{d_{eff}(se^2_s + se^2_k)}} \end{align},\]
where:
\[\begin{align} p = 2\Pr(t_v \ge |t|) \end{align},\]
\[\begin{align} g_k = (g_t-g_s w_s)/(1-w_s) \end{align},\]
\[\begin{align} se_k = \sqrt{\frac{g_k(1 - g_k)}{n_t - n_s - b}} \end{align},\]
\[\begin{align} se_g = \sqrt{\frac{g_g(1 - g_g)}{n_s -b}} \end{align},\]
\[\begin{align} v = \frac{(\frac{se^2_s}{n_s} +\frac{se^2_k}{n_k} )^2}{\frac{(\frac{se^2_s}{n_s})^2}{n_s-b}+\frac{(\frac{se^2_k}{n_k})^2}{n_k-b} } \end{align},\] or, if Weights and significance is set to Un-weighted sample size in tests (see Weights, Effective Sample Size and Design Effects), \(v = n_t - 2b\)
\(b\) is 1 if Bessel's correction is selected for Proportions in Statistical Assumptions and 0 otherwise,
\(d_{eff}\) is Extra Deff (see Weights, Effective Sample Size and Design Effects), and
\(w_s\) is the proportion of the Population represented by the sub-group.