Why is the z statistic of a binomial proportion test normally distributed? Suppose there is single sample $X_1\dots X_n$ of binary variable $X\sim Bern(p_1)$ and the following hypothesis is being tested:
$$H_0: p_1 = p $$
$$H_1: p_1 \not= p $$
Let us use z-statistic without continuity correction:
$$z = \frac{\hat p -p}{\sqrt{\hat p \hat q / n}}, $$
where $\hat p = \frac 1n \sum X_i,$ $\hat q = 1-\hat p$.
Fleiss in "Statistical Methods for Rates and Proportions" on page 26 states that $z$ is normal just "thanks to the CLT". But this is not obvious to me, because the denominator is also a random variable and we can't use the CLT directly.
Please tell me where can I read about this fact?
 A: Maybe the reason this "isn't obvious" to you is that it's not exactly true.
If $n$ is large and $p$ is not too far from $1/2,$ then $X\sim\mathsf{Binom}(n, p)$ $X$ is approximately $\mathsf{Norm}(np, \sqrt{np(1-p)}.$ and
$\hat p = X/n$ is approximately $\mathsf{Norm}(p, \sqrt{p(1-p)/n}).$ This is follows from the Central Limit Theorem and other considerations.
However, that does not quite answer your question. In your expression,
notice that you have $\hat p$ instead of $p.$ Again, if $n$ is sufficiently
large, the Law of Large Numbers says (rougly) that $\hat p \approx p.$
Therefore, it is not exactly correct to say that $\frac{\hat p - p}{\sqrt{\hat p(1-\hat p)/n}}$ has a standard normal distribution. [In case $n$ is in the thousands, this expression is nearly standard normal.]
Hypothesis tests. Usually, the test statistic for testing $H_0: p = p_0$ against $H_a: p \ne p_0$ would be
$z = \frac{\hat p - p_0}{p_0(1-p_0)/n},$ where $p_0$ is the value of $p$ specified in the null hypothesis.
Confidence intervals. However, if you are making a confidence interval, there
is no specified hypothetical value $p = p_0.$
The Wald 95% confidence interval is of the form $\hat p \pm 1.96\sqrt{\frac{\hat p(1-\hat p )}{n}}.$ Strictly speaking, this is an asymptotic confidence interval. That is, it is approximately correct only if $n$ is very large.
A slight modification of the Wald CI is the Agresti-Coull CI, which has been
shown to be more accurate than the Wald interval for small and moderate $n.$
Let $\check p = \frac{X+2}{n+4}.$ Then the A-C 95% CI is of the form
$\check p \pm 1.96\sqrt{\frac{\check p(1-\check p )}{n+4}}.$
Note_ See @Glen_b's link to Slutsky's Theorem as justification for use of $\hat p$ when $n$ is very large.
A: The statistic should be $z = \frac{\hat p -p}{\sqrt{ p  q / n}}$ which follows a scaled binomial distribution. This approaches the normal distribution.

But also, the expression $z = \frac{\hat p -p}{\sqrt{\hat p \hat q / n}},$ will be approximately equal to $ \frac{\hat p -p}{\sqrt{ p  q / n}}$, it is the first term in Taylor series expansion around $p$.
