Where \(g\) is the observed proportion and \(e\) is the expected proportion and \(n\) is the effective sample size, the test statistic is:
\[\begin{align} t = \frac{g - e}{\sqrt{g(1-g)/(nd_{eff})}} \end{align}\]
where \(p \approx 2\Pr(t_{n-1} \ge |t|)\) if \(g \ne e \) and NaN otherwise, and \(d_{eff}\) is Extra deff (see Weights, Effective Sample Size and Design Effects).
Note that if you wish to replicate results from IBM SPSS Data Collection products (including Survey Reporter and Quantum) additional settings need to be modified (see How to Replicate Survey Reporter Significance Tests).