# Complex Samples t-Test of a Proportion

Where ${\displaystyle g}$ is the observed proportion, ${\displaystyle e}$ is the expected proportion, ${\displaystyle s_{p}}$ is estimated Standard Error of the observed proportion and ${\displaystyle n}$ is the sample size,
${\displaystyle n}$ is the sample size:
${\displaystyle t={\frac {g-e}{s_{p}}}}$
where ${\displaystyle p=2\Pr(t_{n-1}\geq t)}$ if ${\displaystyle g\neq e}$ and NaN otherwise.